summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMarc Cornellà <marc.cornella@live.com>2015-12-14 12:46:14 +0100
committerMarc Cornellà <marc.cornella@live.com>2015-12-14 12:46:14 +0100
commitbd384a060b835b6a155f1a55338afd15c54e1cb2 (patch)
treecc458752b791693f9f3f36a94add9cf101e9a111
parent6a8692da7cc6654538e6fbfad9e494eac977936c (diff)
parentb15918d414f255f8d2b36c99a338f930d7431b21 (diff)
downloadzsh-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-theme12
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%}%(!.#.>) '