override complete() to change the behaviour of Cmd completion

This commit is contained in:
Romain Bignon 2010-09-24 13:56:24 -04:00
commit 0eba4302a5
4 changed files with 34 additions and 17 deletions

View file

@ -55,6 +55,9 @@ class Videoob(ReplApplication):
self.format(video)
self.flush()
def complete_nsfw(self, text, line, begidx, endidx):
return ['on', 'off']
def do_nsfw(self, line):
"""
nsfw [on | off]