Zsh zsh terminal installed at the terminal character solve the garbage problem

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;

zsh renderings

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

  1. After Bahrain oh-my-zsh, is to modify the theme we want, like I currently use the agnoster, other portfolios turn github

  2. 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 ~/.zshrcAfter editing remember to save, and source ~/.zshrcthen reopen the closed terminal

Then there is the time to witness the miracle of the

  • Terminal garbled
  • The terminal also garbled vscode

Garbled

3 to solve the garbage

  1. terminal

Open the terminal modify the font preferences as follows:

Modify Terminal font

// Meslo LG Regular for Powerline
  1. vscode adjust font

    • The lower left corner to open the first set vscode

Open the Settings

  • Then search terminal font found below:
    search for

  • The same font changed to Meslo LG s for PowerLine

  • Effect modified as follows:

after fixing

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

  1. 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;

  1. 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
   
   
Published 16 original articles · won praise 19 · views 10000 +

Guess you like

Origin blog.csdn.net/weixin_40755688/article/details/104064772
zsh