Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I’m not sure either. It looks more like a contrived implementation for the sake of using Rust.

P.s: functions are almost always preferable over aliases



(Heavy alias user. Why are funcions to be prefered over aliases ?)


Well my comment was actually a reference to the manual [0].

But I agree with it, because aliases are just a string substitution for interactive shells, so they are limited. I found that I often end up wanting to add additional logic (such as arguments or local variables) and to have it available for use in scripts later.

[0] https://www.gnu.org/software/bash/manual/html_node/Aliases.h...




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: