Welcome to Vifm Q&A, where you can ask questions about using Vifm. Registration is optional, anonymous posts are moderated. E-mail and GitHub logins are enabled.
0 votes
in vifm by

Hello there, I have a problem where if I want to send a list files to a command like so:

command! tag :Bg tmsu tag --tags=\"%a\" %f
nnoremap <silent> ,t :tag<space>

This is meant to tag a selection of files with a named tag. But if the file names have spaces in them, it won't work since vifm isn't escaping the spaces. How can I fix this?

Thank you!

1 Answer

0 votes
by

Hi,

Vifm does escape spaces, not sure how they would be unescaped. Maybe try these versions:

command! tag :Bg tmsu tag --tags=\"%a\" %%f
command! tag tmsu tag --tags=\"%a\" %f %i

tmsu should finish fast, so I don't know why you decided to use :Bg.

...