반응형
1. 사용자 이름 줄이기
vi ~/.zshrc
prompt_context() {
if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then
prompt_segment black default "%(!.%{%F{yellow}%}.)$USER"
fi
}
sourc ~/.zshrc
2. iTerm2 Highlight
brew install zsh-syntax-highlighting
vi ~/.zshrc
### .zshrc 추가
source /opt/homebrew/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
plugins=( zsh-syntax-highlighting)
3. iTerm2 색상 변경
# 1.
brew install curl
# 2.
mkdir util && cd util
# 3.
curl -LO <https://raw.githubusercontent.com/mbadolato/iTerm2-Color-Schemes/master/schemes/Snazzy.itermcolors>
Color Presets → Import → util → Snazzy 선택
4. iTerm2 NewLine 설정
vi ~/.oh-my-zsh/themes/agnoster.zsh-theme
build_prompt() {
RETVAL=$?
prompt_status
prompt_virtualenv
prompt_context
prompt_dir
prompt_git
prompt_bzr
prompt_hg
prompt_newline //이부분을 추가 꼭 순서 지켜서
prompt_end
}
### 추가
prompt_newline() {
if [[ -n $CURRENT_BG ]]; then
echo -n "%{%k%F{$CURRENT_BG}%}$SEGMENT_SEPARATOR
%{%k%F{blue}%}$SEGMENT_SEPARATOR"
else
echo -n "%{%k%}"
fi
echo -n "%{%f%}"
CURRENT_BG=''
}
source ~/.oh-my-zsh/themes/agnoster.zsh-theme
5. iTerm2 이모지 붙이기
vi ~./zshrc
prompt_context() {
emojis=("🚀")
prompt_segment black default "mgrv-gyeom ${emojis}"
}
반응형