Submit Hint Search The Forums LinksStatsPollsHeadlinesRSS
14,000 hints and counting!


Click here to return to the 'Extend the power of 'open -a'' hint
The following comments are owned by whoever posted them. This site is not responsible for what they say.
Extend the power of 'open -a'
Authored by: jonbauman on Jun 25, '04 01:26:18PM

You're missing half of the point of the script. This version does not honor the argument text edit. The idea behind the script was that I was always forgetting which application names had spaces and which didn't, so I made the script first try with spaces, then try with the spaces collapsed. That way, I can just always type spaces, and it works either way.

As for using "$*" instead of "$@", it's intentional. The former gives all the arguments as one string and the latter as multiple strings. I need them as one string to do the removal of the spaces with "${command// /}". Because "$*" is special, "${*// /}" does not work.

Was there any other weirdness?

---

jon

[ Reply to This | # ]