[Xquartz-dev] 2.3.2_rc4
Harald Hanche-Olsen
hanche at math.ntnu.no
Sun Dec 21 02:25:41 PST 2008
+ Martin Costabel <costabel at wanadoo.fr>:
> Here is my /Applications/Utilities/X11.app/Contents/MacOS/X11
> script:
>
>
> #!/bin/bash --login
> cmd="$(dirname $0)"/X11.bin
> args="${@}"
> exec -l "$SHELL" -c "exec $cmd $args"
That will break if the user moves X11.app into a place with a space
(or worse, a quote [*]) in the path. On the other hand, handling
spaces in $@ is probably not important, since we have full control
over those arguments and can just decide to avoid spaces and stuff.
But in case I am wrong about that, I don't see that your ${@} / $args
gyrations accomplish anything. You might as well put $* directly into
the command and forget about $args altogether.
[*] The vast majority of people don't move apps around, but IF they
do, you shouldn't be surprised to find them putting them in places
with names like "Joe's stuff". Ouch.
- Harald
More information about the Xquartz-dev
mailing list