summary refs log tree commit diff
diff options
context:
space:
mode:
-rw-r--r--ChangeLog6
-rw-r--r--Src/glob.c2
2 files changed, 8 insertions, 0 deletions
diff --git a/ChangeLog b/ChangeLog
index e861e0d90..ccad0d1ee 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,9 @@
+2014-07-31  Barton E. Schaefer  <schaefer@zsh.org>
+
+	* 32931: Src/glob.c: with NO_NOMATCH, using a subscript glob
+	qualifier on a not-matching pattern should still return the
+	original pattern
+
 2014-07-30  Peter Stephenson  <p.stephenson@samsung.com>
 
 	* unposted: Src/Builtins/sched.c, Src/Modules/datetime.c,
diff --git a/Src/glob.c b/Src/glob.c
index 1e9195049..627166c7a 100644
--- a/Src/glob.c
+++ b/Src/glob.c
@@ -1906,6 +1906,8 @@ zglob(LinkList list, LinkNode np, int nountok)
 		matchptr++;
 	    }
 	}
+    } else if (!badcshglob && !isset(NOMATCH) && matchct == 1) {
+	insert_glob_match(list, node, (--matchptr)->name);
     }
     free(matchbuf);