about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorWojciech Siewierski <wojciech@siewierski.eu>2020-07-05 13:23:40 +0200
committerGitHub <noreply@github.com>2020-07-05 13:23:40 +0200
commit617b736b35f09878039f49c79b517a844d405841 (patch)
treed26e97c8b53a5aa02de321110d626cf27ffa209b
parent4bb83b37819f5085596a6cd82a5010d5560a5db4 (diff)
parent2eedfe69007afac6150ddbdd47aa8ac67774d56f (diff)
downloadranger-617b736b35f09878039f49c79b517a844d405841.tar.gz
Merge pull request #2013 from toonn/silence-bulkrename
Implement passing of flags for :bulkrename
-rwxr-xr-xranger/config/commands.py8
1 files changed, 7 insertions, 1 deletions
diff --git a/ranger/config/commands.py b/ranger/config/commands.py
index 5defa677..e3b3fa82 100755
--- a/ranger/config/commands.py
+++ b/ranger/config/commands.py
@@ -1124,6 +1124,12 @@ class bulkrename(Command):
     After you close it, it will be executed.
     """
 
+    def __init__(self, *args, **kwargs):
+        super(bulkrename, self).__init__(*args, **kwargs)
+        self.flags, _ = self.parse_flags()
+        if not self.flags:
+            self.flags = "w"
+
     def execute(self):
         # pylint: disable=too-many-locals,too-many-statements,too-many-branches
         import sys
@@ -1184,7 +1190,7 @@ class bulkrename(Command):
             script_was_edited = (script_content != cmdfile.read())
 
             # Do the renaming
-            self.fm.run(['/bin/sh', cmdfile.name], flags='w')
+            self.fm.run(['/bin/sh', cmdfile.name], flags=self.flags)
 
         # Retag the files, but only if the script wasn't changed during review,
         # because only then we know which are the source and destination files.
ght .sh { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Heredoc */ .highlight .si { color: #3333bb; background-color: #fff0f0 } /* Literal.String.Interpol */ .highlight .sx { color: #22bb22; background-color: #f0fff0 } /* Literal.String.Other */ .highlight .sr { color: #008800; background-color: #fff0ff } /* Literal.String.Regex */ .highlight .s1 { color: #dd2200; background-color: #fff0f0 } /* Literal.String.Single */ .highlight .ss { color: #aa6600; background-color: #fff0f0 } /* Literal.String.Symbol */ .highlight .bp { color: #003388 } /* Name.Builtin.Pseudo */ .highlight .fm { color: #0066bb; font-weight: bold } /* Name.Function.Magic */ .highlight .vc { color: #336699 } /* Name.Variable.Class */ .highlight .vg { color: #dd7700 } /* Name.Variable.Global */ .highlight .vi { color: #3333bb } /* Name.Variable.Instance */ .highlight .vm { color: #336699 } /* Name.Variable.Magic */ .highlight .il { color: #0000DD; font-weight: bold } /* Literal.Number.Integer.Long */
#include "config.h"

#ifdef HAVE_LIBGPGME
void cmd_pgp_shows_usage_when_no_args(void **state);
void cmd_pgp_start_shows_message_when_disconnected(void **state);
void cmd_pgp_start_shows_message_when_disconnecting(void **state);
void cmd_pgp_start_shows_message_when_connecting(void **state);
void cmd_pgp_start_shows_message_when_undefined(void **state);
void cmd_pgp_start_shows_message_when_no_arg_in_console(void **state);
void cmd_pgp_start_shows_message_when_no_arg_in_muc(void **state);
void cmd_pgp_start_shows_message_when_no_arg_in_conf(void **state);
void cmd_pgp_start_shows_message_when_no_arg_in_private(void **state);
void cmd_pgp_start_shows_message_when_no_arg_in_xmlconsole(void **state);
#else
void cmd_pgp_shows_message_when_pgp_unsupported(void **state);
#endif