Sha256: fd2f5b6eb3ccdce8f0ec82722c77396ef828a1cdf3fc16611921791a2c12c7ed

Contents?: true

Size: 972 Bytes

Versions: 97

Compression:

Stored size: 972 Bytes

Contents

require 'fileutils'

module Fastlane
  # Enable tab auto completion
  class AutoComplete
    def self.execute
      fastlane_conf_dir = "~/.fastlane"
      confirm = UI.confirm "This will copy a shell script into #{fastlane_conf_dir} that provides the command tab completion. Sound good?"
      return unless confirm

      # create the ~/.fastlane directory
      fastlane_conf_dir = File.expand_path fastlane_conf_dir
      FileUtils.mkdir_p fastlane_conf_dir

      # then copy all of the completions files into it from the gem
      completion_script_path = File.join(Fastlane::ROOT, 'lib', 'assets', 'completions')
      FileUtils.cp_r completion_script_path, fastlane_conf_dir

      UI.success "Copied! To use auto complete for fastlane, add the following line to your favorite rc file (e.g. ~/.bashrc)"
      UI.important "  . ~/.fastlane/completions/completion.sh"
      UI.success "Don't forget to source that file in your current shell! 🐚"
    end
  end
end

Version data entries

97 entries across 97 versions & 1 rubygems

Version Path
fastlane-2.24.0.beta.20170327010009 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.24.0.beta.20170326010023 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.24.0.beta.20170325010032 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.23.0 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.23.0.beta.20170322010036 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.22.0 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.22.0.beta.20170321010023 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.21.0 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.21.0.beta.20170320010043 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.21.0.beta.20170319010027 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.21.0.beta.20170318010107 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.21.0.beta.20170317010039 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.21.0.beta.20170316010039 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0.beta.20170315010053 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0.beta.20170314010029 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0.beta.20170313010048 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0.beta.20170312010035 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0.beta.20170311010030 fastlane/lib/fastlane/auto_complete.rb
fastlane-2.20.0.beta.20170310010058 fastlane/lib/fastlane/auto_complete.rb