Hi.
I also want to push file name along with map push :rename<space>.
This does not work: map r push :rename<space>$fx. As it should not. It pushes :rename $fx.
This does work: map ro push :rename<space>$fx. But it should not. It results in a rename: filename prompt and a successful rename command on ENTER.
do you want to expand '$fx' in a push command? this is (unfortunately) not working at the moment (i supposed). maybe we should implement variable substitute in commands like push.
BTW, map ro push :rename<space>$fx doesn't work too, any key combination that start with r (in the default keymap) simply will transform into rename command, the rest of character you type will go for the file name. so that ro also doesn't work.
You can achieve this functionality using shell commands and lf -remote:
map r ${{
selname="$(basename -- "$f")"
parsed="$(printf -- "$selname" | sed 's/ /<space>/g')" # need to replace literal spaces with <space>
lf -remote "send $id push :rename<space>$parsed"
}}
Not sure why and how you would want to use $fx here, but works flawlessly with $f for me.
I'm using mmv to rename now. Felt right at home with it so I abandoned other venues. Just thought I report my findings, maybe iron out some bugs. Thanks!
Looks good! Maybe I will use it in place of the bulk-rename script from the wiki, I'm especially liking the cycle rename feature.
If you are using arch, in the 'moreutils' package, there is something called vidir. It's just a vim buffer that allows you to bulk rename all the files in a given directory. Very helpful to be able to use vim to bulk rename.
'cmd bulkrename ${{ vidir; }}'
^^^ Thats all it is.
@itmitica If it's a single file, builtin rename command should already put the filename in the prompt.