Can't use var-held alias as pipe command:
$ alias alias_tst alias alias_tst=echo
ChkCmd=alias_tst ls *.rpm | $ChkCmd -bash: alias_tst: command not found
$ alias ls='ls --color=auto '
$ alias dir='ls -lF '
$ alias alias dir='ls -lF ' alias ls='ls --color=auto '
— alias ls in alias dir is not expanded.
$ lf(){ dir "$@" | grep -v '^[dl]' ;}
$ type lf lf is a function lf () { ls --color=auto -lF "$@" | grep -v '^[dl]' }
— alias dir in function lf is fully expanded.
documented on: 1999.12.03 Fri 14:12:03