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,DKIM_SIGNED,DKIM_VALID,DKIM_VALID_AU,FREEMAIL_FROM,RCVD_IN_DNSWL_LOW,T_TO_NO_BRKTS_FREEMAIL |
X-Spam-Check-By: | sourceware.org |
MIME-Version: | 1.0 |
In-Reply-To: | <ildfdu$iip$1@dough.gmane.org> |
References: | <4D7A008D DOT 8020807 AT cpan DOT org> <ildfdu$iip$1 AT dough DOT gmane DOT org> |
Date: | Fri, 11 Mar 2011 16:46:12 +0100 |
Message-ID: | <AANLkTi=ccJoEjSHqzGK_vGOML+jZsashkSthWzW8BE95@mail.gmail.com> |
Subject: | Re: native console apps from #!/bin/sh scripts |
From: | David Sastre <d DOT sastre DOT medina AT gmail DOT com> |
To: | cygwin AT cygwin DOT com |
X-IsSubscribed: | yes |
Mailing-List: | contact cygwin-help AT cygwin DOT com; run by ezmlm |
List-Id: | <cygwin.cygwin.com> |
List-Unsubscribe: | <mailto:cygwin-unsubscribe-archive-cygwin=delorie DOT com AT cygwin DOT 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 |
2011/3/11, Andrew DeFaria wrote: > 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? Not tested, but try explicitly enabling readline support with rlwrap: #!/bin/sh TERM=dumb rlwrap /c/Perl/bin/perl -MCPAN -e shell -- 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
webmaster | delorie software privacy |
Copyright © 2019 by DJ Delorie | Updated Jul 2019 |