X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.2 required=5.0	tests=AWL,BAYES_00,DKIM_SIGNED,DKIM_VALID,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4DC2A4A1.9080905@cwilson.fastmail.fm>
Date: Thu, 05 May 2011 09:22:41 -0400
From: Charles Wilson <cygwin@cwilson.fastmail.fm>
Reply-To: Charles Wilson <cygwin@cwilson.fastmail.fm>
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 5.2; en-US; rv:1.9.2.17) Gecko/20110414 Thunderbird/3.1.10
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: Background processes prevent terminal window from closing
References: <BANLkTin2LqmSCJ8CdjSCNLTiPO8_sOknpg@mail.gmail.com> <0105D5C1E0353146B1B222348B0411A209E8030C92@NIHMLBX02.nih.gov>
In-Reply-To: <0105D5C1E0353146B1B222348B0411A209E8030C92@NIHMLBX02.nih.gov>
Content-Type: text/plain; charset=ISO-8859-1
Content-Transfer-Encoding: 7bit
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
List-Id: <cygwin.cygwin.com>
List-Subscribe: <mailto:cygwin-subscribe@cygwin.com>
List-Archive: <http://sourceware.org/ml/cygwin/>
List-Post: <mailto:cygwin@cygwin.com>
List-Help: <mailto:cygwin-help@cygwin.com>, <http://sourceware.org/ml/#faqs>
Sender: cygwin-owner@cygwin.com
Mail-Followup-To: cygwin@cygwin.com
Delivered-To: mailing list cygwin@cygwin.com

On 5/5/2011 7:38 AM, Buchbinder, Barry (NIH/NIAID) [E] wrote:
> But if you do not want to be limited file in the current working
> directory, use a function.
> 
> notepad ()
> {
>     cygstart "$(cygpath -u -W)/notepad.exe" "$(cygpath -w "$1")"
> }
> 
> You might have to change -W to -S in the first cygpath, if notepad.exe
> is in $SYSDIR but not WINDIR.  (In my instance of XP, it is in both.)

the latest (1.4.6) version of cygstart should allow the following to work:

notepad ()
{
    cygstart notepad.exe "$(cygpath -w "$1")"
}

--
Chuck

--
Problem reports:       http://cygwin.com/problems.html
FAQ:                   http://cygwin.com/faq/
Documentation:         http://cygwin.com/docs.html
Unsubscribe info:      http://cygwin.com/ml/#unsubscribe-simple

