I created a command in vifmrc for 7z:
command! mCompressA 7z a -tzip -mx=5 -mmt=8 %f.zip %f
In vifm, I select a file with space like a b.txt and it handles it properly.
Now I move the 7z command to a bash script (mCompress.sh):
7z a -tzip -mx=5 -mmt=8 $@.zip $@
and change the vifmrc to:
command! mCompressA bash mCompress.sh %f
Now, the command can not handle the same file with space a b.txt. I tried %"f and the issue still exists.
Should I do something specific when dealing with bash script?
You need to fix the script:
7z a -tzip -mx=5 -mmt=8 "$1.zip" "$1"