summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-04-16 12:54:57 +0200
committerhut <hut@lepus.uberspace.de>2015-04-16 12:54:57 +0200
commitbababd8cd4259e90f20ab7dccde3de27cde8dcf6 (patch)
tree203b05c77a2ae637adcd9c80055d78af16955d46
parent668b2a1dfcd1bfe6437aa65ffea75e7f82feb9fe (diff)
downloadranger-bababd8cd4259e90f20ab7dccde3de27cde8dcf6.tar.gz
core.runner: fix `:shell $SHELL` not working with fish
This fixes #300 and was caused by #187 (25dcff6)
-rw-r--r--ranger/core/runner.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/ranger/core/runner.py b/ranger/core/runner.py
index 713f8027..0e5d9fa3 100644
--- a/ranger/core/runner.py
+++ b/ranger/core/runner.py
@@ -142,9 +142,12 @@ class Runner(object):
 
         if 'shell' not in popen_kws:
             popen_kws['shell'] = isinstance(action, str)
+
+        # Set default shell for Popen
         if popen_kws['shell']:
-            # Set default shell for Popen
-            popen_kws['executable'] = os.environ['SHELL']
+            # This doesn't work with fish, see #300
+            if os.environ['SHELL'] != 'fish':
+                popen_kws['executable'] = os.environ['SHELL']
 
         if 'stdout' not in popen_kws:
             popen_kws['stdout'] = sys.stdout