about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lepus.uberspace.de>2015-01-17 06:07:05 +0100
committerhut <hut@lepus.uberspace.de>2015-01-17 06:07:05 +0100
commit6977b6821ff20cd8e6fe04ed6ca9efa5d5ff210d (patch)
treee50387141fe0f961d38aa1a37e69d32b501f07f9
parentc32f82dbf0792766a8d1084324c1b94d8990aa36 (diff)
parentd9c16e79b5a608a5e35be88f81b3c60d350a8177 (diff)
downloadranger-6977b6821ff20cd8e6fe04ed6ca9efa5d5ff210d.tar.gz
Merge branch 'cd-select_file' of https://github.com/NoSuck/ranger into cd-select_file
-rw-r--r--ranger/config/commands.py3
1 files changed, 2 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index ba7d51d3..32f5da8c 100644
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -107,7 +107,8 @@ class cd(Command):
             self.shift()
             destination = os.path.realpath(self.rest(1))
             if os.path.isfile(destination):
-                destination = os.path.dirname(destination)
+                self.fm.select_file(destination)
+                return
         else:
             destination = self.rest(1)