bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: 'shopt -s expand_aliases' problem [resend]


From: Chet Ramey
Subject: Re: 'shopt -s expand_aliases' problem [resend]
Date: Wed, 29 Nov 2000 13:23:35 -0500

> Machine Type: sparc-sun-solaris2.5.1
> 
> Bash Version: 2.04
> Patch Level: 0
> Release Status: release
> 
> Description:
> 
> I'm trying to emulate ksh's exported aliases and I'm having a problem
> with 'shopt -s expand_aliases':  it doesn't seem to stay on between my
> BASH_ENV file and my script.
> 
> Repeat-By:
> 
> For example, given these two files:
> 
> $HOME/my_bash_env:
> echo Welcome to my_bash_env
> echo This is bash $BASH_VERSION
> shopt -s expand_aliases
> shopt expand_aliases
> echo
> 
> ./my_script:
> #!/usr/local/bin/bash
> echo Welcome to my_script
> shopt expand_aliases
> 
> Then
> 
> BASH_ENV=$HOME/my_bash_env ./my_script
> 
> Produces this:
> 
> Welcome to my_bash_env
> This is bash 2.04.0(1)-release
> expand_aliases  on
> 
> Welcome to my_script
> expand_aliases  off
> 
> How did expand_aliases get turned off?  Is it a bash bug?

Yes, an overzealous attempt to initialize a non-interactive shell.  It's
been fixed for the next version.

-- 
``The lyf so short, the craft so long to lerne.'' - Chaucer
( ``Discere est Dolere'' -- chet)

Chet Ramey, CWRU    chet@po.CWRU.Edu    http://cnswww.cns.cwru.edu/~chet/



reply via email to

[Prev in Thread] Current Thread [Next in Thread]