delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2002/08/03/17:01:40

Mailing-List: contact cygwin-help AT cygwin DOT com; run by ezmlm
List-Subscribe: <mailto:cygwin-subscribe AT cygwin DOT com>
List-Archive: <http://sources.redhat.com/ml/cygwin/>
List-Post: <mailto:cygwin AT cygwin DOT com>
List-Help: <mailto:cygwin-help AT cygwin DOT com>, <http://sources.redhat.com/ml/#faqs>
Sender: cygwin-owner AT cygwin DOT com
Mail-Followup-To: cygwin AT cygwin DOT com
Delivered-To: mailing list cygwin AT cygwin DOT com
Message-Id: <5.1.0.14.2.20020803135107.01f9a960@pop3.cris.com>
X-Sender: rrschulz AT pop3 DOT cris DOT com
Date: Sat, 03 Aug 2002 14:02:53 -0700
To: cygwin AT cygwin DOT com
From: Randall R Schulz <rrschulz AT cris DOT com>
Subject: Re: Windows Editor problem
In-Reply-To: <Pine.CYG.4.44.0208032140040.1160-100000@toos>
References: <Pine DOT WNT DOT 4 DOT 44 DOT 0208031155450 DOT 1604-100000 AT barbecueworld>
Mime-Version: 1.0

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/

- Raw text -


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