Commit Graph
12 Commits
Author SHA1 Message Date
Sascha Grunert bac5bde38c Don't generate fish completion for hidden commands
Added the missing test case as well.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-09-11 09:09:39 +02:00
Sascha Grunert 4bbff84169 Escape single quotes in fish shell completion
Single quotes can break the generated fish shell completion and should
be escaped correctly.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-30 08:56:11 +02:00
Sascha Grunert 687f721eaa Update function alignment
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-26 10:07:50 +02:00
Sascha Grunert 0c01922a12 Add type switch
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-26 08:46:55 +02:00
Sascha Grunert a1cf7f44b6 Add TakesFile to fish shell completion
The new `TakesFile` flag will be now consumed by the fish shell
completion generator.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-25 13:58:18 +02:00
Sascha Grunert 959d9ec36b Merge branch 'master' into takes-file-not-all 2019-08-24 11:23:51 +02:00
Sascha Grunert 487c723673 Cleanup go modules
These two dependencies are not really needed, which can be
reproduced via:

```
> export GO111MODULE=on && go mod tidy
```

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-23 10:30:11 +02:00
Sascha Grunert 3681b057c5 Update TakesFile flag to apply only to supported flags
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-13 09:43:57 +02:00
Sascha Grunert c6c200864d Merge branch 'master' into takes-file 2019-08-09 13:48:36 +02:00
Sascha Grunert e9e9e0ac5d Add TakesFile indicator to flag
This new member of `Flag` indicates if the flag expects a file as input.
This is especially useful for documentation and shell completion purposes.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-09 09:10:41 +02:00
Sascha Grunert 7506b11da7 Add fish shell completion support
This commit adds a new method `ToFishCompletion` to the `*App` which can
be used to generate a fish completion string for the application.

Relates to: #351

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-09 08:58:06 +02:00
Sascha Grunert 0d79d1d9d9 Remove unused Date variable from cliTemplate
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-08-08 14:04:21 +02:00