Hacker News new | ask | show | jobs
by stochastic_monk 2831 days ago
del aliases[‘ls’] seems like a step back from unalias ls.
3 comments

Only if you're coming from a different shell.

For me, it's easier to remember that aliases acts like a dictionary, so I can treat it like any other dictionary. With "unalias" I have to remember the command. As I rarely use unalias (a few times over a period of years), I typically have to search the web on how to remove an alias.

And if it really bothers you, I'm pretty sure it's trivial to define an unalias function in Xonsh that will act as you expect (without needing parentheses).

It's part of the beauty of Xonsh - many such commands you're used to can be brought into it by writing fairly simple Python code.

Sure, but aliases is a real mapping object that you can access and manipulate
no the point is that if you know Python, you know how to do it without looking it up