Recognize name of Alias calling another Alias? - 20/12/19 02:03 AM
Sorry for the confusing thread title. Ran out of space.
I need an alias to recognize either the name of the alias calling it, or the filepath of the alias calling it.
For example:
Running alias customA would result in an echo of "customA wants to say test-text"
Optionally, I could use $isalias(customA).fname to get customA's filepath. So in essence, as an alternative, I could use "$isalias($nameOfCallingAlias).fname".
What I need to know is... can I do that? Is there a non-fictional identifier to replace my mythological $nameOfCallingAlias ?
I need an alias to recognize either the name of the alias calling it, or the filepath of the alias calling it.
For example:
Code
alias customA { customB test-text } alias customB { echo -a $nameOfCallingAlias wants to say $1- }
Running alias customA would result in an echo of "customA wants to say test-text"
Optionally, I could use $isalias(customA).fname to get customA's filepath. So in essence, as an alternative, I could use "$isalias($nameOfCallingAlias).fname".
What I need to know is... can I do that? Is there a non-fictional identifier to replace my mythological $nameOfCallingAlias ?