about summary refs log tree commit diff stats
path: root/ranger/gui/widgets/console.py
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2009-12-29 21:27:46 +0100
committerhut <hut@lavabit.com>2009-12-29 21:27:46 +0100
commit5715becad1ecc186408883518fa516392ebf6d55 (patch)
tree3de750d52f336cf9cc0f1b1dfa07a2acd30c2ed0 /ranger/gui/widgets/console.py
parent836e9eae3bf074ec1f3db808b23526cdca7b1323 (diff)
downloadranger-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.py11
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: