Class: ChefCLI::ShellCompletionTemplateContext

Inherits:
Object
  • Object
show all
Includes:
Helpers
Defined in:
lib/chef-cli/command/shell_init.rb

Instance Method Summary collapse

Methods included from Helpers

#err, #fetch_chef_cli_version_pkg, #get_pkg_install_path, #get_pkg_prefix, #git_bin_dir, #git_windows_bin_dir, #habitat_chef_dke?, #habitat_env, #habitat_install?, #habitat_standalone?, #msg, #omnibus_bin_dir, #omnibus_embedded_bin_dir, #omnibus_env, #omnibus_expand_path, #omnibus_install?, #omnibus_root, #package_home, #stderr, #stdout, #system_command, #usr_bin_path, #usr_bin_prefix

Instance Method Details

#commandsObject



34
35
36
37
38
39
# File 'lib/chef-cli/command/shell_init.rb', line 34

def commands
  ChefCLI.commands_map.command_specs.inject({}) do |cmd_info, (_key, cmd_spec)|
    cmd_info[cmd_spec.name] = cmd_spec.description
    cmd_info
  end
end

#get_bindingObject



41
42
43
# File 'lib/chef-cli/command/shell_init.rb', line 41

def get_binding
  binding
end

#habitat?Boolean

Returns:



45
46
47
# File 'lib/chef-cli/command/shell_init.rb', line 45

def habitat?
  habitat_install?
end