pqiv icon indicating copy to clipboard operation
pqiv copied to clipboard

MONTAGE : List of marked files not passed to command in new terminal

Open youpilai opened this issue 1 year ago • 2 comments
trafficstars

Hi,

I tried to set a key binding to rename multiples files from montage mode. I'd like to use mmv to that purpose, so i thought i needed to execute a command in a new terminal to do that (mmv is using $EDITOR, in my case Kakoune) so i tried :

@MONTAGE { rn { command(-foot mmv) rm {command(-foot sh -c "mmv") }

but it seems that the parameters (list of marked files) are not passed to mmv... I tried all kind of syntax combination around these two with no luck

Note : "rn { command(foot mmv $1)" is working, but in montage mode "$1" is the image from where the montage mode was launched, not the current highlighted image (but it's another subject)

Is there a way to make it working ? Thanks

youpilai avatar Jun 01 '24 14:06 youpilai

With - the list is sent to the standard input of the command, iirc, so try prepending xargs

phillipberndt avatar Jun 01 '24 16:06 phillipberndt

Nice, it worked ;) Thanks for the quick reply

Is there a way to refresh the montage mode after that ? with the option "watch-directories=1", i have both old named images and new named images in the montage. i tried to add "montage_mode_return_proceed();montage_mode_enter()" and it's not working, but if done manually it works (exit montage, enter montage)

(without the option "watch-directories=1", the renamed images disappear from the montage, as expected)

Anyway, thanks again

youpilai avatar Jun 01 '24 18:06 youpilai