This is the mail archive of the cygwin@cygwin.com mailing list for the Cygwin project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]
Other format: [Raw text]

Re: Windows Editor problem


Raphael,

Given all the wailing and gnashing of teeth over spaces in path names of late, might I suggest this variation on your TextPad invocation script:

-==-
#!/bin/sh
exec c:/Textpad/TextPad.exe "`cygpath -w $1`"
-==-

It might be nice to remove the assumption (while retaining a default) about where TextPad is installed (on my system, it's the D: drive, e.g.):

-==-
TEXTPAD_EXE="${TEXTPAD_EXE:=C:/TextPad/TextPad.exe}"
exec "$TEXTPAD_EXE" "`cygpath -w $1`"
-==-

Alternately:

-==-
TEXTPAD_EXE="${TEXTPAD_EXE:=$SYSTEMDRIVE/TextPad/TextPad.exe}"
exec "$TEXTPAD_EXE" "`cygpath -w $1`"
-==-

One could get fancier, of course, using "test" to verify that the named executable exists and issue a suitable diagnostic if it does not, handle multiple file names.

Randall Schulz
Mountain View, CA USA


At 13:46 2002-08-03, Raphael wrote:
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

On Sat, 3 Aug 2002, Michael Hoffman wrote:

> If you want to set EDITOR perhaps you could make a shell script which does
> the cygpathing.

Thanks again and here is the resulting scriptfile:

#!/bin/sh
c:/Textpad/TextPad.exe `cygpath -w $1`

I named it CygTextPad and put it in /usr/bin

Now you can edit your profile file and add

EDITOR="/bin/CygTextPad"

Runs like a dream. Anyone who wants to try it should take care of the
TextPad pathname though. Make sure it reflects your setup.

Raphael

--
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple
Bug reporting:         http://cygwin.com/bugs.html
Documentation:         http://cygwin.com/docs.html
FAQ:                   http://cygwin.com/faq/


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]