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

Re: Zsh's and ksh's bang (!) expansion flags have different meanings



On Thu, Jul 23, 2026 at 7:42 AM Philippe Altherr
<philippe.altherr@xxxxxxxxx> wrote:
>
> Below is a patch that changes Zsh's emulation of ksh to map ksh's ! to just (k) instead of (!k). Note that the flag combination (!k) is forbidden, which I think is right.

This doesn't look right to me?  The test is prefixed with

  .k02.array=(characters in an array)

${!.k02.ref} should not return "characters" ...?  That makes '!' just
a no-op for this case.

--- expected
+++ actual
@@ -1,3 +1,3 @@
+characters
 .k02.array
-.k02.array
 characters
Test K02parameter.ztst failed: output differs from expected as shown above for:
  () {
    typeset -n .k02.ref=.k02.array
    emulate -L ksh
    print -l ${!.k02.ref} ${(!).k02.ref} ${.k02.ref}
  }
Was testing: namerefs with namespaces
K02parameter.ztst: test failed.




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