diff options
author | Robby Russell <robby@planetargon.com> | 2013-04-23 19:58:59 -0700 |
---|---|---|
committer | Robby Russell <robby@planetargon.com> | 2013-04-23 19:58:59 -0700 |
commit | 42127bee6d80a86446c4961ebcc1a68cb2f14261 (patch) | |
tree | 8c7359b88854bd18719bd0851ff84fba4445b7c4 /themes | |
parent | 966108a082cc314599c60c5d21a0db5e4db57057 (diff) | |
parent | 2d2aa641678f6cb691b67e40897c3fa185efadf8 (diff) | |
download | zsh-42127bee6d80a86446c4961ebcc1a68cb2f14261.tar.gz zsh-42127bee6d80a86446c4961ebcc1a68cb2f14261.tar.bz2 zsh-42127bee6d80a86446c4961ebcc1a68cb2f14261.zip |
Merge pull request #1715 from dbohdan/master
Fixed a UTF-8 problem in the theme "fishy"
Diffstat (limited to 'themes')
-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%}%(!.#.>) ' |