X-Recipient: archive-cygwin@delorie.com
X-SWARE-Spam-Status: No, hits=-1.9 required=5.0	tests=BAYES_00,SPF_HELO_PASS,T_RP_MATCHES_RCVD
X-Spam-Check-By: sourceware.org
To: cygwin@cygwin.com
From: Andrew DeFaria <Andrew@DeFaria.com>
Subject: Re: native console apps from #!/bin/sh scripts
Date: Fri, 11 Mar 2011 07:34:22 -0800
Lines: 26
Message-ID: <ildfdu$iip$1@dough.gmane.org>
References: <4D7A008D.8020807@cpan.org>
Mime-Version: 1.0
Content-Type: text/plain; charset=ISO-8859-1; format=flowed
Content-Transfer-Encoding: 7bit
User-Agent: Mozilla/5.0 (X11; U; Linux x86_64; en-US; rv:1.9.2.15pre) Gecko/20110207 Lightning/1.0b2 Shredder/3.1.9pre
In-Reply-To: <4D7A008D.8020807@cpan.org>
X-IsSubscribed: yes
Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm
Precedence: bulk
List-Id: <cygwin.cygwin.com>
List-Unsubscribe: <mailto:cygwin-unsubscribe-archive-cygwin=delorie.com@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 03/11/11 02:59, Rafael Kitover wrote:
> I can run native console apps from a console in a cygwin shell fine,
> however, for some reason they don't work correctly from a #!/bin/sh script.
>
> E.g., for activestate perl:
>
> TERM=dumb /c/Perl/bin/perl -MCPAN -e shell
>
> run from zsh prompt works correctly with readline support.
>
> Now if I put that in a script:
>
> #!/bin/sh
>
> TERM=dumb /c/Perl/bin/perl -MCPAN -e shell
>
> then when I run the script the readline support is disabled for some reason.
>
> What are differences in environment in a script as opposed to the
> regular prompt that would cause this? And is there a workaround?
>
> Does it have something to do with STDIN redirection away from the console?
Have you tried using Cygwin's Perl instead of ActiveState?
-- 
Andrew DeFaria <http://defaria.com>
If Webster wrote the first dictionary, where did he find the words?


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

