Class: LSL::Completion::Mappings

Inherits:
Object
  • Object
show all
Defined in:
lib/lsl/command/completion.rb

Instance Method Summary collapse

Instance Method Details

#add(ops) ⇒ Object



50
51
52
# File 'lib/lsl/command/completion.rb', line 50

def add(ops)
  self.all << LSL::Completion::Mapping.new(ops)
end

#options(cmd) ⇒ Object



53
54
55
56
57
# File 'lib/lsl/command/completion.rb', line 53

def options(cmd)
  res = all.find { |x| x.match?(cmd) }
  return res.options if res
  LSL::Completion::Mapping.file_matcher.options
end