安装 Z shell(zsh)
最后更新于
$ chsh -s /usr/local/bin/zsh$ which zsh
/usr/local/bin/zsh# vipwuser:*:1000:1000:Firstname Lastname:/home/user:/bin/kshuser:*:1000:1000:Firstname Lastname:/home/user:/usr/local/bin/zshThis is the Z Shell configuration function for new users,
zsh-newuser-install.
You are seeing this message because you have no zsh startup files
(the files .zshenv, .zprofile, .zshrc, .zlogin in the directory
~). This function can help you with a few settings that should
make your use of the shell easier.
You can:
(q) Quit and do nothing. The function will be run again next time.
(0) Exit, creating the file ~/.zshrc containing just a comment.
That will prevent this function being run again.
(1) Continue to the main menu.
--- Type one of the keys in parentheses ---Please pick one of the following options:
(1) Configure settings for history, i.e. command lines remembered
and saved by the shell. (Recommended.)
(2) Configure the new completion system. (Recommended.)
(3) Configure how keys behave when editing command lines. (Recommended.)
(4) Pick some of the more common shell options. These are simple "on"
or "off" switches controlling the shell's features.
(0) Exit, creating a blank ~/.zshrc file.
(a) Abort all settings and start from scratch. Note this will overwrite
any settings from zsh-newuser-install already in the startup file.
It will not alter any of your other settings, however.
(q) Quit and do nothing else. The function will be run again next time.
--- Type one of the keys in parentheses ---$ : > ~/.zshrc# doas pkg_add curl git
$ sh -c 'REMOTE=https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh; \
curl -fsSL "$REMOTE" -o /tmp/install.sh && sh /tmp/install.sh'# ~/.zshrc
ZSH_THEME="bira"$ source ~/.zshrc$ zsh -f