[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.]
Hello,
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'
-DCONF_VENDOR='sun' -DSHELL -DHAVE_CONFIG_H -DSunOS5 -I. -I.
-I./include -I./lib -I/usr/local/include -g -O2
uname output: SunOS threeofsolaris 5.6 Generic_105181-22 sun4u sparc
SUNW,Ultra-5_10
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?
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.
Thanks.
Sent via Deja.com http://www.deja.com/
Before you buy.
- 'shopt -s expand_aliases' problem [resend],
scott douglass <=