Is there an undocumented PS variable like PS2 that bash would show when it replaces a word designator into its actual value? I think it would help clarify where the command ends and where the execution begins.
Example: I run an ls and a cat. cat uses the last argument of the previous command with a word designator, !$
. bash replaces the word designator with the actual value in a new line and then will output the command:
> ll .bash_profile
-rw-r--r--. 1 ec2-user ec2-user 176 Dec 22 2015 .bash_profile
> cat !$
cat .bash_profile
# .bash_profile
# Get the aliases and functions
[...]
To make it clearer, what I ask for is a variable that would insert a text before the replacement takes place, something like
> export MISSING_VARIABLE='--->'
> ll .bash_profile
-rw-r--r--. 1 ec2-user ec2-user 176 Dec 22 2015 .bash_profile
> cat !$
--->cat .bash_profile
[...]