On Sat, 26 Jan 2008 23:40:02 +0000, William Pursell wrote:
An advanced bash alias expansion question --
How can I use my aliases or functions in my bash script?
PS. I even tried the following but it didn't work either:
$ bash -O expand_aliases -c '. ~/.bashrc; (rd /tmp/ttt; alias
rd; dt bin; type dt)'
The point of my previous response, which I complete failed to
make (and in fact didn't realize until after I'd sent it...)
is that your .bashrc probably includes a line of the form:
[ -z "$PS1" ] && return
So that the bashrc returns prior to defining any aliases. . .
OMG, that's EXACTLY the reason!
NEARLY THREE YEARS[1] has the question been haunting me, and you
solve it,
by identifying my culprit line via looking through a crystal ball :-).