about summary refs log tree commit diff stats
diff options
context:
space:
mode:
-rwxr-xr-xranger/config/commands.py4
1 files changed, 3 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 07052687..43c4993f 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -520,7 +520,9 @@ class setlocal_(set_):
         if not match:
             return None
         path = match.group(1)
-        for _ in range(1 + min(1, len(path.split()))):
+        # Prepend something that behaves like "path=" in case path starts with
+        # whitespace
+        for _ in "={0}".format(path).split():
             self.shift()
         return os.path.expanduser(path)