| delorie.com/archives/browse.cgi | search |
| X-Recipient: | archive-cygwin AT delorie DOT 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: | <49B09CE9.1060500@gmail.com> |
| Date: | Fri, 06 Mar 2009 03:47:53 +0000 |
| From: | Dave Korn <dave DOT korn DOT cygwin AT googlemail DOT com> |
| User-Agent: | Thunderbird 2.0.0.17 (Windows/20080914) |
| MIME-Version: | 1.0 |
| To: | cygwin AT cygwin DOT com |
| Subject: | Re: How can I assign a hotkey to run a cygwin/bash script? |
| References: | <8p21r4pui1dgbl8q2ovpvcsharaburle84 AT 4ax DOT com> |
| In-Reply-To: | <8p21r4pui1dgbl8q2ovpvcsharaburle84@4ax.com> |
| Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
| List-Id: | <cygwin.cygwin.com> |
| List-Subscribe: | <mailto:cygwin-subscribe AT cygwin DOT com> |
| List-Archive: | <http://sourceware.org/ml/cygwin/> |
| List-Post: | <mailto:cygwin AT cygwin DOT com> |
| List-Help: | <mailto:cygwin-help AT cygwin DOT com>, <http://sourceware.org/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 |
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/
| webmaster | delorie software privacy |
| Copyright © 2019 by DJ Delorie | Updated Jul 2019 |