Dear developer(s),
Thank you for creating and maintaining this wonderful piece of software!
Now for an experiment that I was performing. This is a file called printSelectionToFile.sh
:
#!/bin/bash
echo "$@" > ~/Documents/selectedFiles.txt
to simply print the received inputs to a file. In .vifmrc
I have bound the script to a file 'association':
filextype *.avi,*.mp4,*.wmv,*.dat,*.3gp,*.ogv,*.mkv,*.mpg,*.mpeg,*.vob,
\*.fl[icv],*.m2v,*.mov,*.webm,*.ts,*.mts,*.m4v,*.r[am],*.qt,*.divx,
\*.as[fx]
\ printSelectionToFile.sh %f,
and also to a key:
nnoremap <f2>q :! printSelectionToFile.sh %f<CR>
Consider the situation:
- video1.mp4 = selected,
- video2.mp4 = selected,
- video3.mp4 = under the cursor but not selected
Now when I press F2+q
I can check from the selectedFiles.txt
file that the script printSelectionToFile.sh
received as inputs video1.mp4 and video2.mp4 as expected. However, if I press the launch button (l
, right-arrow, etc) it can be verified that the script now received video3.mp4 as input. It seems like the macro %f
in the filextype association is replaced by %c
. Is this normal? From the explanation in the default .vifmrc
I would guess that also in this case the macro %f
should expand to the selection and not to the file under the cursor ...
In case it matters: My vifm version is v0.10.1 obtained from github and compiled from source and running from ubuntu 18.04.
Thank you and wkr,
Happy vifm user