From 56570c32f2e18b86d453b0df4b583d12e9223729 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 b143762a..157b148c 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