summary refs log tree commit diff stats
path: root/ranger
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-10-05 00:31:35 +0200
committerhut <hut@lavabit.com>2010-10-10 02:51:31 +0200
commit358a934500f439fb6fa05d4cadb0a6995fd91b8b (patch)
tree8aa87724f5306d8477aaed63dc742293b3451c17 /ranger
parent52cf9f19b3738d42878cb35f4eb88a6f0775ea89 (diff)
downloadranger-358a934500f439fb6fa05d4cadb0a6995fd91b8b.tar.gz
defaults.commands: Fixed :cd command without argument
Diffstat (limited to 'ranger')
-rw-r--r--ranger/defaults/commands.py5
1 files 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 == '-':