Mac终端搭建教程


shell

zsh

cat /etc/shells
查看所有shell

echo $SHELL
echo $0
查看当前使用shell

cat /etc/passwd | grep sh
查看默认shell

chsh -s /bin/zsh
切换终端

brew upgrade zsh
更新zsh

brew install zsh-syntax-highlighting
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.oh-my-zsh/custom/plugins/zsh-autosuggestions

oh-my-zsh

zsh主题

brew install oh-my-zsh
POWERLEVEL10K_MODE='nerdfont-complete'
ZSH_DISABLE_COMPFIX=true
#ZSH_THEME="agnoster"
ZSH_THEME="powerlevel10k/powerlevel10k"
Path to your oh-my-zsh installation.
export ZSH=$HOME/.oh-my-zsh
EDITOR=vim
export EDITOR
uninstall_oh_my_zsh
卸载
vi ~/.oh-my-zsh/themes/agnoster.zsh-theme
注释启动文字

vi-mode

oh-my-zsh插件

plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
#zsh-256color
#you-should-use
z
sudo
extract
vi-mode
)
$ alias | grep git

powerline9

shell字体

clone
git clone https://github.com/powerline/fonts.git --depth=1
install
cd fonts
./install.sh
clean-up a bit
cd ..
rm -rf fonts

vimrc

chrome插件

vim

vscode插件