summary refs log tree commit diff stats
diff options
context:
space:
mode:
-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