aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-15 20:26:53 +0530
committerGravatar Arun Prakash Jana <engineerarun@gmail.com>2020-03-15 20:26:53 +0530
commitea2de804f8ffa524ec62e6098b986792d1e83044 (patch)
treed479ebfd8afccf2d3be213803678762784680974 /src
parent03e6d7d553e6024d26b7ce51927c97f40e09925a (diff)
downloadnnn-ea2de804f8ffa524ec62e6098b986792d1e83044.tar.gz
batch rename: check dep, handle invalid input
Diffstat (limited to 'src')
-rw-r--r--src/nnn.c7
1 files changed, 5 insertions, 2 deletions
diff --git a/src/nnn.c b/src/nnn.c
index 1e0933e..2810e0c 100644
--- a/src/nnn.c
+++ b/src/nnn.c
@@ -431,7 +431,8 @@ static uchar g_states;
#define UTIL_FZY 16
#define UTIL_NTFY 17
#define UTIL_CBCP 18
-#define UTIL_NMV 19
+#define UTIL_BASH 19
+#define UTIL_NMV 20
/* Utilities to open files, run actions */
static char * const utils[] = {
@@ -470,6 +471,7 @@ static char * const utils[] = {
"fzy",
".ntfy",
".cbcp",
+ "bash",
".nmv",
};
@@ -5610,7 +5612,8 @@ nochange:
case SEL_RENAMEMUL:
endselection();
- if (!plugscript(utils[UTIL_NMV], newpath, path, F_CLI)
+ if (!(getutil(utils[UTIL_BASH])
+ && plugscript(utils[UTIL_NMV], newpath, path, F_CLI))
&& !batch_rename(path)) {
printwait(messages[MSG_FAILED], &presel);
goto nochange;