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 0b0245e commit d2384f8Copy full SHA for d2384f8
agkozak-zsh-theme.plugin.zsh
@@ -95,11 +95,12 @@ _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*)
- abbreviated_path=$(print -Pn "%($(($1 + ${#HOME//[^\/]/}-1))~|~/.../%$1~|%~)")
100
+ abbreviated_path=$(print -Pn "%($(($1 + 2))~|~/.../%${1}~|%~)")
101
;;
102
*)
- abbreviated_path=$(print -Pn "%($(($1 + 1))~|.../%$1~|%~)")
103
+ abbreviated_path=$(print -Pn "%($(($1 + 1))~|.../%${1}~|%~)")
104
105
esac
106
print -n "$abbreviated_path"
0 commit comments