Class: VagrantPlugins::DevCommands::InternalCommand::CompletionData
- Inherits:
-
Object
- Object
- VagrantPlugins::DevCommands::InternalCommand::CompletionData
- Defined in:
- lib/vagrant/devcommands/internal_command/completion_data.rb
Overview
Internal “completion-data” command
Instance Method Summary collapse
- #execute(argv) ⇒ Object
-
#initialize(env, registry) ⇒ CompletionData
constructor
A new instance of CompletionData.
Constructor Details
#initialize(env, registry) ⇒ CompletionData
Returns a new instance of CompletionData.
8 9 10 11 |
# File 'lib/vagrant/devcommands/internal_command/completion_data.rb', line 8 def initialize(env, registry) @env = env @registry = registry end |
Instance Method Details
#execute(argv) ⇒ Object
13 14 15 16 17 18 19 20 21 22 23 24 25 |
# File 'lib/vagrant/devcommands/internal_command/completion_data.rb', line 13 def execute(argv) return if @registry.commands.empty? command = VagrantPlugins::DevCommands::Util.argv_command(argv, @env) compdata = if command.nil? command_completion else argument_completion(command) end @env.ui.info(compdata, new_line: false) end |