diff options
| author | Eyal Posener <[email protected]> | 2017-05-15 19:32:59 +0300 |
|---|---|---|
| committer | Eyal Posener <[email protected]> | 2017-05-15 19:32:59 +0300 |
| commit | 096b79324eea451a70ffdf8dd3eb80097410a47f (patch) | |
| tree | dae76c1575fe5c1172ec4e9fe9c3f9550e18b922 /readme.md | |
| parent | e00c0546bc15809f7ba7c4e7a17b6be3aac56ccf (diff) | |
Add global flags for command
Fixes #24
Diffstat (limited to 'readme.md')
| -rw-r--r-- | readme.md | 13 |
1 files changed, 9 insertions, 4 deletions
@@ -85,15 +85,20 @@ func main() { // define flags of the 'run' main command Flags: complete.Flags{ - - // a flag '-h' which does not expects anything after it - "-h": complete.PredictNothing, - // a flag -o, which expects a file ending with .out after // it, the tab completion will auto complete for files matching // the given pattern. "-o": complete.PredictFiles("*.out"), }, + + // define gloabl flags of the 'run' main command + // those will show up also when a sub command was entered in the + // command line + Flags: complete.Flags{ + + // a flag '-h' which does not expects anything after it + "-h": complete.PredictNothing, + }, } // run the command completion, as part of the main() function. |
