From 373031316ee733901a4b092e6554b7470746f004 Mon Sep 17 00:00:00 2001 From: hut Date: Thu, 18 Mar 2010 17:36:44 +0100 Subject: commands.rename: don't try to rename without argument --- ranger/defaults/commands.py | 2 ++ 1 file changed, 2 insertions(+) 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 ', bad=True) self.fm.rename(self.fm.env.cf, line.rest(1)) f = File(line.rest(1)) self.fm.env.cwd.pointed_obj = f -- cgit 1.4.1-2-gfad0