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/base.rb
+11-4Lines changed: 11 additions & 4 deletions
Original file line number
Diff line number
Diff line change
@@ -5,19 +5,26 @@ module Commands
5
5
classBase < MisterBin::Command
6
6
class << self
7
7
defparam_config_path
8
-
param'CONFIG_PATH',"Path to the YAML configuration file [default: completely.yaml]\nCan also be set by an environment variable"
8
+
param'CONFIG_PATH',<<~USAGE
9
+
Path to the YAML configuration file [default: completely.yaml].
10
+
Can also be set by an environment variable.
11
+
USAGE
9
12
end
10
13
11
14
defoption_function
12
-
option'-f --function NAME','Modify the name of the function in the generated script'
15
+
option'-f --function NAME',
16
+
'Modify the name of the function in the generated script.'
13
17
end
14
18
15
19
defenvironment_config_path
16
-
environment'COMPLETELY_CONFIG_PATH','Path to a completely configuration file [default: completely.yaml]'
20
+
environment'COMPLETELY_CONFIG_PATH',
21
+
'Path to a completely configuration file [default: completely.yaml].'
17
22
end
18
23
19
24
defenvironment_debug
20
-
environment'COMPLETELY_DEBUG','It not empty, the generated script will include an additional debugging snippet that outputs the compline and current word to a text file when a completion is requested'
25
+
environment'COMPLETELY_DEBUG','If not empty, the generated script will include ' \
26
+
'an additional debugging snippet that outputs the compline and current word to ' \
Copy file name to clipboardExpand all lines: lib/completely/commands/generate.rb
+8-3Lines changed: 8 additions & 3 deletions
Original file line number
Diff line number
Diff line change
@@ -9,13 +9,18 @@ class Generate < Base
9
9
usage'completely generate (-h|--help)'
10
10
11
11
option_function
12
-
option'-w --wrap NAME','Wrap the completion script inside a function that echos the script. This is useful if you wish to embed it directly in your script'
12
+
option'-w --wrap NAME','Wrap the completion script inside a function that echos the ' \
13
+
'script. This is useful if you wish to embed it directly in your script.'
13
14
14
15
param_config_path
15
-
param'OUTPUT_PATH',"Path to the output bash script. When not provided, the name of the input file will be used with a .bash extension\nCan also be set by an environment variable"
16
+
param'OUTPUT_PATH',<<~USAGE
17
+
Path to the output bash script.
18
+
When not provided, the name of the input file will be used with a .bash extension.
19
+
Can also be set by an environment variable.
20
+
USAGE
16
21
17
22
environment_config_path
18
-
environment'COMPLETELY_OUTPUT_PATH','Path to the output bash script'
23
+
environment'COMPLETELY_OUTPUT_PATH','Path to the output bash script.'
Copy file name to clipboardExpand all lines: lib/completely/commands/test.rb
+34-15Lines changed: 34 additions & 15 deletions
Original file line number
Diff line number
Diff line change
@@ -5,36 +5,55 @@ module Commands
5
5
classTest < Base
6
6
summary'Test completions'
7
7
8
-
help'This command can be used to test that your completions script responds with the right completions. It works by reading your completely.yaml file, generating a completions script, and generating a temporary testing script.'
8
+
help'This command can be used to test that your completions script responds with ' \
9
+
'the right completions. It works by reading your completely.yaml file, generating ' \
10
+
'a completions script, and generating a temporary testing script.'
9
11
10
-
usage'completely test [--keep] COMPLINE'
12
+
usage'completely test [--keep] COMPLINE...'
11
13
usage'completely test (-h|--help)'
12
14
13
-
option'-k --keep','Keep the temporary testing script in the current directory'
15
+
option'-k --keep','Keep the temporary testing script in the current directory.'
14
16
15
-
param'COMPLINE','The command to test completions for. This will be handled as if a TAB was pressed immediately at the end of it, so the last word is considered the active cursor. If you wish to complete for the next word instead, end your command with a space.'
17
+
param'COMPLINE','One or more commands to test completions for. ' \
18
+
'This will be handled as if a TAB was pressed immediately at the end of it, ' \
19
+
'so the last word is considered the active cursor. ' \
20
+
'If you wish to complete for the next word instead, end your command with a space.'
16
21
17
22
environment_config_path
18
23
environment_debug
19
24
20
-
example'completely test "mygit pu"'
21
-
example'completely test "mygit pull "'
25
+
example'completely test "mygit "'
26
+
example'completely test --keep "mygit status "'
27
+
example'completely test "mygit status --" "mygit init "'
0 commit comments