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

Absolute pathnames on cygwin

mw1g017@MW1G17C% print $PWD
mw1g017@MW1G17C% cd d:/temp
mw1g017@MW1G17C% print $PWD

The reason is obvious - Zsh does not understand that d:/temp is the absolute
path. The solution is not.

Simply adding test for `x:/' in cd_do_chdir did not work. Even if it would
prevent concatenation, it would leave pathname as d:/temp that may cause
problems in the future.

Current cygwin has a "superroot" notion to present Windows drives in Unix-like
tree form. By default it is `/cygdrive' prefix; /cygdrive/x refers to drive x.
There is a set of routines, notably cygwin_conv_to_posix_path, that are used
to convert all filenames to standard Unix-like form.

I believe, it makes no sense to try to recognize all possible forms of Windows
pathnames in Zsh - rather, we should simply call the above function and deal
with single Unix form. The only problem is, when should such function be

There are possibly other places where this may cause confusion.


Have a nice DOS!
B >>

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