Method: Codebuild::Completer#options_completion

Defined in:
lib/codebuild/completer.rb

#options_completionObject



139
140
141
142
143
144
145
146
147
148
149
150
# File 'lib/codebuild/completer.rb', line 139

def options_completion
  used = ARGV.select { |a| a.include?('--') } # so we can remove used options

  method_options = @command_class.all_commands[@current_command].options.keys
  class_options = @command_class.class_options.keys

  all_options = method_options + class_options + ['help']

  all_options.map! { |o| "--#{o.to_s.gsub('_','-')}" }
  filtered_options = all_options - used
  filtered_options.uniq
end