Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

Re: real time alias?

On 16/03/18 11:13 AM, Bart Schaefer wrote:
The result of expanding an alias might include parens, braces, pipes,
etc. - it can actually change the parsed syntax of the function body.
So to "grab aliases again" you have to recompile the whole body of the

Right, because it might not be a self contained block of code, it could have syntactic effects on the rest of the function.

The original (unparsed) body of the function is not stored anywhere,
so to recompile it you have to get it back from wherever it originally

I get it.  The function can't 'grab' a new version of the alias without recompiling itself which ends up being far more trouble than it's worth.  Mind, my functions do know where they came from:

    (1)TYPE: c is a shell function from /aWorking/Zsh/Source/c:

... still I get the point, the sort of thing I'm speculating about is square circles, best to leave aliases as the strings of characters that they are.

Messages sorted by: Reverse Date, Date, Thread, Author