Commit Graph

5 Commits

Author SHA1 Message Date
Anthony Fok
1e6fdf608f Add new BashCompSubdirsInDir annotation
This first `cd` to a specified directory, then
lists the subdirectories therein with `_filedir -d`.

This can be used by e.g. `hugo --theme=[Tab][Tab]`, which would
give a list of subdirectories under the `themes` directory.
2015-08-09 13:30:58 -06:00
Jordan Liggitt
6119fc993e Simplify setting file/extension annotations on a flag 2015-06-22 15:16:00 -04:00
Eric Paris
dff410ab56 make filename extension handling a bash function
We were trying to call a bash function with bash stuff like @ () from a
variable.  Stop that.  Just call a function with an arg from a variable
instead of trying to pass around the bash.

Should fix https://github.com/spf13/cobra/pull/103
2015-05-04 18:41:53 -04:00
Eric Paris
c3e48f996d Deprecated subcommands
They should still work, but shouldn't show up in help or usage output
2015-04-29 13:08:20 -04:00
Eric Paris
9b2e6822e5 Add bash autocompletion generator
Given a (potentially annotated) cobra command you can generate a bash
completion script.
2015-04-07 20:13:49 -04:00