Zsh zsh terminal installed at the terminal character solve the garbage problem
bash is good, but zsh is the people's favorite, whether it is the subject or the recording command of plug-ins and highlighting effects are second to none, if you install zsh use of certain themes lead to terminal garbled, then congratulations, this article will help you solve the problem
- First, let's look at the results, why can mess with these players so we love na;
1 install zsh
1. What is zsh
- zsh is Z Shell, the function is very powerful, but very complex, so barabara appeared we now optimized version of the oh-my-zsh
2. Installation oh-my-zsh
- curl installed
sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
- wget installed
sh -c "$(wget -O- https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
2 Modify the theme and
-
After Bahrain oh-my-zsh, is to modify the theme we want, like I currently use the agnoster, other portfolios turn github
-
After installing topic relating modify, replace default theme by modifying vim ~ / ZSH_THEME field under .zshrc, such ZSH_THEME = "agnoster"
vim ~/.zshrc
- If you do not modify the permissions you use
sudo vim ~/.zshrc
After editing remember to save, andsource ~/.zshrc
then reopen the closed terminal
Then there is the time to witness the miracle of the
- Terminal garbled
- The terminal also garbled vscode
3 to solve the garbage
- terminal
Open the terminal modify the font preferences as follows:
// Meslo LG Regular for Powerline
-
vscode adjust font
- The lower left corner to open the first set vscode
-
Then search terminal font found below:
-
The same font changed to Meslo LG s for PowerLine
-
Effect modified as follows:
Flattered harvest themes and styles you want, if you want to change other fonts or font if you do not turn this font download
other
- Installation iterm2
Some people find it difficult to use Mac comes with the terminal, you want to install other terminals, the author also ready, you can access specific iterm2 official website , modify the fonts and other tutorials above;
- Other plug-ins:
- Installation zsh-syntax-highlighting widget
cd ~/.oh-my-zsh/custom/plugins
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
- Install plug autojump
// 安装
git clone git://github.com/joelthelion/autojump.git
// 进入目录
cd autojump
//执行脚本
./install.py
// 打开~/.zshrc文件增加如下代码
# install autojump
[[ -s ~/.autojump/etc/profile.d/autojump.sh ]] && . ~/.autojump/etc/profile.d/autojump.sh