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

Re: Compiled files ignore aliases



On Feb 5,  6:24pm, Sebastian Gniazdowski wrote:
}
} Yes I thought about it and it's reasonable, though unsymmetrical. Zwc
} changes things, there isn't full symmetry when sourcing file already
} parsed or not, but see *. The "reasonable" is that parsing probably
} does lookup each word in a hash table to see if there is an alias for
} it. Compiling means skipping that time consuming process.

By analogy, "alias" in shell is more like "#define" in C.  Once you've
compiled, the macro expansion is already done and doesn't happen again.

You can intentionally trigger alias expansion by using "eval", which is
(in this analogy) re-compiling at run time.



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