zsh 프롬프트 전체 경로 대신 현재 디렉터리만 표시하는 방법(agnoster theme)
vim .oh-my-zsh/themes/agnoster.zsh-theme
$ vim .oh-my-zsh/themes/agnoster.zsh-theme
...
# Dir: current working directory
prompt_dir() {
#prompt_segment blue $CURRENT_FG '%~'
#prompt_segment blue $CURRENT_FG '%2~'
#prompt_segment blue $CURRENT_FG ' %25<...<%~%<< '
prompt_segment blue $CURRENT_FG '%c'
}
...
기본
prompt_segment blue $CURRENT_FG '%~'
prompt
25자보다 긴 문자는 ...으로 표시
prompt_segment blue $CURRENT_FG ' %25<...<%~%<< '
%25<...< will truncate everything that is longer than 25 characters to ...
%<< will basically tell zsh that anything after this should not be truncated (limiting the truncation to the path part)