Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Recent regression on (N) after removing array element



This used to work:

x=( /bin /foo )
x[(r)/foo]=''
x=( $^x(N) )

but the last line now yields an error:
zsh: no matches found: (N)

If I remove this recent change to Src/glob.c, (N) works correctly:

--- /opt/src/zsh-2013-11-17/Src/glob.c 2013-09-23 18:01:42.000000000 -0400
+++ /opt/src/zsh-2013-11-19/Src/glob.c 2013-11-19 10:22:39.000000000 -0500
@@ -1171,7 +1171,7 @@
  break;
     }
  }
- if (*s != Inpar)
+ if (*s != Inpar || s == str)
     break;
  if (isset(EXTENDEDGLOB) && !zpc_disables[ZPC_HASH] && s[1] == Pound) {
     if (s[2] == 'q') {


Sincerely,
  Vin



Messages sorted by: Reverse Date, Date, Thread, Author