summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-11-22 18:21:29 +0900
committerJun-ichi Takimoto <takimoto-j@kba.biglobe.ne.jp>2021-11-22 18:21:29 +0900
commit138f5bf144589a59ef009f26332652291cd0a944 (patch)
tree73033f2fc496423f1fb88bf66962871699b25cc7
parent973e356c34378d3d81585f83efe1349fc6c58d06 (diff)
downloadzsh-138f5bf144589a59ef009f26332652291cd0a944.tar.gz
zsh-138f5bf144589a59ef009f26332652291cd0a944.zip
49586: fix :a and :A modifiers (with PWD="/") on Cygwin⁩
-rw-r--r--ChangeLog5
-rw-r--r--Src/hist.c6
2 files changed, 10 insertions, 1 deletions
diff --git a/ChangeLog b/ChangeLog
index d678081a0..bb8b73085 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -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;