diff options
author | hut <hut@lavabit.com> | 2009-12-29 21:27:46 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2009-12-29 21:27:46 +0100 |
commit | 5715becad1ecc186408883518fa516392ebf6d55 (patch) | |
tree | 3de750d52f336cf9cc0f1b1dfa07a2acd30c2ed0 /ranger/gui/widgets/console.py | |
parent | 836e9eae3bf074ec1f3db808b23526cdca7b1323 (diff) | |
download | ranger-5715becad1ecc186408883518fa516392ebf6d55.tar.gz |
F1 key (inside console) for viewing information about the command
Diffstat (limited to 'ranger/gui/widgets/console.py')
-rw-r--r-- | ranger/gui/widgets/console.py | 11 |
1 files changed, 8 insertions, 3 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py index db92908b..22b9831d 100644 --- a/ranger/gui/widgets/console.py +++ b/ranger/gui/widgets/console.py @@ -245,17 +245,22 @@ class CommandConsole(ConsoleWithTab): Console.execute(self) def _get_cmd(self): + command_class = self._get_cmd_class() + if command_class: + return command_class(self.line, self.mode) + else: + return None + + def _get_cmd_class(self): try: command_name = self.line.split()[0] except IndexError: return None try: - command_class = commands.by_name[command_name] + return commands.by_name[command_name] except KeyError: return None - - return command_class(self.line, self.mode) def _get_tab(self): if ' ' in self.line: |