How can I swap (as in alias) command names in zsh?
If I try
$ alias pwd=echo
$ alias echo=pwd
I get
$ pwd
/home/owen
$ echo hi
hi
It seems aliases are followed recursively. Perhaps if there was a way to
stop the recursion, that would work. In this example I can use builtin,
but that won't work in general, particular for -g aliases.
No comments:
Post a Comment