diff options
author | Danyil Bohdan <danyil.bohdan@gmail.com> | 2013-04-12 18:19:09 +0300 |
---|---|---|
committer | Danyil Bohdan <danyil.bohdan@gmail.com> | 2013-04-12 18:19:09 +0300 |
commit | 2d2aa641678f6cb691b67e40897c3fa185efadf8 (patch) | |
tree | a45a2f7fa9ee6c793e0936130d3dfd55a6ab59fe /themes/fishy.zsh-theme | |
parent | 85426a57a2561f675a6ad51754d6687c3ec571c2 (diff) | |
download | zsh-2d2aa641678f6cb691b67e40897c3fa185efadf8.tar.gz zsh-2d2aa641678f6cb691b67e40897c3fa185efadf8.tar.bz2 zsh-2d2aa641678f6cb691b67e40897c3fa185efadf8.zip |
Implemented UTF-8 support in fishy.zsh-theme.
Diffstat (limited to 'themes/fishy.zsh-theme')
-rw-r--r-- | themes/fishy.zsh-theme | 9 |
1 files changed, 7 insertions, 2 deletions
diff --git a/themes/fishy.zsh-theme b/themes/fishy.zsh-theme index e9f78a54e..8b24172a2 100644 --- a/themes/fishy.zsh-theme +++ b/themes/fishy.zsh-theme @@ -1,8 +1,13 @@ # ZSH Theme emulating the Fish shell's default prompt. _fishy_collapsed_wd() { - echo $(pwd | perl -pe "s|^$HOME|~|g; s|/([^/])[^/]*(?=/)|/\$1|g") -} + echo $(pwd | perl -pe " + BEGIN { + binmode STDIN, ':encoding(UTF-8)'; + binmode STDOUT, ':encoding(UTF-8)'; + }; s|^$HOME|~|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%}%(!.#.>) ' |