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:
Peter Stephenson 2019-11-18 15:26:14 +00:00
parent a8b0d399e5
commit 88d14451b0
2 changed files with 15 additions and 0 deletions

View file

@ -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:

View file

@ -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);