This is the mail archive of the cygwin 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: How can I assign a hotkey to run a cygwin/bash script?


>> -----Original Message-----
>> From: cygwin-owner@cygwin.com [mailto:cygwin-owner@cygwin.com] On
Behalf
>> Of Dave Korn
>> Sent: Thursday, March 05, 2009 9:48 PM
>> To: cygwin@cygwin.com
>> Subject: Re: How can I assign a hotkey to run a cygwin/bash script?
>> 
>> 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>"
>> 
>> and you can then assign a key-combination to the shortcut (as for any
>> other
>> windows shortcut) by clicking in "Shortcut key" and typing your
>> ctrl-shift-alt-whatever combination.
>> 
>>   The "your command here part" can be any valid shell commands, or
you
>> can
>> just pass in the path to a script you want run.  (Remember to either
>> chmod +x
>> the script first, or to use the 'source' bash builtin to execute it).
>> 
>>   You'll probably want to change the "Start in" dir to your homedir
or
>> /tmp or
>> somewhere similar, depending on your needs.
>> 
>>     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/

It appears that Windows XP shortcuts have a limitation. The shortcut
must be
to a target on the desktop (or to a target in a folder on desktop).


--
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/


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