# cd /usr/ports/shells/zsh/ && make install clean
# cd /usr/ports/shells/zsh-completions && make install clean
# cd /usr/ports/shells/zsh-autosuggestions/ && make install clean
# cd /usr/ports/shells/zsh-syntax-highlighting/ && make install clean
查看安装后说明
root@ykla:/home/ykla # pkg info -D zsh
zsh-5.9_5:
On install:
==========================================================
By default, zsh looks for system-wide defaults in
/usr/local/etc.
If you previously set up /etc/zprofile, /etc/zshenv, etc.,
either move them to /usr/local/etc or rebuild zsh with the
ETCDIR option enabled. # 如果之前在其他 shell 有任何配置,需要转移格式到 ~/.zshrc
==========================================================
root@ykla:/home/ykla # pkg info -D zsh-autosuggestions
zsh-autosuggestions-0.7.1:
On install:
Add the line below to your .zshrc to enable auto suggestions.
source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh # 要求加入此行到 ~/.zshrc
root@ykla:/home/ykla # pkg info -D zsh-syntax-highlighting
zsh-syntax-highlighting-0.8.0,1:
On install:
Add the line below to *the end of* your .zshrc to enable highlighting.
source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh # 要求加入此行 ~/.zshrc
配置 zsh shell
# chsh -s /usr/local/bin/zsh # 切换 shell 至 zsh
chsh: user information updated
# cd /usr/ports/shells/bash/ && make install clean
# cd /usr/ports/shells/bash-completion-freebsd/ && make install clean
# cd /usr/ports/shells/bash-completion-zfs/ && make install clean
查看安装后配置
# pkg info -D bash-completion # 作为依赖安装的
bash-completion-2.14.0,2:
On install:
To enable the bash completion library, add the following to
your .bashrc file:
[[ $PS1 && -f /usr/local/share/bash-completion/bash_completion.sh ]] && \
source /usr/local/share/bash-completion/bash_completion.sh
See /usr/local/share/doc/bash-completion/README.md for more information.