美化终端

zsh官网
zsh命令行主题
z的github地址

安装 zsh


sh -c "$(curl -fsSL https://raw.githubusercontent.com/robbyrussell/oh-my-zsh/master/tools/install.sh)"

安装终端的命令自动提示

git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh

安装z命令

z 命令会根据你最近使用的目录的频率,智能跳转 最符合 的目录

cd ~/.zsh/
git clone https://github.com/rupa/z/
#添加配置
vim ~/.bashrc
source ~/.zsh/z/z.sh

使用方法

➜  pwd
/root/test/a
➜  cd
➜  ~ ls test
a  aa  a.txt  b  c  cc
➜  ~ cd test
➜  cd aa
➜  pwd
/root/test/aa
➜  z test
➜  pwd
/root/test
➜  cd
➜  ~ pwd
/root
➜  ~ z aa
➜  pwd
/root/test/aa
➜  z
common:    /root/test
20         /root/test/aa
28         /root/test
28         /root/test/a

Imfan
5 声望0 粉丝