# File lib/hammer_cli/completer.rb, line 71 def complete(line) line = CompleterLine.new(line) # get the last command on the line cmd, remaining = find_last_cmd(line) opt, value = option_to_complete(cmd, remaining) if opt return complete_attribute(opt, value) else param, value = param_to_complete(cmd, remaining) if param if remaining.complete? return complete_attribute(param, value) + complete_command(cmd, remaining) else return complete_attribute(param, value) end else return complete_command(cmd, remaining) end end end