News for hackers. Stuff that matters.
Re:Ask HN: What are some terminal tricks you wish you knew s... by thisisrajat on Wednesday July 24, 2019 @05:52AM (#20513618)
- CMD + A to go to front of current line.

- CMD + E to go to end of current line.

- `sudo !!` to run last command with `sudo`

Re:Ask HN: What are some terminal tricks you wish you knew s... by GoMonad on Wednesday July 24, 2019 @11:36AM (#20516290)
Slight generalization of the first two: many emacs keybindings work in bash.
Re:Ask HN: What are some terminal tricks you wish you knew s... by znpy on Wednesday July 24, 2019 @01:23PM (#20517414)
Slight generalisation: many of the emacs keybindings work with commands whose command interpreter is built using the gnu readline library (bash is one of those).

Also, iirc the readine library cod also be switched to vin-like keybinding.

Also, a nice surprise thst i found in macOS is that come keybindings like C-a and C-e work in textboxes in macOS.