From a110af2a538104dd909e4766dd1c0044b804dbdc Mon Sep 17 00:00:00 2001 From: hut Date: Sun, 15 Jan 2012 00:08:54 +0100 Subject: defaults.commands.bulkrename: support filenames starting with - --- ranger/defaults/commands.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ranger/defaults/commands.py b/ranger/defaults/commands.py index 087d9b14..da0c6735 100644 --- a/ranger/defaults/commands.py +++ b/ranger/defaults/commands.py @@ -801,11 +801,11 @@ class bulkrename(Command): cmdfile.write(b"# This file will be executed when you close the editor.\n") cmdfile.write(b"# Please double-check everything, clear the file to abort.\n") if py3: - cmdfile.write("\n".join("mv -vi " + esc(old) + " " + esc(new) \ + cmdfile.write("\n".join("mv -vi -- " + esc(old) + " " + esc(new) \ for old, new in zip(filenames, new_filenames) \ if old != new).encode("utf-8")) else: - cmdfile.write("\n".join("mv -vi " + esc(old) + " " + esc(new) \ + cmdfile.write("\n".join("mv -vi -- " + esc(old) + " " + esc(new) \ for old, new in zip(filenames, new_filenames) if old != new)) cmdfile.flush() self.fm.execute_file([File(cmdfile.name)], app='editor') -- cgit 1.4.1-2-gfad0