Commit Graph
20 Commits
Author SHA1 Message Date
Sascha Grunert f53989457f Merge pull request #1178 from alexcb/master
bugfix: don't overwrite existing stringslice refence
2020-09-21 23:40:16 +02:00
Sascha Grunert 7742363500 Refactor '(default: …)' flag string into utility function
The usage of the `(default: …)` strings are a bit error prone so we now
refactor them into a dedicated helper function.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-03-02 13:05:45 +01:00
Sascha Grunert ca666ae167 Fix possible panics in slice type assertion
Before accessing the slices `.Value()` we should type check that it is
that actual type, otherwise we will end-up in a panic.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-22 12:30:31 +01:00
Sascha Grunert 5b3508d95e Fix man page heading formatting
Closes #1040

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2020-01-15 08:51:07 +01:00
Sascha Grunert a8fbae22ae Add codecov action
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-12-13 09:10:41 +01:00
Sascha Grunert 39ba647fbb Fix codecov reports in GitHub actions
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-12-11 09:15:53 +01:00
Sascha Grunert 41b2ed1593 Fix gofmrun for v2 manual
Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-11-23 20:14:49 -08:00
Sascha Grunert 2cb62f5091 Improve docs generation for cli.Authors
This allows specifying multiple authors, whereas no available authors
will be formatted correctly now.

Signed-off-by: Sascha Grunert <sgrunert@suse.com>
2019-11-09 11:32:34 +01:00
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