Shell Shortcuts

May 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+U deletes the current line

  • Ctrl+K deletes to the right of your cursor

  • Ctrl+A jumps to the beginning of the line

  • Ctrl+E jumps to the end end of the line

  • !$ substitutes as the last argument of your previous command

  • !! repeats your last command

See Also

Last Updated: 2019-05-24 18:44