Can't get expand_aliases to take effect
- by sachmet
I can't get expand_aliases to take effect in bash. I've tried a lot of different things, and nothing works.
Here's the simple test case:
/bin/bash -c 'shopt -s expand_aliases; alias cdtmp="cd /tmp"; alias; cdtmp; pwd;'
And the output:
$ /bin/bash -c 'shopt -s expand_aliases; alias cdtmp="cd /tmp"; alias; cdtmp; pwd;'
alias cdtmp='cd /tmp'
/bin/bash: cdtmp: command not found
/home/user
$ /bin/bash --version
GNU bash, version 3.2.25(1)-release (i686-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
(Yes, I'm using shopt instead of the -O option to bash, just to prove it's being done.)
Any ideas?