Class: Pione::Util::BashCompletion
- Inherits:
-
Completion
- Object
- Completion
- Pione::Util::BashCompletion
- Defined in:
- lib/pione/util/completion.rb
Instance Attribute Summary
Attributes inherited from Completion
#completion_command, #completion_exec, #name2, #name3
Instance Method Summary collapse
- #fun_options(cmd) ⇒ Object
- #fun_subcommands(cmd) ⇒ Object
-
#initialize ⇒ BashCompletion
constructor
A new instance of BashCompletion.
Methods inherited from Completion
compile, #context, #descendants, #toplevel_commands
Constructor Details
#initialize ⇒ BashCompletion
Returns a new instance of BashCompletion.
41 42 43 44 45 46 |
# File 'lib/pione/util/completion.rb', line 41 def initialize @completion_command = "complete" @completion_exec = "complete -F" @name2 = "${COMP_WORDS[1]}" @name3 = "${COMP_WORDS[2]}" end |
Instance Method Details
#fun_options(cmd) ⇒ Object
52 53 54 |
# File 'lib/pione/util/completion.rb', line 52 def (cmd) compreply((cmd)) end |
#fun_subcommands(cmd) ⇒ Object
48 49 50 |
# File 'lib/pione/util/completion.rb', line 48 def fun_subcommands(cmd) compreply(make_subcommands(cmd)) end |