Anomalocaridid / handlr-regex

Fork of handlr with support for regex
MIT License
123 stars 5 forks source link

Open multiple files inconsistency #76

Closed quite closed 1 month ago

quite commented 2 months ago

I have image/png associated with swayimg, it supports multiple files (%F in the Exec line in the desktop file). application/pdf is associated with mupdf, it does not support multiple files.

The following launches one swayimg to view a.png. a.pdf is not displayed at all (neither upon quitting swayimg):

handlr open a.png a.pdf

The following launches one swayimg to view both a.png and b.png (multiple files). a.pdf is not displayed at all (neither upon quitting swayimg):

handlr open a.png b.png a.pdf

The following launches, at the same time, one mupdf viewing a.pdf, and one swayimg viewing a.png:

handlr open a.pdf a.png

The following launches, at the same time, one mupdf viewing a.pdf, and one swayimg viewing a.png, and one swayimg viewing b.png:

handlr open a.pdf a.png b.png

--

I hopefully wrote the examples above down correctly. But the essence is probably conveyed in any case. I'm not sure exactly what behaviour I would expect, but in the least all passed files should be opened. Possibly all files on the command-line that are associated with the same handler should be opened using a single instance of that handler if it supports multiple files?

Anomalocaridid commented 2 months ago

Strange. I can certainly replicate this bug. I'll try to fix it when I have time.

I'm not sure exactly what behaviour I would expect, but in the lease all passed files should be opened. Possibly all files on the command-line that are associated with the same handler should be opened using a single instance of that handler if it supports multiple files?

This is exactly the behavior you should expect. All files associated with the same handler should be opened with a single call to that handler if it supports it.

Anomalocaridid commented 1 month ago

Should be solved in the next release. Thanks for reporting this!

quite commented 1 month ago

Nice! looking forward