Module: OptionParser::Completion

Defined in:
lib/opt_parse_validator/hacks.rb

Overview

Hack to suppress the completion (except for the -h/–help) which was leading to unwanted behaviours See github.com/wpscanteam/CMSScanner/issues/2

Class Method Summary collapse

Class Method Details

.candidate(key, icase = false, pat = nil, &block) ⇒ Object

rubocop:disable Style/OptionalBooleanParameter



12
13
14
15
# File 'lib/opt_parse_validator/hacks.rb', line 12

def candidate(key, icase = false, pat = nil, &block)
  # Maybe also do this for -v/--version ?
  key == 'h' ? original_candidate('help', icase, pat, &block) : []
end

.original_candidateObject



9
# File 'lib/opt_parse_validator/hacks.rb', line 9

alias original_candidate candidate