diff options
author | hut <hut@lavabit.com> | 2010-04-01 01:45:10 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-04-01 01:45:10 +0200 |
commit | d392816cd2b1143a3659da0466634ed65e5121d5 (patch) | |
tree | 5d449323e1106aaa835d8922eb4397789cb029f1 | |
parent | d6928df8e8ace9d3aac233e1074f85fe5ca5bc85 (diff) | |
download | ranger-d392816cd2b1143a3659da0466634ed65e5121d5.tar.gz |
Turn "!p<Enter>" into "!p!cat %f<Enter>" automatically
allows you to read files in a pager by simply pressing #<Enter>
-rw-r--r-- | ranger/gui/widgets/console.py | 2 |
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) |