You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: lib/completely/commands/generate.rb
+18-5Lines changed: 18 additions & 5 deletions
Original file line number
Diff line number
Diff line change
@@ -3,7 +3,7 @@
3
3
moduleCompletely
4
4
moduleCommands
5
5
classGenerate < Base
6
-
help'Generate the bash completion script to a file'
6
+
help'Generate the bash completion script to file or stdout'
7
7
8
8
usage'completely generate [CONFIG_PATH OUTPUT_PATH --function NAME --wrap NAME]'
9
9
usage'completely generate (-h|--help)'
@@ -12,10 +12,19 @@ class Generate < Base
12
12
option'-w --wrap NAME','Wrap the completion script inside a function that echos the ' \
13
13
'script. This is useful if you wish to embed it directly in your script.'
14
14
15
-
param_config_path
15
+
param'CONFIG_PATH',<<~USAGE
16
+
Path to the YAML configuration file [default: completely.yaml].
17
+
Use '-' to read from stdin.
18
+
19
+
Can also be set by an environment variable.
20
+
USAGE
21
+
16
22
param'OUTPUT_PATH',<<~USAGE
17
23
Path to the output bash script.
18
-
When not provided, the name of the input file will be used with a .bash extension.
24
+
Use '-' for stdout.
25
+
26
+
When not provided, the name of the input file will be used with a .bash extension, unless the input is stdin - in this case the default will be to output to stdout.
0 commit comments