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

Re: real time alias?



On 15/03/18 10:57 AM, Jérémie Roquet wrote:
2018-03-15 18:51 GMT+01:00 Ray Andrews <rayandrews@xxxxxxxxxxx>:
If a function calls an alias, if the alias changes, the function must be
resourced, yes?  That makes nothing but sense sincethe alias is what it is
at sourcing.  An executed script uses the alias in 'real time'.  But, is
there a way to make a function also use the real time value of an alias?
You can use a function instead of an alias:

Sure, I was just wondering if it was possible at all with an alias. I expect not.  That's rather like asking for square circles but you don't know until you ask, there might be some option or something whereby a function is instructed to grab an alias at runtime sorta the way the value of a variable is grabbed at runtime.  It sounds like something that could be doable even it it isn't actually implemented right now.  With interpreted code I'd expect it is theoretically possible.



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