summary refs log tree commit diff stats
diff options
context:
space:
mode:
authornoctuid <noct@openmailbox.org>2016-03-20 11:04:33 -0400
committernoctuid <noct@openmailbox.org>2016-03-20 11:04:33 -0400
commit081c3ab1e0fa00d6fa85f3d7d3892a79cdf13ef5 (patch)
treee6a11771576c2667d4642a4291afba62883835e2
parent7ee4b45bd2619fb07c9b139940003224bedb1de3 (diff)
downloadranger-081c3ab1e0fa00d6fa85f3d7d3892a79cdf13ef5.tar.gz
open_all_images support for pqiv
-rw-r--r--ranger/core/fm.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index 046eb788..f6792b95 100644
--- a/ranger/core/fm.py
+++ b/ranger/core/fm.py
@@ -136,7 +136,7 @@ class FM(Actions, SignalDispatcher):
 
             if self.settings.open_all_images and \
                     len(self.thisdir.marked_items) == 0 and \
-                    re.match(r'^(feh|sxiv|imv) ', command):
+                    re.match(r'^(feh|sxiv|imv|pqiv) ', command):
 
                 images = [f.relative_path for f in self.thisdir.files if f.image]
                 escaped_filenames = " ".join(shell_quote(f) \
@@ -161,6 +161,12 @@ class FM(Actions, SignalDispatcher):
                         new_command = command.replace("imv ",
                                 "imv -n %d " % number, 1)
 
+                    if command[0:5] == 'pqiv ':
+                        number = images.index(self.thisfile.relative_path)
+                        new_command = command.replace("pqiv ",
+                                "pqiv --action \"goto_file_byindex(%d)\" " % \
+                                number, 1)
+
                     if new_command:
                         command = "set -- %s; %s" % (escaped_filenames,
                                 new_command)