4 ms·
> And the vast majority of my aliases are only 2-3 characters. What's the point in an alias if it still takes you several seconds to type it out? Use tab/bash
by njharman 16y ago
> And the vast majority of my aliases are only 2-3 characters. What's the point in an alias if it still takes you several seconds to type it out?
Use tab/bash completion and history man! only the first couple characters need to be mostly unique.
- cullenking 16y agoTab complete does not make using long arguments any easier. Here is the example the post reminded me to alias (well, script since I need to pass it arguments): find app/views/ -name *haml -exec grep 'my_js_file.js' /dev/null '{}' \; Lots of that can be done away with.
- brentmc79 16y agoExactly.
- Tekhne 16y agoActually, bash completion DOES help with long arguments or any arguments. It's true that you have to invest the time to write a completion script tailored for the commands you're interested in, but it can definitely be worth it (e.g. git completion).
- cullenking 16y agoCool, thanks for the tip!
- njharman 16y ago> Tab complete does not make using long arguments any easier. False. See other replies. And as I said in first post history. I use aliases, they have their place. But, if you're not learning and using the entire Unix toolbox you are severely handicapping yourself.
- brentmc79 16y agoYeah, that works for some of them, but many of the aliases I use are only for the command itself, but I still have to supply args/parameters. For example, instead of "git push origin master" I use "gpo master" or even just "gpom".