diff options
author | Rob Austein <sra@hactrn.net> | 2010-03-11 04:29:24 +0000 |
---|---|---|
committer | Rob Austein <sra@hactrn.net> | 2010-03-11 04:29:24 +0000 |
commit | 6b6d662d5a51943adbd7d28bc497bebd2416ad0e (patch) | |
tree | 0fd510222ff6a1dfa676227cee24513b8c1a5866 /rpkid/rpki/cli.py | |
parent | 6cda9612ddf84c8f642e627c2d4c172eb6ce5bca (diff) |
Fix completion handler for help command
svn path=/rpkid/rpki/cli.py; revision=3074
Diffstat (limited to 'rpkid/rpki/cli.py')
-rw-r--r-- | rpkid/rpki/cli.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/rpkid/rpki/cli.py b/rpkid/rpki/cli.py index 38bef37a..80f8587f 100644 --- a/rpkid/rpki/cli.py +++ b/rpkid/rpki/cli.py @@ -89,6 +89,13 @@ class Cmd(cmd.Cmd): """ self.stdout.write(self.help_help.__doc__ + "\n") + def complete_help(self, text, *ignored): + names = self.get_names() + result = [] + for prefix in ("do_", "help_"): + result.extend(s[len(prefix):] for s in names if s .startswith(prefix + text)) + return result + if have_readline: def cmdloop_with_history(self): |