From d9c16e79b5a608a5e35be88f81b3c60d350a8177 Mon Sep 17 00:00:00 2001 From: The Flying Rapist Date: Tue, 13 Jan 2015 22:14:49 +0900 Subject: Modified cd command to select original file, when following links. --- ranger/config/commands.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/ranger/config/commands.py b/ranger/config/commands.py index a8813de2..7441d49f 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) -- cgit 1.4.1-2-gfad0