IT, PC/Linux
zsh 설치/셋팅하기 - install, setting
Chan_찬
2023. 3. 13. 15:00
반응형
zsh이 좋은점 : tab 자동완성, 제안(Ctrl + r), 프롬프트
install
zsh, oh-my-zsh, zsh-syntax-highlighting
$ sudo apt install zsh && \
chsh -s `which zsh` && \
sudo apt install zsh-syntax-highlighting && \
echo "source /usr/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ~/.zshrc && \
curl -L https://raw.github.com/robbyrussell/oh-my-zsh/master/tools/install.sh | sh
config zsh
edit theme and add plugin
$ vi ~/.zshrc
ZSH_THEME="agnoster"
...
plugins=(
git
python
docker
pip
gnu-utils
colored-man-pages
)
edit zsh prompt
# add at end of bottom
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$HOST@$USER"
fi
}
728x90
반응형
BIG