What are your top cli tools / hacks for productivity?
Git
So, starting with git, I am a bit fan of git-extras and hub, both save a hell lot of time, while working with terminal git.
Stop repeating yourself!
There's a cool trick, if you're tired of repeating yourself. Best examples are sudo commands. How often somone type something like
$ service nginx restart
And gets a "You need sudo rights to execute dat?"
So, we type $ sudo service nginx restart again. For faster workflow we arrow up, then ctrl +a to get to the beginning of the line and type sudo. But theres even a shorter way:
$ sudo !!
The double exclamation mark will redo the last typed command.
Creating nested folders
A really cool trick that also saves a lot of time for creating nested folders via terminal:
mkdir -p parent/{child1,child2,child3}
You can also create files into this folders.
touch !!:2/{yolo.txt,swag.txt}
Navigating
I am using z to navigate to all my project folders. It basically saves all the recent folders you visit and keeps a history on how often you visit them to create a ranking. You can then simply type
$ z cool-project
and it will navigate you to $ home/User/x/projects/code/cool-project
So, what are your top cli tools, tricks and hacks?