delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2014/03/01/10:52:47

X-Recipient: archive-cygwin AT delorie DOT com
DomainKey-Signature: a=rsa-sha1; c=nofws; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
q=dns; s=default; b=u0QVhAXZtbet2QXyXYsHEvqwWyIEGQR2x0WjqUN62uk
jBplUZEffcOfhwLtYi+/l0JF9mDoguA9tZWiIjPh4YKy2IvEPxIpFNeiM3gT4jWy
Nved22bkmcWYewpRfPK/vNdv+qRqKApP4pjeoYZASLAgfOOCmcyy3FuRssKgDaFY
=
DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=sourceware.org; h=list-id
:list-unsubscribe:list-subscribe:list-archive:list-post
:list-help:sender:message-id:date:from:mime-version:to:subject
:references:in-reply-to:content-type:content-transfer-encoding;
s=default; bh=cT0gWUMioiuHRTCnJ4kM8PDgQG4=; b=gx+55hx9UljZRZq7g
ogdw8lLa0W4RnPqZ/u8FRXyKDQhl1+MiHGBTRN2oSmy4XaT2r4uT15BrFshn+Yyy
XYrdgeURMohT1XZv1u5d2PKEJifMvndf/Omn0zYUfSMQk4ipSA2rWgooPoC7EVXy
607Mxtbc3hNXP09jRwrkG42VC8=
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
Authentication-Results: sourceware.org; auth=none
X-Virus-Found: No
X-Spam-SWARE-Status: No, score=0.0 required=5.0 tests=AWL,BAYES_00,FREEMAIL_FROM,FS_WITH_SMALL,RCVD_IN_DNSWL_NONE,SPF_PASS autolearn=no version=3.3.2
X-HELO: mail-qg0-f50.google.com
X-Received: by 10.224.103.129 with SMTP id k1mr2500130qao.97.1393689145633; Sat, 01 Mar 2014 07:52:25 -0800 (PST)
Message-ID: <5312023A.5040107@gmail.com>
Date: Sat, 01 Mar 2014 10:52:26 -0500
From: Max Polk <maxpolk AT gmail DOT com>
User-Agent: Mozilla/5.0 (Windows NT 6.1; WOW64; rv:24.0) Gecko/20100101 Thunderbird/24.3.0
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: Help with shortcuts
References: <239236467 DOT 6505411 DOT 1393596596199 DOT JavaMail DOT root AT ptd DOT net>
In-Reply-To: <239236467.6505411.1393596596199.JavaMail.root@ptd.net>
X-IsSubscribed: yes

On 2/28/2014 9:09 AM, mrushton wrote:
> Can some on give me a help with creating a shortcut to a shell script under Windows 7 ?
>
>
> I am doing something like this in the windows shorcut :
>
> C:\CygwinSoftware\bin\mintty.exe -i /Cygwin-Terminal.ico --exec /cygdrive/x/INBOUND/CWSCRIPTS/mymenu.sh
>
> Well I found in the documentation that when you run a script this way, it is not an interactive shell and it does not process your .bashprofile and .bashrc and all the good stuff it normally does when it logs in.  I am missing aliases when it logs in this way.
>
> How can I create a shortcut that would process my normal startup files and then run the script I what ?

 From cmd.exe you can exec bash with the login and interactive flags, 
and pass it a command like this to see all your vars:

C:\Apps\Cyg\bin\mintty.exe --exec /bin/bash --login -i -c "set && read x"

In Windows create a shortcut and simply paste the above in.

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

- Raw text -


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