diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2015-08-22 01:55:58 +0200 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2015-08-22 01:55:58 +0200 |
commit | 02f6e25bfcd5feb9a093377dda0dd549cdf5c309 (patch) | |
tree | 9a25e61122b3fa0d0a1ff68b5ef05c775ff78b1e /Functions/Prompts/prompt_adam1_setup | |
parent | e04a19735ffc8523b93b33074f685ad4e2c92e0c (diff) | |
parent | 881474edcb223ac22a08d81a824809c33ca3a9c9 (diff) | |
download | zsh-02f6e25bfcd5feb9a093377dda0dd549cdf5c309.tar.gz zsh-02f6e25bfcd5feb9a093377dda0dd549cdf5c309.zip |
Merge tag 'zsh-5.0.8-test-2' into debian
Diffstat (limited to 'Functions/Prompts/prompt_adam1_setup')
-rw-r--r-- | Functions/Prompts/prompt_adam1_setup | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/Functions/Prompts/prompt_adam1_setup b/Functions/Prompts/prompt_adam1_setup index 034641fb8..aca0e59f1 100644 --- a/Functions/Prompts/prompt_adam1_setup +++ b/Functions/Prompts/prompt_adam1_setup @@ -14,8 +14,6 @@ This theme works best with a dark background. Recommended fonts for this theme: nexus or vga or similar. If you don't have any of these, then specify the `plain' option to use 7-bit replacements for the 8-bit characters. - -And you probably thought adam1 was overkill. EOF } @@ -27,8 +25,9 @@ prompt_adam1_setup () { base_prompt="%K{$prompt_adam1_color1}%n@%m%k " post_prompt="%b%f%k" - base_prompt_no_color=$(echo "$base_prompt" | perl -pe "s/%(K{.*?}|k)//g") - post_prompt_no_color=$(echo "$post_prompt" | perl -pe "s/%(K{.*?}|k)//g") + setopt localoptions extendedglob + base_prompt_no_color="${base_prompt//(%K{[^\\\}]#\}|%k)/}" + post_prompt_no_color="${post_prompt//(%K{[^\\\}]#\}|%k)/}" add-zsh-hook precmd prompt_adam1_precmd } |