We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 5e288b5 commit 0b0245eCopy full SHA for 0b0245e
agkozak-zsh-theme.plugin.zsh
@@ -95,12 +95,11 @@ _agkozak_prompt_dirtrim() {
95
[[ $1 -ge 1 ]] || set 2
96
local abbreviated_path
97
case $PWD in
98
- $HOME) print -n '~' ;; # For TrueOS
99
$HOME*)
100
- abbreviated_path=$(print -Pn "%($(($1 + 2))~|~/.../%${1}~|%~)")
+ abbreviated_path=$(print -Pn "%($(($1 + ${#HOME//[^\/]/}-1))~|~/.../%$1~|%~)")
101
;;
102
*)
103
- abbreviated_path=$(print -Pn "%($(($1 + 1))~|.../%${1}~|%~)")
+ abbreviated_path=$(print -Pn "%($(($1 + 1))~|.../%$1~|%~)")
104
105
esac
106
print -n "$abbreviated_path"
0 commit comments