delorie.com/archives/browse.cgi   search  
Mail Archives: cygwin/2017/08/24/22:23:55

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=PRb3g+JSNysOSO915YGelG2TgAjPoKriaTbShI13qJ+
RgK7HWasYkuGYc2qpvUeTQF25YRAku/4h4KHrWekcxYKVo4PxmU61hE70c/+3FTt
3Mm1EqUa6MTv3oQH136CbqlotCHNagoEeFCaJfXNtWrLJnGwJcUjdDuDA0/1El70
=
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=rZIosje0/sQwKMJlRWCurrVaJ+M=; b=oI/G45ufpoY6y3CTU
QmS/kLW/YaeVrRzP1G/Kqca81oxcIBJJGN3wmoW+Vruj699+pTvufabY7CTkFN7Q
TxB9FwJDPzeV5l/f3SJTpSVc4nXSft3f1XDg6KilydwUMlmVQDka3J+14XvhhMub
aqjXUKLDdAHtPjKrJZzDuPHg08=
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=-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
Message-ID: <599F8A2A.9080307@tlinx.org>
Date: Thu, 24 Aug 2017 19:23:38 -0700
From: L A Walsh <cygwin AT tlinx DOT org>
User-Agent: Thunderbird
MIME-Version: 1.0
To: cygwin AT cygwin DOT com
Subject: Re: alias appears to not work inside a called bash script
References: <40f2498d2efcf0f5214b476c80f9cb92 AT mail DOT kylheku DOT com>
In-Reply-To: <40f2498d2efcf0f5214b476c80f9cb92@mail.kylheku.com>
X-IsSubscribed: yes

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

- Raw text -


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