Environment · macOS ·
[Mac OS] iTerm2 설치 및 꾸미기
iTerm2 설치 #
1brew install iterm2Homebrew 설치 참고 {: .prompt-info }
oh my zsh 설치 #
iTerm2에 다음 명령어를 입력한다.
1sh -c "$(curl -fsSL https://raw.githubusercontent.com/ohmyzsh/ohmyzsh/master/tools/install.sh)"
Theme 적용 #
다음 명령어를 입력해 Theme를 다운받는다.
1git clone https://github.com/romkatv/powerlevel10k.git $ZSH/themes/powerlevel10k.zshrc파일 열기1open ~/.zshrcZSH_THEME를 수정한다.ZSH_THEME="powerlevel10k/powerlevel10k"변경사항을 적용해준다.
1source ~/.zshrc
Theme 설정을 변경하고 싶다면, 다음 명령어를 통해 수정이 가능하다.
1p10k configure{: .prompt-tip }
유용한 zsh Plugin #
Syntax Highlighting (Plugin 적용은 아래 참고) #
명령어에 Highlight를 해주는 기능
1brew install zsh-syntax-highlighting
Auto Suggestions (Plugin 적용은 아래 참고) #
이전에 입력한 명령어를 보여주는 기능
오른쪽 방향키를 누르면 전체 명령어를 완성해준다.
1brew install zsh-autosuggestions
Autojump (Plugin 적용은 아래 참고) #
이전에 방문했던 위치를 알아서 찾아준다.
예를 들어
/Downloads에서j dev를 입력하면dev라는 이름을 가진 Directory 중 가장 많이 방문한 곳으로 이동한다.j -s를 입력하면 방문한 Directory 기록 확인이 가능하다.1brew install autojump
Plugin 적용 #
.zshrc파일 열기1open ~/.zshrc다음 명령어 추가
source /opt/homebrew/share/zsh-autosuggestions/zsh-autosuggestions.zsh source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zshplugins = ( git autojump zsh-syntax-highlighting zsh-autosuggestions )
Advertisement