From: cgf AT bbc DOT com (Chris Faylor) Subject: Re: cygnus bugs 14 Jul 1997 12:37:52 -0700 Approved: cygnus DOT gnu-win32 AT cygnus DOT com Distribution: cygnus Message-ID: References: <199707121921 DOT JAA02783 AT haleakala DOT aloha DOT net> <33c8f0a3 DOT 1384462 AT world DOT std DOT com> <199707140254 DOT MAA02915 AT mundook DOT cs DOT mu DOT OZ DOT AU> <33C9D7BB DOT 6D8F AT wgn DOT net> Reply-To: cgf AT bbc DOT com X-Newsreader: trn 4.0-test57 (27 Apr 97) Original-To: gnu-win32 AT cygnus DOT com X-Mailer: Perl5 Mail::Internet v1.28 Original-Sender: owner-gnu-win32 AT cygnus DOT com In article <33C9D7BB DOT 6D8F AT wgn DOT net>, $Bill Luebkert wrote: >Fergus Henderson wrote: >> >> franl AT world DOT std DOT omit-this DOT com (Francis Litterio) writes: >> >> >[Fergus Henderson wrote:] >> > >> >> Tim Newsham writes: >> >> >> >> >- cygwin does not properly transform command line path names across >> >> > mount points. If I am on drive "D:" and type "vi /tmp/foo", >> >> > I end up editing "D:\tmp\foo" and not "C:\tmp\foo" even though >> >> > "/tmp" is on "C:". (vi is not compiled with cygwin). >> >> > Cygwin should transform the path to "C:\tmp\foo" for the benefit >> >> > of non-cygwin applications. >> >> >> >> How can cygwin know which arguments are pathnames and which are >> >> just ordinary strings that should not be transformed in this manner? >> > >> >Cygwin can know because the strings that are pathnames are passed to >> >open(), [...] >> >> No, in the case that Tim Newsham was referring to, "vi is not compiled >> with cygwin", and so the strings that are pathnames are not passed >> to cygwin's open(). > >Maybe what he wants is for bash to transform the paths that >fall on mountpoints. This seems fairly trivial. > >The mountpoints could be cached for speed, and the args could be >parsed to see if any of them fall on a mounted filesystem. >Not so tough. :) > >The path could then be converted to native filesystem coordinates. >I assume this would be windows specific code (possibly others). > >One big advantage is that bash could then run a lot of non- >cygwin apps with no problem. I like it. :) Unless I'm missing something, this still doesn't deal the point that Sergey raised. How is bash supposed to know which argument is a filename? His example was something like: grep /tmp/foo /bar/file Should /tmp/foo be translated to 'c:\tmp\foo' here? I don't think so. There is no way that bash should automatically translate things for the user. That would be decidedly "un-UNIX". Someone else has suggested something like: vi() { /usr/bin/vi `cyg_to_native $*` } I think that is the only feasible alternative. -- http://www.bbc.com/ cgf AT bbc DOT com "Strange how unreal VMS=>UNIX Solutions Boston Business Computing the real can be." - 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".