Shell ShortcutsMay 24, 2019
Getting good at using a command terminal and distancing yourself from GUIs is part of the rite of passage of becoming a programmer and has been something I’ve taken at a slow pace. Here are a few neat tricks I’ve learned when I joined Limejump.
My coworker Aaron pointed me to the neat
git lg alias that displays a coloured graphical log of the history of a repo, including fancy branching.
git config --global alias.lg "log --color --graph --pretty=format:'%Cred%h%Creset -%C(yellow)%d%Creset %s %Cgreen(%cr) %C(bold blue)<%an>%Creset' --abbrev-commit"
A few more shortcuts I’ve learned:
Ctrl+Udeletes the current line
Ctrl+Kdeletes to the right of your cursor
Ctrl+Ajumps to the beginning of the line
Ctrl+Ejumps to the end end of the line
!$substitutes as the last argument of your previous command
!!repeats your last command