From 358a934500f439fb6fa05d4cadb0a6995fd91b8b Mon Sep 17 00:00:00 2001 From: hut Date: Tue, 5 Oct 2010 00:31:35 +0200 Subject: defaults.commands: Fixed :cd command without argument --- ranger/defaults/commands.py | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py index d3c05023..b874c5fa 100644 --- a/ranger/defaults/commands.py +++ b/ranger/defaults/commands.py @@ -73,9 +73,8 @@ class cd(Command): def execute(self): line = parse(self.line) - try: - destination = line.rest(1) - except IndexError: + destination = line.rest(1) + if not destination: destination = '~' if destination == '-': -- cgit 1.4.1-2-gfad0