[Top][All Lists]

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

'shopt -s expand_aliases' problem [resend]

From: scott douglass
Subject: 'shopt -s expand_aliases' problem [resend]
Date: Fri, 24 Nov 2000 09:40:23 GMT

[The first two attempts at posting this didn't seem to propagate.  My
apologies if you see this twice.]


Configuration Information [Automatically generated, do not change]:
Machine: sparc
OS: solaris2.5.1
Compiler: gcc
Compilation CFLAGS:  -DPROGRAM='bash' -DCONF_HOSTTYPE='sparc'
-DCONF_OSTYPE='solaris2.5.1' -DCONF_MACHTYPE='sparc-sun-solaris2.5.1'
-I./include -I./lib -I/usr/local/include -g -O2
uname output: SunOS threeofsolaris 5.6 Generic_105181-22 sun4u sparc
Machine Type: sparc-sun-solaris2.5.1

Bash Version: 2.04
Patch Level: 0
Release Status: release


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.


For example, given these two files:

echo Welcome to my_bash_env
echo This is bash $BASH_VERSION
shopt -s expand_aliases
shopt expand_aliases

echo Welcome to my_script
shopt expand_aliases


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?

I've looked in bashref.info, the bash FAQ and Deja -- but I didn't find
an answer.

Any aliases I set in my BASH_ENV file are still set but they don't
expand since expand_aliases is off.


Sent via Deja.com http://www.deja.com/
Before you buy.

reply via email to

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