diff options
author | Marc Cornellà <marc.cornella@live.com> | 2018-10-17 20:53:07 +0200 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-17 20:53:07 +0200 |
commit | 2fce9a4d44f822c03ce874268338961d0761f1a9 (patch) | |
tree | eb1327c306f8fda150d7add5d534cb8a57648a5c /themes | |
parent | ea7b886f701316199cf90761a6e9a2a27659b544 (diff) | |
download | zsh-2fce9a4d44f822c03ce874268338961d0761f1a9.tar.gz zsh-2fce9a4d44f822c03ce874268338961d0761f1a9.tar.bz2 zsh-2fce9a4d44f822c03ce874268338961d0761f1a9.zip |
agnoster: use %n instead of $USER to fix quoting
Fixes #7268
With `$USER`, we'd need to quote it in case special characters like `\` are present in
the $USER value, like if the user is part of an AD domain.
With `%n` the quoting is done automatically by zsh.
See http://zsh.sourceforge.net/Doc/Release/Prompt-Expansion.html#Login-information
Diffstat (limited to 'themes')
-rw-r--r-- | themes/agnoster.zsh-theme | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/themes/agnoster.zsh-theme b/themes/agnoster.zsh-theme index 1ac3fc96b..0edb773aa 100644 --- a/themes/agnoster.zsh-theme +++ b/themes/agnoster.zsh-theme @@ -89,7 +89,7 @@ prompt_end() { # Context: user@hostname (who am I and where am I) prompt_context() { if [[ "$USER" != "$DEFAULT_USER" || -n "$SSH_CLIENT" ]]; then - prompt_segment black default "%(!.%{%F{yellow}%}.)$USER@%m" + prompt_segment black default "%(!.%{%F{yellow}%}.)%n@%m" fi } |