Skip to content

Instantly share code, notes, and snippets.

@nolik
Last active February 17, 2022 14:03
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save nolik/a1d4a4db379c94904d65b0c42c93c8e6 to your computer and use it in GitHub Desktop.
Save nolik/a1d4a4db379c94904d65b0c42c93c8e6 to your computer and use it in GitHub Desktop.
  1. Reverse search of command history:

Ctrl+R

  1. Execure previous command:

!! (may use in combination with sudo: sudo !!)

  1. Trimming of line:

Ctrl+K (to the end) | Ctrl+U (to the start) | Ctrl+Y (yeld cuted part)

  1. use less -F instead tail -f

Shift+F (Follow mode) | Shift+C (navigation mode)

  1. Go to tmp editor for commands

Ctrl+x+e

  1. Argument of command

!:[argument-number] => !:2-3

The last argument of previous command

Alt+. | !$

  1. Suspend current terminal process

Ctrlz+Z | fg (to restore)

  1. Cleanup terminal

Ctrl+L (stay with history above) | restore (completelly clean up terminal sessoin)

  1. Remove word

Ctrl+w: removes last word from cursor

Alt+d: removes next word from cursor

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment