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
'기타' 카테고리의 다른 글
[AWS] AWS CloudWatch 경보를 Slack으로 보내는 방법_ver2 (2) | 2021.07.29 |
---|---|
Rkhunter(Rootkit Hunter)을 소스 코드로부터 컴파일하여 설치하는 방법 (0) | 2021.07.22 |
[LDAP] phpLDAPadmin 설치 및 연동 (0) | 2021.06.15 |
[LDAP] openldap server 삭제 (0) | 2021.06.14 |
[url] Google 관리 콘솔 도구 상자(toolbox) - Dig (0) | 2021.06.05 |