728x90
zsh 프롬프트 전체 경로 대신 현재 디렉터리만 표시하는 방법
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 '%~'
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)
현재 작업 디렉토리만 표시
prompt_segment blue $CURRENT_FG '%c'
728x90
'기타' 카테고리의 다른 글
[url] Google 관리 콘솔 도구 상자(toolbox) - Dig (0) | 2021.06.05 |
---|---|
[원도우] MobaXterm에서 파일 탐색기 및 vscode 열기 (0) | 2021.06.05 |
[Ansible] setup 모듈(setup module) (0) | 2021.06.05 |
[명령어] sipcalc 명령어 (0) | 2021.06.05 |
[명령어] curl 명령어 (0) | 2021.06.05 |