Bash manual says
The first word of the replacement text is tested for aliases, but a word that is identical to an alias being expanded is not expanded a second time. This means that one may alias
ls -F, for instance, and Bash does not try to recursively expand the replacement text.
I'm trying to figure out which alias follows "identical to" in the quote,
any alias being expanded in the same sequence of alias expansion recursions, or
the alias whose expansion was first started, or
the alias whose expansion was last started.
So I create an example
$ alias a1=a2; $ alias a2=a3; $ alias a3=a4;
and want to check the alias expansion result of
a1, in the following cases
$ alias a4=a1;
$ alias a4=a2;
$ alias a4=a3;
How can I check the alias expansion result of
a1, possibly by performing alias expansion on
a1 without letting the shell going further than alias expansion?