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

Re: Completion script for the ctags program



Thanks for the revision.  Not a full review; just two points:

Jacob Gelbman wrote on Sun, 07 Mar 2021 19:18 +00:00:
> > On Feb 24, 2021, at 8:24 AM, Daniel Shahaf <d.s@xxxxxxxxxxxxxxxxxx> wrote:
> > Jacob Gelbman wrote on Wed, Feb 24, 2021 at 01:20:24 -0600:
> >>    "--fields=[include selected extension fields (flags afmikKlnsStz)]:flags"
> > 
> > Recommend to move the afmikKlnsStz thing to after the colon, so it'll be
> > shown at a more appropriate point.  Also, it would be helpful to display
> > descriptions to the flags using, e.g., «compset» (for the leading plus
> > sign) followed by «_values -s ''».
> 
> I moved the possible values to the argument description, but I don’t 
> have enough time to figure out how to complete them automatically right 
> now.

Like this:

_f() { _arguments : '--foo:bar: _values -s "" baz "a[access]" "f[file]" "i[inheritance]"' }

> >>  elif [ "$state" = "languages" ]; then
> >>    _values -s , languages $languages
> > 
> > Don't pass unsanitized command output to a builtin.  I don't know the
> > fix off the top of my head.

This point has been neither responded to nor implemented.

Daniel




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