Class: Bashly::Libraries::CompletionsFunction
- Inherits:
-
Base
- Object
- Base
- Bashly::Libraries::CompletionsFunction
show all
- Defined in:
- lib/bashly/libraries/completions/completions_function.rb
Instance Attribute Summary
Attributes inherited from Base
#args
Instance Method Summary
collapse
Methods inherited from Base
#initialize
Instance Method Details
#files ⇒ Object
4
5
6
7
8
9
10
11
|
# File 'lib/bashly/libraries/completions/completions_function.rb', line 4
def files
[
{
path: "#{Settings.full_lib_dir}/#{function_name}.#{Settings.partials_extension}",
content: completions_function_code(function_name),
},
]
end
|
#post_install_message ⇒ Object
13
14
15
16
17
18
19
20
21
|
# File 'lib/bashly/libraries/completions/completions_function.rb', line 13
def post_install_message
" In order to enable completions in your script, create a command or a flag (for example: g`\#{command.name} completions` or g`\#{command.name} --completions`) that calls the g`\#{function_name}` function.\n\n Your users can then run something like this to enable completions:\n\n m`$ eval \"$(\#{command.name} completions)\"`\n MESSAGE\nend\n"
|