Linux shell 增强

Linux shell enhance

Changelog

data: 2020-05-08

Fixed

  • 修复shell切换为zsh后不起作用的问题

date: 2020-04-03

Added

  • Add ohmyzsh/wiki/Plugins link to improve experience

1. Oh-My-Zsh

1.1 安装前准备

  • Arch Linux
1
2
yay -S zsh git wget curl
chsh -s $(which zsh)
  • Ubuntu
1
2
sudo apt-get install zsh git wget curl
chsh -s $(which zsh)
  • Fedora
1
2
# 需安装 util-linux-user
sudo dnf install util-linux-user

记得重启来应用设置

1.2 安装 oh-my-zsh

1
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"

1.3 配置 oh-my-zsh

Oh-My-Zsh 配置文件路径:

1
vim ~/.zshrc

1.3.1 插件

Zsh community projects: zsh-users

  1. 安装zsh语法高亮zsh自动建议插件:
1
2
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  1. 更改配置文件中plugins项为(@ohmyzsh/wiki/Plugins ):
1
plugins=(vim-interaction pip git sudo extract z wd archlinux zsh-autosuggestions zsh-syntax-highlighting)

1.3.2 更换主题

更改配置文件中ZSH_THEME项为:

1
ZSH_THEME="ys"