diff options
author | hut <hut@lavabit.com> | 2010-03-18 17:36:44 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2010-03-18 17:36:44 +0100 |
commit | 373031316ee733901a4b092e6554b7470746f004 (patch) | |
tree | 17a9a6a70ad53f664f4d8bab8c3e6b94f6fafe6b /ranger | |
parent | a3528772e7970cdd894b9f22400e9bee6a53ff29 (diff) | |
download | ranger-373031316ee733901a4b092e6554b7470746f004.tar.gz |
commands.rename: don't try to rename without argument
Diffstat (limited to 'ranger')
-rw-r--r-- | ranger/defaults/commands.py | 2 |
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 |