curl-library
Re: [RFC] zsh completion for curl
Date: Fri, 8 May 2015 19:34:56 +0200
On Fri, May 08, 2015 at 11:22:42AM +0200, Daniel Stenberg wrote:
> On Thu, 7 May 2015, Alessandro Ghedini wrote:
>
> >I wrote a script that parses curl --help output and generates a zsh completion
> >file. Once curl is built one can run "./zsh.pl src/curl > _curl" and then move
> >the _curl file under "/usr/share/zsh/site-completions/" and restart a shell.
> >
> >Then "curl TAB", "curl -TAB", "curl --TAB", ... should provide help text and
> >information on the available options.
>
> Lovely! I'll merge that one asap.
>
> >The first attached patch fixes the format of the --help output
>
> We should write up a test that verifies that we maintain the correct syntax
> in the help output, so that we know scripts such as yours will keep working.
Not sure how that would look like though.
> Perhaps even provide more meta-data? I checked the
> /usr/share/bash-completion/completions/curl file in Debian. It is hand-coded
> (for all I can tell) but also does rather fancy things for some of the
> options...
Most of those options seem rather niche to warrant much work, but I guess
similar support to the bash completion can be added if someone needs it.
Another thing I want to look into is completion for --no-* options as well.
> >It is not run as part of the build process right now, but I think it'd be
> >nice to add a configure option to build and install the completion file.
>
> I'm all for that. I would prefer to not have the new script in the root dir
> though...
What about a scripts/ subdirectory? Some of the existing scripts could be moved
there too (e.g. contri*.sh, log2changes.pl).
Cheers
-------------------------------------------------------------------
List admin: http://cool.haxx.se/list/listinfo/curl-library
Etiquette: http://curl.haxx.se/mail/etiquette.html
- application/pgp-signature attachment: Digital signature