diff options
author | Marc Cornellà <marc.cornella@live.com> | 2015-12-14 12:46:14 +0100 |
---|---|---|
committer | Marc Cornellà <marc.cornella@live.com> | 2015-12-14 12:46:14 +0100 |
commit | bd384a060b835b6a155f1a55338afd15c54e1cb2 (patch) | |
tree | cc458752b791693f9f3f36a94add9cf101e9a111 | |
parent | 6a8692da7cc6654538e6fbfad9e494eac977936c (diff) | |
parent | b15918d414f255f8d2b36c99a338f930d7431b21 (diff) | |
download | zsh-bd384a060b835b6a155f1a55338afd15c54e1cb2.tar.gz zsh-bd384a060b835b6a155f1a55338afd15c54e1cb2.tar.bz2 zsh-bd384a060b835b6a155f1a55338afd15c54e1cb2.zip |
Merge pull request #4667 from dbohdan/patch-1
"fishy" theme: Shorten path .foo to .f, not .
-rw-r--r-- | themes/fishy.zsh-theme | 12 |
1 files changed, 6 insertions, 6 deletions
diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme index 8b24172a2..83bd455b5 100644 --- a/themes/fishy.zsh-theme +++ b/themes/fishy.zsh-theme @@ -1,13 +1,13 @@ # ZSH Theme emulating the Fish shell's default prompt. _fishy_collapsed_wd() { - echo $(pwd | perl -pe " + echo $(pwd | perl -pe ' BEGIN { - binmode STDIN, ':encoding(UTF-8)'; - binmode STDOUT, ':encoding(UTF-8)'; - }; s|^$HOME|~|g; s|/([^/])[^/]*(?=/)|/\$1|g -") -} + binmode STDIN, ":encoding(UTF-8)"; + binmode STDOUT, ":encoding(UTF-8)"; + }; s|^$ENV{HOME}|~|g; s|/([^/.])[^/]*(?=/)|/$1|g; s|/\.([^/])[^/]*(?=/)|/.$1|g +') +} local user_color='green'; [ $UID -eq 0 ] && user_color='red' PROMPT='%n@%m %{$fg[$user_color]%}$(_fishy_collapsed_wd)%{$reset_color%}%(!.#.>) ' |