Tell an app created out of shell script to open a file - how?

My problem is this: i created (by appify ) a mac app. The shell scripts are totally simple:

    #!/bin/bash
/usr/local/bin/gedit&

for example.

Now, gedit starts just fine, but it does not open a file even when i tell it to do so (by right clicking, open with etc). Rather it starts an new empty document. The same happens with zathura (and pdf files). Now, what would be the right way (in macos shell) to tell the program to be aware of the file it should open?

Thanks a lot in advance for any pointer!

Hi @emninger,

Thanks for reaching out.
Your use case is not something Homebrew supports. I also feel your question isn’t really related to Homebrew so maybe it’s a better fit to post it on e. g. Ask Different.

Regards!
Claudia

Thanks for the pointer. I’ll try … :wink:

But: Isn’t it that Homebrew also deals a lot with shell cmds etc? So, my hope was, someone here would be, eventually, aware of a viable way (difference between linux and macos is big, even re the use of the shell).

For most people homebrew is the way to minimize the amount of shell scripts they have to deal with.

And since this is mostly a support forum for the usage of Homebrew (where almost all answers are given by Homebrew maintainers) I think something like stackexchange would indeed be a better place to ask.

You might consider just using Automator to wrap your simple shell script.