개발이야기
[개발환경] zsh / oh-my-zsh / plugins/powerlevel10k
royleej9
2022. 1. 1. 17:21
zsh / oh-my-zsh / plugins
zsh
# 설치
sudo apt update
sudo apt install zsh -y
oh-my-zsh
# curl 설치
sudo apt-get install curl
# git 설치
sudo apt-get install git
# oh-my-zsh 설치
sh -c "$(curl -fsSL https://raw.github.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
속도 개선
// .git 폴더가 있는 곳에서 ll 명령어 느려질 때
// https://stackoverflow.com/questions/12765344/oh-my-zsh-slow-but-only-for-certain-git-repo
git config --add oh-my-zsh.hide-status 1
git config --add oh-my-zsh.hide-dirty 1
plugins
- 설치 위치 : ~/.oh-my-zsh/custom/plugins
zsh-autosuggestions
# 설치
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
# 편집
vi ~/.zshrc
# 플러그인 추가
plugins=(
# other plugins...
zsh-autosuggestions
)
# 변경 사항 적용
$ source ~/.zshrc
zsh-syntax-highlighting
# 설치
git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
# 편집
$ vi ~/.zshrc
# 플러그인 추가
plugins=(
# other plugins...
zsh-syntax-highlighting
)
# 변경 사항 적용
$ source ~/.zshrc
powerlevel10k
# 설치
git clone --depth=1 https://github.com/romkatv/powerlevel10k.git ${ZSH_CUSTOM:-$HOME/.oh-my-zsh/custom}/themes/powerlevel10k
# 편집
$ vi ~/.zshrc
# 테마 변경 후 터미널 재시작
ZSH_THEME="powerlevel10k/powerlevel10k"
실행
# 자동 실행 - 아래 명령어 실행 후 로그아웃 후 재 로그인
chsh -s $(which zsh)
# 수동 실행
zsh
기타 - plugins
- 기본 환경에서 플러그인 설치시 .zshrc 파일 설정
plugins=( git zsh-syntax-highlighting zsh-autosuggestions )