summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-04-01 01:45:10 +0200
committerhut <hut@lavabit.com>2010-04-01 01:45:10 +0200
commitd392816cd2b1143a3659da0466634ed65e5121d5 (patch)
tree5d449323e1106aaa835d8922eb4397789cb029f1 /ranger
parentd6928df8e8ace9d3aac233e1074f85fe5ca5bc85 (diff)
downloadranger-d392816cd2b1143a3659da0466634ed65e5121d5.tar.gz
Turn "!p<Enter>" into "!p!cat %f<Enter>" automatically
allows you to read files in a pager by simply pressing #<Enter>
Diffstat (limited to 'ranger')
-rw-r--r--ranger/gui/widgets/console.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/gui/widgets/console.py b/ranger/gui/widgets/console.py
index ed121d4c..6caf9cda 100644
--- a/ranger/gui/widgets/console.py
+++ b/ranger/gui/widgets/console.py
@@ -415,6 +415,8 @@ class OpenConsole(ConsoleWithTab):
 
 	def execute(self):
 		command, flags = self._parse()
+		if not command and 'p' in flags:
+			command = 'cat %f'
 		if command:
 			if _CustomTemplate.delimiter in command:
 				command = self._substitute_metachars(command)