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

Re: [PATCH] Improve extra-verbose completion of array params

On Sun, May 16, 2021 at 7:18 PM Mikael Magnusson <mikachu@xxxxxxxxx> wrote:
> On 5/16/21, Lawrence Velázquez <larryv@xxxxxxx> wrote:
> > On Sun, May 9, 2021, at 1:47 PM, Lawrence Velázquez wrote:
> >> On Tue, Apr 27, 2021, at 6:28 AM, Marlon Richert wrote:
> >> > This patch improves the extra-verbose completion display strings for
> >> > arrays and associative arrays.
> >>
> >> ping for review
> >
> > Ping II: The Sequel
> I looked at the patch but there is no description of what the intent
> is, so it is impossible for me to say if it achieves it. The code
> itself is not exactly self-explanatory...

I thought the test changes included made it rather self-explanatory:

 0:extra-verbose shows parameter values
 >line: {: $ba}{}
->NO:{bar  -- '^@' '^A' '^B' '^C' '^D' '^E' '^F' '^G' '^H' '\t' '\n'
'^K' '^L' '^M}
->NO:{baz  -- '^@ ^A ^B ^C ^D ^E ^F ^G ^H \t \n ^K ^L ^M ^N ^O ^P ^Q
^R ^S ^T ^U ^}
+>NO:{bar  -- ( '^@' '^A' '^B' '^C' '^D' '^E' '^F' '^G' '^H' '\t' '\n'
'^K' '^L' '}
+>NO:{bat  -- ( [' ']='!' ['"']='#' ['$']=% ['&']=\' ['(']=')' ['*']=+
[,]=- [.]=/}
+>NO:{bay  -- '^@ ^A ^B ^C ^D ^E ^F ^G ^H \t \n ^K ^L ^M ^N ^O ^P ^Q
^R ^S ^T ^U ^}

When using extra-verbose parameter completion, you can now clearly see
the difference between the values of scalars, arrays and associative

How about if I change the commit message? Perhaps something like this:

    Improve formatting of array values in extra-verbose parameter completion

    Make it more visually obvious which values are arrays or
associative arrays."

Would that help? I'm open to suggestions.

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