From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: Received: (qmail 120925 invoked by alias); 25 Aug 2017 02:23:44 -0000 Mailing-List: contact cygwin-help@cygwin.com; run by ezmlm Precedence: bulk List-Id: List-Subscribe: List-Archive: List-Post: List-Help: , Sender: cygwin-owner@cygwin.com Mail-Followup-To: cygwin@cygwin.com Received: (qmail 120915 invoked by uid 89); 25 Aug 2017 02:23:43 -0000 Authentication-Results: sourceware.org; auth=none X-Virus-Found: No X-Spam-SWARE-Status: No, score=-6.9 required=5.0 tests=BAYES_00,GIT_PATCH_2,RP_MATCHES_RCVD autolearn=ham version=3.3.2 spammy= X-HELO: Ishtar.sc.tlinx.org Received: from ishtar.tlinx.org (HELO Ishtar.sc.tlinx.org) (173.164.175.65) by sourceware.org (qpsmtpd/0.93/v0.84-503-g423c35a) with ESMTP; Fri, 25 Aug 2017 02:23:42 +0000 Received: from [192.168.3.12] (Athenae [192.168.3.12]) by Ishtar.sc.tlinx.org (8.14.7/8.14.4/SuSE Linux 0.8) with ESMTP id v7P2NcQW016099 for ; Thu, 24 Aug 2017 19:23:40 -0700 Message-ID: <599F8A2A.9080307@tlinx.org> Date: Fri, 25 Aug 2017 02:23:00 -0000 From: L A Walsh User-Agent: Thunderbird MIME-Version: 1.0 To: cygwin@cygwin.com Subject: Re: alias appears to not work inside a called bash script References: <40f2498d2efcf0f5214b476c80f9cb92@mail.kylheku.com> In-Reply-To: <40f2498d2efcf0f5214b476c80f9cb92@mail.kylheku.com> Content-Type: text/plain; charset=UTF-8; format=flowed Content-Transfer-Encoding: 7bit X-IsSubscribed: yes X-SW-Source: 2017-08/txt/msg00231.txt.bz2 Kaz Kylheku wrote: > > There is an issue there (though not for the Cygwin project). > > I don't see where ... > "expanding aliases in interactive mode, but ignoring them in > non-interactive > operation" [is required by POSIX]. > > POSIX seems to unequivocally be calling for Alias Expansion to occur > under all conditions. Could you list the http reference for that? > > And, indeed, this is not a bug in Bash; they know that this is > a POSIX deviation. Because, voila, aliases *are* expanded in > script mode if we do one of two things: > > #!/bin/bash --posix > > #!/bin/sh ---- Only in cygwin (4.4.12). In my linux version of bash, expand_aliases is not turned on in POSIX mode. Created scripts: #!/bin/sh shopt -s |grep expand and #!/bin/bash --posix shopt -s |grep expand On cygwin they show: expand_aliases on Not so on linux (same version of bash 4.4.12) Hmmm... Is there a definitive reference for this feature? Thanks! -l -- 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