delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2011/03/11/06:00:37

X-Recipient: archive-cygwin AT delorie DOT com
X-SWARE-Spam-Status: No, hits=-2.3 required=5.0 tests=AWL,BAYES_00,RCVD_IN_DNSWL_LOW
X-Spam-Check-By: sourceware.org
Message-ID: <4D7A008D.8020807@cpan.org>
Date: Fri, 11 Mar 2011 05:59:25 -0500
From: Rafael Kitover <rkitover AT cpan DOT org>
Reply-To: rkitover AT cpan DOT org
User-Agent: Mozilla/5.0 (Windows; U; Windows NT 6.1; en-US; rv:1.9.2.15) Gecko/20110303 Thunderbird/3.1.9
MIME-Version: 1.0
To: "cygwin AT cygwin DOT com" <cygwin AT cygwin DOT com>
Subject: native console apps from #!/bin/sh scripts
X-IsSubscribed: yes
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

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?

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