人神都知道OhMyZsh的魔力,那就上吧。当然有人喜欢fish,各有各的好。
环境:WSL2, unbuntu 18.04
一、安装ZSH
(1) 安装
sudo apt-get install -y zsh
(2)验证:
zsh --version
(3)设定默认选项
chsh -s /usr/bin/zsh
二、安装oh-my-zsh
1、下载
git clone https://gitee.com/mirrors/oh-my-zsh.git
songroom@DESKTOP-MEDPUTU:~$ git clone https://gitee.com/mirrors/oh-my-zsh.git
Cloning into 'oh-my-zsh'...
remote: Enumerating objects: 29320, done.
remote: Counting objects: 100% (3158/3158), done.
remote: Compressing objects: 100% (2702/2702), done.
remote: Total 29320 (delta 1690), reused 851 (delta 432), pack-reused 26162
Receiving objects: 100% (29320/29320), 6.45 MiB | 881.00 KiB/s, done.
Resolving deltas: 100% (16855/16855), done.
2、sh install.sh
(1)进入oh-my-zsh下tools
songroom@DESKTOP-MEDPUTU:~$ ls
Manifest.toml ] beta echo install machine_learning oh-my-zsh pyclick tdenginesudo v xtp_another_old
Project.toml apt-get ctp fosun julia-1.7.2 machine_learning.ipynb policy tdengine updateapt-get v_learn
songroom@DESKTOP-MEDPUTU:~/oh-my-zsh$ cd tools
(2)sh install.sh
songroom@DESKTOP-MEDPUTU:~/oh-my-zsh/tools$ sh install.sh
Cloning Oh My Zsh...
remote: Enumerating objects: 1297, done.
remote: Counting objects: 100% (1297/1297), done.
remote: Compressing objects: 100% (1254/1254), done.
remote: Total 1297 (delta 26), reused 1206 (delta 24), pack-reused 0
Receiving objects: 100% (1297/1297), 1.06 MiB | 1.72 MiB/s, done.
Resolving deltas: 100% (26/26), done.
From https://github.com/ohmyzsh/ohmyzsh
* [new branch] master -> origin/master
Branch 'master' set up to track remote branch 'master' from 'origin'.
Already on 'master'
/home/songroom/oh-my-zsh/tools
Looking for an existing zsh config...
Using the Oh My Zsh template file and adding it to ~/.zshrc.
Time to change your default shell to zsh:
Do you want to change your default shell to zsh? [Y/n] y
Changing your shell to /usr/bin/zsh...
[sudo] password for songroom:
Shell successfully changed to '/usr/bin/zsh'.
__ __
____ / /_ ____ ___ __ __ ____ _____/ /_
/ __ \/ __ \ / __ `__ \/ / / / /_ / / ___/ __ \
/ /_/ / / / / / / / / / / /_/ / / /_(__ ) / / /
\____/_/ /_/ /_/ /_/ /_/\__, / /___/____/_/ /_/
/____/ ....is now installed!
Before you scream Oh My Zsh! look over the `.zshrc` file to select plugins, themes, and options.
• Follow us on Twitter: https://twitter.com/ohmyzsh
• Join our Discord community: https://discord.gg/ohmyzsh
• Get stickers, t-shirts, coffee mugs and more: https://shop.planetargon.com/collections/oh-my-zsh
➜ tools git:(master) zsh --version
三、设置主题
我看默认主题也不错了,暂时没有别的需求。
四、常用快捷键
1、TAB键 : 智能补全
2、两下TAB键:
3、快速跳转 : cd - 按TAB 键
4、自动跳转:z 命令