diff options
author | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2021-11-22 18:21:29 +0900 |
---|---|---|
committer | Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> | 2021-11-22 18:21:29 +0900 |
commit | 138f5bf144589a59ef009f26332652291cd0a944 (patch) | |
tree | 73033f2fc496423f1fb88bf66962871699b25cc7 | |
parent | 973e356c34378d3d81585f83efe1349fc6c58d06 (diff) | |
download | zsh-138f5bf144589a59ef009f26332652291cd0a944.tar.gz zsh-138f5bf144589a59ef009f26332652291cd0a944.zip |
49586: fix :a and :A modifiers (with PWD="/") on Cygwin
-rw-r--r-- | ChangeLog | 5 | ||||
-rw-r--r-- | Src/hist.c | 6 |
2 files changed, 10 insertions, 1 deletions
@@ -1,3 +1,8 @@ +2021-11-22 Jun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp> + + * 49586: Src/hist.c: fix :a and :A modifiers (with PWD="/") on + Cygwin + 2021-11-19 Oliver Kiddle <opk@zsh.org> * 49594: Completion/Unix/Command/_chmod: adapt to changes in 49499 diff --git a/Src/hist.c b/Src/hist.c index 6ac581fda..ea727d1f8 100644 --- a/Src/hist.c +++ b/Src/hist.c @@ -1861,7 +1861,11 @@ chabspath(char **junkptr) return 1; if (**junkptr != '/') { - *junkptr = zhtricat(metafy(zgetcwd(), -1, META_HEAPDUP), "/", *junkptr); + char *here = zgetcwd(); + if (here[strlen(here)-1] != '/') + *junkptr = zhtricat(metafy(here, -1, META_HEAPDUP), "/", *junkptr); + else + *junkptr = dyncat(here, *junkptr); } current = *junkptr; |