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

Re: Absolute pathnames on cygwin



On Oct 19,  6:50pm, Andrej Borsenkow wrote:
}
} I believe, it makes no sense to try to recognize all possible
} forms of Windows pathnames in Zsh - rather, we should simply call
} [cygwin_conv_to_posix_path] and deal with single Unix form. The only
} problem is, when should such function be called.
}
} There are possibly other places where this may cause confusion.

There are probably a very large number of such places; think of all the
places where Clint just finished removing references to PATH_MAX.

Think of all the shell functions that manipulate paths with $x:h, $x:t,
${x#*/}, ${x%/*}, [[ $x == /* ]], etc.

The problem is only going to "go away" when the user stops referring to
Windows drives by `x:' and uses the /cygdrive form exclusively.  Otherwise
no matter how good a job zsh does of catching `x:' when it manipulates a
string it knows internally is a path name, there's a potential for strings
that it *doesn't* know are path names to become "mangled" (and then later
used as a path name, when it's too late for zsh to fix it).

This is not to say that we shouldn't try to fix e.g. `cd' to do the right
thing as often as possible, but that the general problem of nonuniform path
formats is very difficult except in a rigid UI where pathnames are never
entered except in pathname-typed input boxes.

-- 
Bart Schaefer                                 Brass Lantern Enterprises
http://www.well.com/user/barts              http://www.brasslantern.com

Zsh: http://www.zsh.org | PHPerl Project: http://phperl.sourceforge.net   



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