Commit graph

6 commits

Author SHA1 Message Date
Haim Ashkenazi
991feef2f5 zsh-completion: added support for subcommand description.
Also make the template more elegant on the way...
2018-02-26 22:31:06 +02:00
Haim Ashkenazi
7091b88f98 zsh-completion ignores hidden commands and flags :) 2018-02-25 14:12:58 +02:00
Haim Ashkenazi
892ebc0721 zsh-completion fixed reference to cmd name
cmd.Use is not the command name :). Found it once I figured out
that I need to execute the command in order to fully test the
generated completion.
2018-02-25 08:20:34 +02:00
Haim Ashkenazi
3100f0b575 First try at better zsh completions:
A very basic POC. Need to refactor to generate completion
structure before passing to the template to avoid repeated
computations.

What works:
  * Real zsh completion (not built on bash)
  * Basic flags (with long flag and optional shorthand)
  * Basic filename completion indication (not with file extensions though)

What's missing:
  * File extensions to filename completions
  * Positional args
  * Do we require handling only short flags?
2018-02-24 18:53:13 +02:00
Albert Nigmatzianov
65c8acb228 Improve tests 2017-11-09 07:56:43 +01:00
bpicode
d7ba19510d Add basic zsh completion (command hierarchy only)
Partially fixes #107
See PR #497
2017-07-30 02:44:28 -06:00