X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-2.4 required=5.0 	tests=AWL,BAYES_00,SPF_PASS
X-Spam-Check-By: sourceware.org
Message-ID: <49B12714.60801@gmail.com>
Date: Fri, 06 Mar 2009 13:37:24 +0000
From: Dave Korn <dave.korn.cygwin@googlemail.com>
User-Agent: Thunderbird 2.0.0.17 (Windows/20080914)
MIME-Version: 1.0
To: cygwin@cygwin.com
Subject: Re: How can I assign a hotkey to run a cygwin/bash script?
References: <8p21r4pui1dgbl8q2ovpvcsharaburle84@4ax.com>  <49B09CE9.1060500@gmail.com> <0105D5C1E0353146B1B222348B0411A29A674ED7@NIHMLBX02.nih.gov>
In-Reply-To: <0105D5C1E0353146B1B222348B0411A29A674ED7@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

Buchbinder, Barry (NIH/NIAID) [E] wrote:
> Dave Korn wrote on Thursday, March 05, 2009 10:48 PM:
>> Hongyi Zhao wrote:
>>> Hi all,
>>>
>>> I've written a cygwin/bash script and want to run it by a customized
>>> hotkey laterly,  it this possible?
>>>
>>   Sure.  Create a windows shortcut to bash.exe, open the properties. 
>> In "Target", after C:\cygwin\bin\bash.exe, add 
>>
>>     --login -i -c "<your command here in bash syntax>"
> 
> Although I normally defer to Dave, who is far more knowledgeable in
> these things than I am, I am surprised that he suggests the -i option
> that makes bash interactive.  If the shortcut does not work the way you
> want, try dropping it.  (The scripts that I run from Windows shortcuts
> work fine with --login -c without the -i.

  Yes, I was being overenthusiastic in making sure the startup scripts run,
where --login is sufficient on its own.  However you'll still want '-i' if any
of the scripts prompt for user input, or you won't get readline.

    cheers,
      DaveK


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

