class Vagrant::Util::InstallCLIAutocomplete

Install autocomplete script for supported shells

Constants

SUPPORTED_SHELLS

Public Class Methods

install(shells=[]) click to toggle source
# File lib/vagrant/util/install_cli_autocomplete.rb, line 102
def self.install(shells=[])
  shells = SUPPORTED_SHELLS.keys() if shells.empty?
  home = Dir.home
  written_paths = []
  
  shells.map do |shell|
    if SUPPORTED_SHELLS[shell]
      written_paths.push(SUPPORTED_SHELLS[shell].install(home))
    else
      raise ArgumentError, "shell must be in #{SUPPORTED_SHELLS.keys()}"
    end
  end.compact
  return written_paths
end