Make batchrename interactive

This commit is contained in:
KlzXS 2021-04-30 09:40:46 +02:00 committed by Arun Prakash Jana
parent c2aeb51bcc
commit 36d86a294d
No known key found for this signature in database
GPG key ID: A75979F35C080412

View file

@ -2194,7 +2194,7 @@ static bool batch_rename(void)
bool dir = FALSE, ret = FALSE; bool dir = FALSE, ret = FALSE;
char foriginal[TMP_LEN_MAX] = {0}; char foriginal[TMP_LEN_MAX] = {0};
static const char batchrenamecmd[] = "paste -d'\n' %s %s | "SED" 'N; /^\\(.*\\)\\n\\1$/!p;d' | " static const char batchrenamecmd[] = "paste -d'\n' %s %s | "SED" 'N; /^\\(.*\\)\\n\\1$/!p;d' | "
"tr '\n' '\\0' | xargs -0 -n2 mv 2>/dev/null"; "tr '\n' '\\0' | xargs -0 -n2 sh -c 'mv -i \"$0\" \"$@\" < /dev/tty'";
char buf[sizeof(batchrenamecmd) + (PATH_MAX << 1)]; char buf[sizeof(batchrenamecmd) + (PATH_MAX << 1)];
int i = get_cur_or_sel(); int i = get_cur_or_sel();