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

Hi,

I have created a command to convert a selected PNG file to JPG and it works:

command! convertPngInJpg mogrify -format jpg %f

How to delete the PNG file after processing ?

I 've tried:

command! convertPngInJpg mogrify -format jpg %f | rm %f

without success ... does rm need special syntax in the vifmrc file?

thx

1 Answer

0 votes
by

Hi,

That's a shell command, so chain commands as in a shell:

command! convertPngInJpg mogrify -format jpg %f && rm %f
by

@xaizek nice ! thank you so much

...