diff options
author | Axel Beckert <abe@deuxchevaux.org> | 2022-02-12 20:55:56 +0100 |
---|---|---|
committer | Axel Beckert <abe@deuxchevaux.org> | 2022-02-12 20:55:56 +0100 |
commit | a13f7a2b3efc45af0879bebe63bed7641af4b39f (patch) | |
tree | 4656cbf81a49b84bdbf10b83fe81bd33cf8a65cc /Src/prompt.c | |
parent | 60187dd3dae5f3e0cb3bd8f9717d3eda47e6f860 (diff) | |
parent | 12eb3e5356f2fc3351eed58ef1cef1b8fb83b504 (diff) | |
download | zsh-a13f7a2b3efc45af0879bebe63bed7641af4b39f.tar.gz zsh-a13f7a2b3efc45af0879bebe63bed7641af4b39f.zip |
Update upstream source from tag 'upstream/5.8.1'
Update to upstream version '5.8.1'
with Debian dir a5d2bf34c355a0e96e2d6d9fba85468f75c5364f
Diffstat (limited to 'Src/prompt.c')
-rw-r--r-- | Src/prompt.c | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/Src/prompt.c b/Src/prompt.c index b65bfb86b..91e21c8e9 100644 --- a/Src/prompt.c +++ b/Src/prompt.c @@ -244,6 +244,12 @@ parsecolorchar(zattr arg, int is_fg) bv->fm += 2; /* skip over F{ */ if ((ep = strchr(bv->fm, '}'))) { char oc = *ep, *col, *coll; + int ops = opts[PROMPTSUBST], opb = opts[PROMPTBANG]; + int opp = opts[PROMPTPERCENT]; + + opts[PROMPTPERCENT] = 1; + opts[PROMPTSUBST] = opts[PROMPTBANG] = 0; + *ep = '\0'; /* expand the contents of the argument so you can use * %v for example */ @@ -252,6 +258,10 @@ parsecolorchar(zattr arg, int is_fg) arg = match_colour((const char **)&coll, is_fg, 0); free(col); bv->fm = ep; + + opts[PROMPTSUBST] = ops; + opts[PROMPTBANG] = opb; + opts[PROMPTPERCENT] = opp; } else { arg = match_colour((const char **)&bv->fm, is_fg, 0); if (*bv->fm != '}') |