summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-11-14 03:19:17 +0100
committerhut <hut@lepus.uberspace.de>2015-11-14 03:19:17 +0100
commit4f2fd2d44922acab709fc388ffcabe2f4d754cf1 (patch)
tree762004d178da86c0afa79e5ce5ffc27f0f500cd0
parentbdd6bf407ab22782f7ddb3a1dd24ffd9c3361a8d (diff)
parenta9f6a0db59535455739a671e9db9abc2f06051bf (diff)
downloadranger-4f2fd2d44922acab709fc388ffcabe2f4d754cf1.tar.gz
Merge branch 'imv' of https://github.com/autrimpo/ranger
-rw-r--r--ranger/core/fm.py7
1 files changed, 6 insertions, 1 deletions
diff --git a/ranger/core/fm.py b/ranger/core/fm.py
index 0313639a..046eb788 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) ', command):
+                    re.match(r'^(feh|sxiv|imv) ', command):
 
                 images = [f.relative_path for f in self.thisdir.files if f.image]
                 escaped_filenames = " ".join(shell_quote(f) \
@@ -156,6 +156,11 @@ class FM(Actions, SignalDispatcher):
                             "feh --start-at %s " % \
                             shell_quote(self.thisfile.relative_path), 1)
 
+                    if command[0:4] == 'imv ':
+                        number = images.index(self.thisfile.relative_path) + 1
+                        new_command = command.replace("imv ",
+                                "imv -n %d " % number, 1)
+
                     if new_command:
                         command = "set -- %s; %s" % (escaped_filenames,
                                 new_command)