Added tab-completion for list command

1.6
Matt Nelson 2016-04-15 14:42:12 -04:00
parent 219a9825fb
commit dce67beaeb
1 changed files with 8 additions and 0 deletions

View File

@ -1180,6 +1180,14 @@ class AgentsMenu(cmd.Cmd):
mline = line.partition(' ')[2]
offs = len(mline) - len(text)
return [s[offs:] for s in names if s.startswith(mline)]
def complete_list(self, text, line, begidx, endidx):
"Tab-complete a list command"
options = ["stale"]
mline = line.partition(' ')[2]
offs = len(mline) - len(text)
return [s[offs:] for s in options if s.startswith(mline)]
def complete_kill(self, text, line, begidx, endidx):