I've been thinking for a while about creating a series of weekly posts containing exclusive information about the terminal, bash, vim, commands, bash script, whatever is written in the console  but for different reasons I always couldn't create it, but today I decided to do it. So here is the first entry of Terminal Friday. I hope it's useful to someone.
Editing on the command line
Many of us use the terminal in a usual way, but we are not aware of its full potential, so a couple of months ago, I took on the task of collecting the shortcuts of bash from the most usual like cleaning bash, to changing the order of the last two characters, or the order of the last two arguments.
These shortcuts are very similar to the ones you use Emacs of course this is because bash is developed by GNU but it is possible to change the settings to Vi / Vim style by typing the following command.
$ set -o saw
How to read:
C: Left Ctrl.
M: Meta, usually Left Alt.
Cx Cu: Press Ctrl and without releasing press x then u and release Ctrl.
Now I will write the few that I know:
Basic
Cb: You move back one character.
Cf: You move one character forward.
C-_ "or" Cx Cu: Undo the last edit of the command.
Cl: Clean the screen.
Cu: Delete the entered line.
DC: Cancel the current running command.
Delete
Ch: Delete one character backwards.
CD: Delete one character forward.
Ck: Delete the text from the cursor position to the end of the line.
Md: Deletes the text from the cursor position to the end of the current word.
Cw: Deletes the text from the cursor position to the beginning of the current word.
M Backspace: Deletes the text from the cursor position to the beginning of the current word.
Movement
AC: Place the cursor at the beginning of the line.
EC: Place the cursor at the end of the line.
Mf: Place the cursor one word in front.
Mb: Move the cursor one word back.
History
Cr: Search through the history.
Up and down: Browse the history.
Arguments
Ct: Change the order of the last two characters.
Esc-t: Change the order of the last two words.
Others
Tab: Auto-complete commands, routes, files, etc ...
Cy: Yank * the recently deleted text
* Yank is literally copying
Editor's note: Due to time constraints the article could not be published on Friday. We apologize for this.
