zsh 설치
# zsh 설치
sudo apt-get install zsh
# 기본 쉘 변경: BASH에서 zsh로
$ sudo chsh -s $(which zsh)
oh-my-zsh 설치
# oh-my-zsh 설치
$ sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
# zsh 설정
$ vi ~/.zshrc
# 설정 즉시 적용
$ source ~/.zshrc
oh-my-zsh 설정(.zshrc에서 수정)
# zsh 테마 변경
ZSH_THEME="agnoster"
# Prompt customization
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
oh-my-zsh 플러그인
# 명령어 하이라이팅 플러그인 설치
$ git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 자동완성 플러그인 설치
$ git clone https://github.com/zsh-users/zsh-autosuggestions $ZSH_CUSTOM/plugins/zsh-autosuggestions
# .zshrc에서 플러그인 추가
plugins=(
git
zsh-autosuggestions
zsh-syntax-highlighting
)
'기본' 카테고리의 다른 글
트랜잭션 격리 수준 (0) | 2024.02.21 |
---|---|
GraphQL (1) | 2023.11.29 |
ssh-key 설정 (0) | 2023.10.23 |
코루틴 (0) | 2023.06.14 |
함수 기반 뷰와 클래스 기반 뷰 (1) | 2023.06.03 |