delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/1997/04/14/23:30:44

From: wrichard AT direct DOT ca (Wade Richards)
Subject: Re: Absolute file-path under bash (cygwin32)
14 Apr 1997 23:30:44 -0700 :
Approved: cygnus DOT gnu-win32 AT cygnus DOT com
Distribution: cygnus
Message-ID: <1.5.4.32.19970415050517.006afe58.cygnus.gnu-win32@mail.direct.ca>
Mime-Version: 1.0
X-Sender: wrichard AT mail DOT direct DOT ca
X-Mailer: Windows Eudora Light Version 1.5.4 (32)
Original-To: hcd AT studbox DOT uni-stuttgart DOT de
Original-Cc: gnu-win32 AT cygnus DOT com
Original-Sender: owner-gnu-win32 AT cygnus DOT com

At 18:55 14/04/97 +0200, you wrote:
}Hi,
}[...]
}- All drives on my PC are 'mounted' under corresponding mount-points (D:
}under /d, E: under /e and so on).
}- If I use file expansion after entering such a command like 'vim'
}beginning with a mount point for a drive (like /d), the file expansion
}worked well, so that I get a whole absolute file-path like
}"/d/directory/filename", which points to an exist file. The editor says
}however, it is editing a new file. The window title was changed to
}"VIM - e:\d\directory\filename". Drive "e:" was added curiously before
}the absolute file-path.
}- There is no problem for a cygwin32-command like 'cat' in the same
}situation.
}[...]

You are experiencing this problem because normal (not cygwin32) programs do
not understand cygwin32 mount tables.  When you type "cat
/d/directory/filename", then "cat.exe" (which is a cygwin32 program) looks
in the special cygnus mount table to see that "/d" is mapped to d:\, and it
opens the file "d:\directory\filename".  On the other hand, when you type
"vim /d/directory/filename", vim.exe (which isn't part of cygwin32) doesn't
know about the cygwin32 mount table, so it tries to open the file
"/d/directory/filename" on the current drive (is this case it happens to be
e:.  Thus, it tries to open "e:\d\directory\filename".

There isn't any easy solution to this problem.  You can either type the
DOS-style path that vim requires, or "cd" to the directory in bash, and then
edit the file with no path at all.

        --- Wade
----------
Wade Richards    -= WRichard AT Direct DOT CA =- 
"Never attribute to malice what can adequately be explained by stupidity."

-
For help on using this list (especially unsubscribing), send a message to
"gnu-win32-request AT cygnus DOT com" with one line of text: "help".

- Raw text -


  webmaster     delorie software   privacy  
  Copyright © 2019   by DJ Delorie     Updated Jul 2019