Babun, Great Windows Shell

来源:互联网 发布:微博发淘宝客链接 编辑:程序博客网 时间:2024/06/06 16:28
-- git status different with git bash
executing git config --global core.autocrlf true   in babun should fix your problem
-- how to set shortkey 
in .zshrc
alias ..="cd .."

alias ...="cd ../.."

alias ....="cd ../../.."

alias .....="cd ../../../.."

alias ......="cd ../../../../.."

alias lo="cd /e/Wnmp/html/lot/"

-- install package

pack install chere

-- set proxy
export http_proxy=http://user:password@server:port
export http_proxy=http://127.0.0.1:1080 


--change theme
https://www.sorendam.com/take-control-of-your-console-in-windows-with-babun-oh-my-zsh-and-powerline-fonts/

--auto ssh to host
ssh-keygen -t rsa -C  'your email@domain.com'
scp ~/.ssh/id_rsa.pub username@hostname:~/#将公钥文件复制至ssh服务器ssh username@hostname#使用用户名和密码方式登录至ssh服务器mkdir .ssh  #若.ssh目录已存在,可省略此步cat id_rsa.pub >> .ssh/authorized_keys  #将公钥增加到文件尾

vim ~/.ssh/config   #若没有该文件,直接新建即可

添加文件内容格式如下:

Host    shortname
        HostName 101.....
        User    root
        IdentityFile ~/.ssh/id_rsa

Host alias#自定义别名
HostName        hostname  #替换为你的ssh服务器ip或domain
Port            port #ssh服务器端口,默认为22
User            user #ssh服务器用户名
IdentityFile    ~/.ssh/id_rsa #第一个步骤生成的公钥文件对应的私钥文件
if permission error 
chmod 600 id_rsa
--change vim tmp file location

First of all, create these three folders:
mkdir ~/.vim/.backup ~/.vim/.swp ~/.vim/.undo

Now, put these lines in your vimrc file.
set undodir=~/.vim/.undo//
set backupdir=~/.vim/.backup//
set directory=~/.vim/.swp//

0 0
原创粉丝点击