3 ms·
I used to have a bunch of over-complicated aliases, but due to their limitations, I now use a mix of aliases and functions, with a few scripts in ~/bin. It’s al
by rootbear 2y ago
I used to have a bunch of over-complicated aliases, but due to their limitations, I now use a mix of aliases and functions, with a few scripts in ~/bin. It’s all a matter of using the right tool. I use aliases for simple things, like default options on some commands. Things that need to happen in the current shell, but are too complex for an alias, are functions. That leaves extra-complex things that I don’t want to write a shell function for as programs in ~/bin, which can be shell, or python, or whatever.
- JamesSwift 2y agoYeah, I guess me and the author just have different opinions on it. I do the same as you: start with an alias, use a function if its more complicated, and only use scripts for things that are closer to programs in complexity/length. Using this model over the past ~10 years I have ~50/50 split of aliases/functions and only a few scripts.