darktrojan / openwith

Open With add-on for Firefox
https://addons.mozilla.org/addon/open-with/
412 stars 71 forks source link

Open With doesn't support Shell Command Line Chaining Operators in Linux #269

Open antistress opened 4 years ago

antistress commented 4 years ago

Hi,

On my Debian GNU/Linux system, I can set Open With to work with that lonely command : flatpak run com.github.unrud.VideoDownloader --url %s Whereas Open With doesn't work with that double command : flatpak run --command=gsettings com.github.unrud.VideoDownloader set com.github.unrud.VideoDownloader mode video && flatpak run com.github.unrud.VideoDownloader --url %s It doesn't work either if I replace && with ; or ||

Thanks !

yjfguhd commented 3 years ago

I have not looked through the source, but it sounds like it is execing the command directly, whereas you are trying to use shell constructs in the command. Try calling a shell instead, eg.,

sh -c 'flatpak run --command=gsettings com.github.unrud.VideoDownloader set com.github.unrud.VideoDownloader mode video && flatpak run com.github.unrud.VideoDownloader --url %s'

Or, if you want to do more shell things, consider putting them into a separate shell script and calling that instead.

antistress commented 3 years ago

@yjfguhd : I'll try this, many thanks for the workaround :)