~nimmi


#58 imv_current_file for images received over stdin 10 months ago

Ticket created by ~nimmi on ~exec64/imv

when opening a normal image imv image.png then $imv_current_file provides the filename which can be used in exec commands to copy an image etc. on the other hand if the image is received via stdin i.e. imv - then the $imv_current_file environment variable contains just -. Therefore all commands/bindings which rely on a filename no longer work. Is there currently a solution to that problem that i am not aware of?

If that is not the case, then i propose the following additions when running an exec command:

  • check if current image was loaded from stdin
  • check if exec command uses $imv_current_file
  • check if image was NOT already saved to a temporary file
  • if everything is true save the image data to a temporary file
  • ultimately replace $imv_current_file with the path to the temporary file
  • exec command

i am currently pretty busy but in case this is still an issue when i have time again i might try to implement it myself.