Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: [[ -x =command ]]

On 2007-10-20 22:06:02 +1300, Atom Smasher wrote:
> On Sat, 20 Oct 2007, Vincent Lefevre wrote:
>> If there is a space in some directory component, it will not work.
> ==============
> correct me if i'm wrong, but if there's a *nix system with a space (or 
> other *special* character) in the path of a command, i'd expect bigger 
> problems.

MacOS X. Well, the default $PATH doesn't have spaces in it, but as
spaces in directory names are very common under Mac OS X, some *PATH
variables may quickly end up with spaces in their contents. For
instance, this is the case with OpenOffice because it is installed
as "OpenOffice.org <version>.app" (with a space before the version
number). You can see that the soffice wrapper script adds its base
directory to $PATH (and other similar variables).

Of course, good scripts can take care of that, and even if I think
that space in filenames are bad under *nix systems, scripts should
be able to cope with that, at least for security reasons.

Vincent Lefèvre <vincent@xxxxxxxxxx> - Web: <http://www.vinc17.org/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.org/blog/>
Work: CR INRIA - computer arithmetic / Arenaire project (LIP, ENS-Lyon)

Messages sorted by: Reverse Date, Date, Thread, Author