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

Re: permission denied




On 2023-04-17 14:52, Bart Schaefer wrote:

Aliases are replaced before variable substitutions occur (if that
weren't true, you couldn't refer to a variable in an alias).

So, when $chain expands to 'l' it's too late for 'l' to undergo alias expansion? Gotta think about that, no doubt there's rigor in order of operations but it seems counter intuitive here.  I'm expecting 'l' to be processed just as it would be if typed on the command line.  Mind, that's what 'eval' does.  Maybe if I thought about it a bit harder then I'd see it.  Obviously very basic stuff, not open to critique, but I'm expecting 'outside in' parsing so that an alias inside a variable and a variable inside an alias would both be fully expanded.  Still there could be very good reasons not to do that I suppose.  Probably not worth worrying about.




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