From: jeffdb@netzone.com ("Mikey")
Subject: Re: Absolute file-path under bash (cygwin32)
15 Apr 1997 23:57:47 -0700
Approved: cygnus.gnu-win32@cygnus.com
Distribution: cygnus
Message-ID: <199704152224.PAA16775.cygnus.gnu-win32@nz1.netzone.com>
Mime-Version: 1.0
Content-Type: multipart/mixed; boundary="----=_NextPart_000_01BC49AE.59B802E0"
Content-Transfer-Encoding: 7bit
Original-To: "Paul Prescod" <papresco@calum.csclub.uwaterloo.ca>
Original-Cc: "cygnus" <gnu-win32@cygnus.com>
X-MSMail-Priority: Normal
X-Priority: 3
X-Mailer: Microsoft Internet Mail 4.70.1155
Original-Sender: owner-gnu-win32@cygnus.com

This is a multi-part message in MIME format.

------=_NextPart_000_01BC49AE.59B802E0
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit

Not from bash.

vim(){
vim.exe `dospwd.sh $*`
}

try that,it's a little slow ;^), but I think it will work, and you only
have to set it up once, in .bashrc.

If you're really interested, there is a patch available from 
http://wwwdim.uqac.uquebec.ca/ftp/pub
that will allow you to rebuild the dll.
for ncurses/elvis :^(not vim) which is what I use.


> Wade Richards wrote:
> > 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.
> 
> I find this to be a hassle also, because it requires you to constantly
> think which apps are cygwin32 and which are DOS. Is there a way to tell
> bash to turn a cygwin path into a DOS path?
> 
>  Paul Prescod

------=_NextPart_000_01BC49AE.59B802E0
Content-Type: application/octet-stream; name="dospwd.sh"
Content-Transfer-Encoding: 7bit
Content-Description: dospwd.sh (SH File)
Content-Disposition: attachment; filename="dospwd.sh"

#!/bin/sh
usage(){
echo $0 /u**x/path/[prog]... returns c:\\dos\\path\\[prog]...
exit 1
}
if [ x"$1" = x"" ];then usage;fi

for name in $*;do
  if [ -d $1 ];then
	pushd $1 2>/dev/null 1>/dev/null
	echo -n "`command.com /c cd|tr -d [:cntrl:]` "
	popd 2>/dev/null 1>/dev/null
  elif [ -f $1 ];then
	pushd `dirname $1` 2>/dev/null 1>/dev/null
	echo -n "`command.com /c cd|tr -d [:cntrl:]`\\`basename $1` "
	popd 2>/dev/null 1>/dev/null
  else
	usage
	exit 0
  fi
  shift
done
echo


------=_NextPart_000_01BC49AE.59B802E0--

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