summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorhut <hut@lavabit.com>2010-03-18 17:36:44 +0100
committerhut <hut@lavabit.com>2010-03-18 17:36:44 +0100
commit373031316ee733901a4b092e6554b7470746f004 (patch)
tree17a9a6a70ad53f664f4d8bab8c3e6b94f6fafe6b
parenta3528772e7970cdd894b9f22400e9bee6a53ff29 (diff)
downloadranger-373031316ee733901a4b092e6554b7470746f004.tar.gz
commands.rename: don't try to rename without argument
-rw-r--r--ranger/defaults/commands.py2
1 files changed, 2 insertions, 0 deletions
diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py
index dc7593a5..b1518013 100644
--- a/ranger/defaults/commands.py
+++ b/ranger/defaults/commands.py
@@ -380,6 +380,8 @@ class rename(Command):
 	def execute(self):
 		from ranger.fsobject.file import File
 		line = parse(self.line)
+		if not line.rest(1):
+			return self.fm.notify('Syntax: rename <newname>', bad=True)
 		self.fm.rename(self.fm.env.cf, line.rest(1))
 		f = File(line.rest(1))
 		self.fm.env.cwd.pointed_obj = f