diff options
author | Florent Le Coz <louiz@louiz.org> | 2011-02-10 16:13:28 +0100 |
---|---|---|
committer | Florent Le Coz <louiz@louiz.org> | 2011-02-10 16:13:28 +0100 |
commit | ffcf65ec4323613deff7c6fa7f92843d58879e41 (patch) | |
tree | cec3a2f6a24423e278978331d951abc7c09b6649 /src/core.py | |
parent | ad7e9b749d509ccbb1c1676491e86b7b812b0298 (diff) | |
download | poezio-ffcf65ec4323613deff7c6fa7f92843d58879e41.tar.gz poezio-ffcf65ec4323613deff7c6fa7f92843d58879e41.tar.bz2 poezio-ffcf65ec4323613deff7c6fa7f92843d58879e41.tar.xz poezio-ffcf65ec4323613deff7c6fa7f92843d58879e41.zip |
/help completion
Diffstat (limited to 'src/core.py')
-rw-r--r-- | src/core.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/src/core.py b/src/core.py index ae3bc55b..91b427a7 100644 --- a/src/core.py +++ b/src/core.py @@ -115,7 +115,7 @@ class Core(object): # The completion function should return True if a completion was # made ; False otherwise self.commands = { - 'help': (self.command_help, '\_o< KOIN KOIN KOIN', None), + 'help': (self.command_help, '\_o< KOIN KOIN KOIN', self.completion_help), 'join': (self.command_join, _("Usage: /join [room_name][@server][/nick] [password]\nJoin: Join the specified room. You can specify a nickname after a slash (/). If no nickname is specified, you will use the default_nick in the configuration file. You can omit the room name: you will then join the room you\'re looking at (useful if you were kicked). You can also provide a room_name without specifying a server, the server of the room you're currently in will be used. You can also provide a password to join the room.\nExamples:\n/join room@server.tld\n/join room@server.tld/John\n/join room2\n/join /me_again\n/join\n/join room@server.tld/my_nick password\n/join / password"), self.completion_join), 'exit': (self.command_quit, _("Usage: /exit\nExit: Just disconnect from the server and exit poezio."), None), 'next': (self.rotate_rooms_right, _("Usage: /next\nNext: Go to the next room."), None), @@ -1003,6 +1003,10 @@ class Core(object): msg = _('Unknown command: %s') % args[0] self.information(msg) + def completion_help(self, the_input): + commands = list(self.commands.keys()) + list(self.current_tab().commands.keys()) + return the_input.auto_completion(commands, ' ') + def command_status(self, arg): args = arg.split() if len(args) < 1: |