curl-library
Re: [RFC] zsh completion for curl
Date: Fri, 8 May 2015 11:22:42 +0200 (CEST)
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.
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...
> 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...
-- / daniel.haxx.se ------------------------------------------------------------------- List admin: http://cool.haxx.se/list/listinfo/curl-library Etiquette: http://curl.haxx.se/mail/etiquette.htmlReceived on 2015-05-08