you are viewing a single comment's thread
view the rest of the comments
[–] 9 points 11 months ago* (2 children)

I see everyone posting about Ctrl+R, here's a couple more useful CLI shortcuts you might enjoy:

cd - (change directory to $OLDPWD usually the previous directory)

git checkout - (similarly checkout the previous branch)

Ctrl+A (return caret to beginning of command, great when you forgot a positional argument and you were almost done typing the command)

Ctrl+E (similar to Ctrl+A but move to the end of the command)

  • source
  • hideshow 4 child comments
  • [–] 5 points 11 months ago

    Ctrl+A, Ctrl+E

    Many more basic Emacs keybindings work, actually! Including C-f, C-b, C-p and C-n (if you prefer them over arrow keys) as well as M-f and M-b to move by words, C-k, M-d and C-y for killing/yanking (but not M-w) and C-SPC, C-w, C-x C-x for region manipulation (tested in Bash and ZSH)

  • source
  • parent
  • [–] 1 point 11 months ago (2 children)

    Ctrl+L to clear the terminal screen, instead of typing clear

  • source
  • parent
  • hideshow 4 child comments