Skip to content
This repository has been archived by the owner on Dec 28, 2022. It is now read-only.

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

Open
antistress opened this issue May 7, 2020 · 2 comments

Comments

@antistress
Copy link

antistress commented May 7, 2020

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
Copy link

yjfguhd commented Dec 6, 2020

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
Copy link
Author

antistress commented Dec 6, 2020

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

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants