Module: Shh::Command::KeyCommand

Included in:
CopyKey, EditKey, ExecuteKey, LaunchKey, RemoveKey, SetKey, ShowKey
Defined in:
lib/shh/command/key_command.rb

Instance Method Summary collapse

Instance Method Details

#completion(text) ⇒ Object



10
11
12
# File 'lib/shh/command/key_command.rb', line 10

def completion text
  @entry.keys.grep(/^#{text}/).sort || []
end

#initialize(entry, io) ⇒ Object



2
3
4
# File 'lib/shh/command/key_command.rb', line 2

def initialize entry, io
  @entry, @io = entry, io
end

#usageObject



6
7
8
# File 'lib/shh/command/key_command.rb', line 6

def usage
  "<key name>"
end