For the record, see the interesting discussions on the zsh
mailing list from when that feature was added there almost
exactly 20 years ago:

https://www.zsh.org/mla/workers/2001/msg02715.html
https://www.zsh.org/mla/workers/2001/msg02716.html
https://www.zsh.org/mla/workers/2001/msg02740.html

I've personally used the feature to reorder items in sets, so
would object to precluding reusing arguments.

Things like:

$ zmodload zsh/stat
$ stat -nA array +size -- *.h
$ printf '%2$8d %1$s\n' "$array[@]"
    2385 hashtable.h
      46 patchlevel.h
    4371 prototypes.h
      94 sigcount.h
    4487 signals.h
      34 version.h
   27518 wcwidth9.h
      30 zshcurses.h
  103259 zsh.h
     503 zshpaths.h
   24287 zsh_system.h
      27 zshterm.h
     822 zshxmods.h
    3144 ztype.h

-- 
Stephane

  • Adding %n$ conversi... Robert Elz via austin-group-l at The Open Group
    • Re: Adding %n$... Oğuz via austin-group-l at The Open Group
      • Re: Adding... Joerg Schilling via austin-group-l at The Open Group
        • Re: Ad... Harald van Dijk via austin-group-l at The Open Group
          • Re... Joerg Schilling via austin-group-l at The Open Group
            • ... Harald van Dijk via austin-group-l at The Open Group
              • ... Joerg Schilling via austin-group-l at The Open Group
                • ... Harald van Dijk via austin-group-l at The Open Group
                • ... Joerg Schilling via austin-group-l at The Open Group
                • ... Harald van Dijk via austin-group-l at The Open Group
                • ... Stephane Chazelas via austin-group-l at The Open Group
                • ... Joerg Schilling via austin-group-l at The Open Group
                • ... Stephane Chazelas via austin-group-l at The Open Group
                • ... Stephane Chazelas via austin-group-l at The Open Group
                • ... Joerg Schilling via austin-group-l at The Open Group
                • ... Stephane Chazelas via austin-group-l at The Open Group
    • Re: Adding %n$... Robert Elz via austin-group-l at The Open Group
    • Re: Adding %n$... Don Cragun via austin-group-l at The Open Group
      • Re: Adding... Joerg Schilling via austin-group-l at The Open Group

Reply via email to