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

Re: odd recursion




I hope you have your reasons to tell the shell "a is b" and "a is c"
at the same time. Basically your aliasing ls two times simultaneously.



The interesting thing is that if I issue

"which lf" it tells me that lf is aliased, not that it is defined as a function. If I then issue the newly defined lf command, the function takes precedence over the alias (which is what I understood to be the expected behavior), which I can see from the error messages produced.

The problem arose because a user made the alias without checking to see that the function was defined, and that the function was written as a posix function and defined after the alias in the sequence of shell initialization.

If the alias is defined after the posix function is defined, the problem doesn't arise.



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