diff options
author | hut <hut@lavabit.com> | 2012-04-02 21:52:46 +0200 |
---|---|---|
committer | hut <hut@lavabit.com> | 2012-04-02 21:52:46 +0200 |
commit | 0d60aaaa981c32f86270dd5a0049e9ef8a94ec66 (patch) | |
tree | e796f4ce82dc4a7c7eb34595a936af8c5c020d63 /ranger | |
parent | 53f8129c4177194a096f4895586fe77915580daf (diff) | |
download | ranger-0d60aaaa981c32f86270dd5a0049e9ef8a94ec66.tar.gz |
core.actions: fixed dump_{commands,keybindings,settings}
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/__init__.py | 1 | ||||
-rw-r--r-- | ranger/core/actions.py | 9 |
2 files changed, 7 insertions, 3 deletions
diff --git a/ranger/__init__.py b/ranger/__init__.py index 118809c7..74bbd41b 100644 --- a/ranger/__init__.py +++ b/ranger/__init__.py @@ -22,6 +22,7 @@ RANGERDIR = os.path.dirname(__file__) TICKS_BEFORE_COLLECTING_GARBAGE = 100 TIME_BEFORE_FILE_BECOMES_GARBAGE = 1200 MACRO_DELIMITER = '%' +DEFAULT_PAGER = 'less' LOGFILE = '/tmp/ranger_errorlog' USAGE = '%prog [options] [path/filename]' STABLE = True diff --git a/ranger/core/actions.py b/ranger/core/actions.py index bb38f11d..76a9088a 100644 --- a/ranger/core/actions.py +++ b/ranger/core/actions.py @@ -909,7 +909,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): write("\n") temporary_file.flush() - self.run(app='pager', files=[File(temporary_file.name)]) + pager = os.environ.get('PAGER', ranger.DEFAULT_PAGER) + self.run([pager, temporary_file.name]) def dump_commands(self): temporary_file = tempfile.NamedTemporaryFile() @@ -931,7 +932,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): write(" :%s\n" % cmd.get_name()) temporary_file.flush() - self.run(app='pager', files=[File(temporary_file.name)]) + pager = os.environ.get('PAGER', ranger.DEFAULT_PAGER) + self.run([pager, temporary_file.name]) def dump_settings(self): from ranger.container.settingobject import ALLOWED_SETTINGS @@ -943,7 +945,8 @@ class Actions(FileManagerAware, EnvironmentAware, SettingsAware): write("%30s = %s\n" % (setting, getattr(self.settings, setting))) temporary_file.flush() - self.run(app='pager', files=[File(temporary_file.name)]) + pager = os.environ.get('PAGER', ranger.DEFAULT_PAGER) + self.run([pager, temporary_file.name]) # -------------------------- # -- File System Operations |