diff options
author | hut <hut@lavabit.com> | 2013-01-10 04:13:37 +0100 |
---|---|---|
committer | hut <hut@lavabit.com> | 2013-01-10 04:13:37 +0100 |
commit | 84fd3feabf235c6d86984f050955916d17456d47 (patch) | |
tree | 2a44f14b7da302b77595275fa5d669731166c9db | |
parent | 5fe2923748e32e4d8d17d93d98987152c6adbff4 (diff) | |
download | ranger-84fd3feabf235c6d86984f050955916d17456d47.tar.gz |
config.commands: Throw error when running :delete w/ arguments
-rw-r--r-- | ranger/config/commands.py | 10 |
1 files changed, 3 insertions, 7 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py index 330920cf..b283a71b 100644 --- a/ranger/config/commands.py +++ b/ranger/config/commands.py @@ -500,13 +500,9 @@ class delete(Command): allow_abbrev = False def execute(self): - lastword = self.arg(-1) - - if lastword.startswith('y'): - # user confirmed deletion! - return self.fm.delete() - elif self.line.startswith(DELETE_WARNING): - # user did not confirm deletion + if self.rest(1): + self.fm.notify("Error: delete takes no arguments! It deletes " + "the selected file(s).", bad=True) return cwd = self.fm.thisdir |