diff --git a/ChangeLog b/ChangeLog index eb29a06cb..cc6e84dc5 100644 --- a/ChangeLog +++ b/ChangeLog @@ -1,3 +1,8 @@ +2016-12-03 Barton E. Schaefer + + * 40071: Src/subst.c: change Dash back to "-" before evaluating + named directory expansions + 2016-12-03 Daniel Shahaf * 40068: Src/params.c, Test/B02typeset.ztst: Abort execution @@ -54,7 +59,7 @@ * 40036: Completion/Debian/Command/_bts: Complete removal syntaxes correctly. -2016-11-29 Barton E. Schaefer +2016-11-29 Barton E. Schaefer * 40034: Src/subst.c: clear badcshglob when ignoring errors diff --git a/Src/subst.c b/Src/subst.c index 06d2c9ea9..64b440027 100644 --- a/Src/subst.c +++ b/Src/subst.c @@ -650,6 +650,8 @@ filesubstr(char **namptr, int assign) char *ptr, *tmp, *res, *ptr2; int val; + if (str[1] == Dash) + str[1] = '-'; val = zstrtol(str + 1, &ptr, 10); if (isend(str[1])) { /* ~ */ *namptr = dyncat(home ? home : "", str + 1);