zsh-workers
 help / color / mirror / code / Atom feed
* Absolute pathnames on cygwin
@ 2000-10-19 14:50 Andrej Borsenkow
  2000-10-20  8:06 ` Bart Schaefer
  0 siblings, 1 reply; 2+ messages in thread
From: Andrej Borsenkow @ 2000-10-19 14:50 UTC (permalink / raw)
  To: ZSH workers mailing list

mw1g017@MW1G17C% print $PWD
/cygdrive/c/win32app/bin
mw1g017@MW1G17C% cd d:/temp
mw1g017@MW1G17C% print $PWD
/cygdrive/c/win32app/bin/d:/temp

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
called.

There are possibly other places where this may cause confusion.

-andrej

Have a nice DOS!
B >>


^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2000-10-20  8:06 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2000-10-19 14:50 Absolute pathnames on cygwin Andrej Borsenkow
2000-10-20  8:06 ` Bart Schaefer

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).