Absolute file-path under bash (cygwin32)

marcus@bighorn.dr.lucent.com marcus@bighorn.dr.lucent.com
Wed Apr 16 12:06:00 GMT 1997

> > 
> > 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.
> Once per non-cygwin executable that you want to use from within bash!
> What if "ld" marked cygwin executables with some sort of magic code?
> Then bash could fix up arguments to non-cygwin executables.

Well, they are marked, but you have to look a little deeply.  If the binary
imports cygwin.dll, then it's a cygwin binary.  To find this, you have to
find the .idata section and look through a list of 5 word headers.  The
4th word of the header points to the name of the DLL to be imported.

This may not be too bad to do, particularly if this becomes a "tracked alias"
and is tagged as cygwin/!cygwin automatically.  The information for the
dozen or so programs frequently run would be cached pretty quickly.  Of
course, the cygwin executable should not expect anything from bash, because
it should run on its own from any command interpreter, but this would
interface to non-cygwin programs much nicer.

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

More information about the Cygwin mailing list