So I want to associate a particular 'protocol' in my Opera browser with a shell script on OSX.
In Opera, I therefore did:
- <open preferences dialog>
- Advanced Tab -> Programs
- Added 'myProtocol' and set it to open with other application '~/bin/myScript.sh'
- Applied settings etc.
Now, when I go to myProtocol://some.url.or.other, opera is calling my script. However, $* shows that the only argument passed to the script is the OSX PSN.
i.e. in the script the line
echo $0 called with $*
outputs
/Users/me/bin/myScript.sh called with -psn_0_4588640
Why is it calling it with the PSN as the cmd line? Why not the URL? On ubuntu Opera passes the URL, what's with OSX?
Can I get it to call it with the URL? Is it going to be available as a environment variable instead?