mirror of
https://github.com/zsh-users/zsh
synced 2024-11-02 20:47:49 +00:00
users/24445: Add :P modifier to history code.
This was in the glob qualifier and variable code but got missed out of the separate history modifier function.
This commit is contained in:
parent
a8b0d399e5
commit
88d14451b0
2 changed files with 15 additions and 0 deletions
|
@ -1,3 +1,8 @@
|
|||
2019-11-18 Peter Stephenson <p.stephenson@samsung.com>
|
||||
|
||||
* users/24445: Src/hist.c: Add missing support for :P to history
|
||||
code (was already present in glob qualifiers and variables).
|
||||
|
||||
2019-11-11 skirit <skirit@dump.cz>
|
||||
|
||||
* unposted (salsa.debian.org MR!1): Completion/Unix/Command/_ip:
|
||||
|
|
10
Src/hist.c
10
Src/hist.c
|
@ -920,6 +920,16 @@ histsubchar(int c)
|
|||
case 'u':
|
||||
sline = casemodify(sline, CASMOD_UPPER);
|
||||
break;
|
||||
case 'P':
|
||||
if (*sline != '/') {
|
||||
char *here = zgetcwd();
|
||||
if (here[strlen(here)-1] != '/')
|
||||
sline = zhtricat(metafy(here, -1, META_HEAPDUP), "/", sline);
|
||||
else
|
||||
sline = dyncat(here, sline);
|
||||
}
|
||||
sline = xsymlink(sline, 1);
|
||||
break;
|
||||
default:
|
||||
herrflush();
|
||||
zerr("illegal modifier: %c", c);
|
||||
|
|
Loading…
Reference in a new issue