Ranter
Join devRant
Do all the things like
++ or -- rants, post your own rants, comment on others' rants and build your customized dev avatar
Sign Up
Pipeless API
From the creators of devRant, Pipeless lets you power real-time personalized recommendations and activity feeds using a simple API
Learn More
Comments
-
myss45285yI knew that, same as I know ctrl+s saves it from the first try, but I still like to rape the keys appereantly 😅
-
@M1sf3t I've been working with Linux/terminals for about 9 years now and I still discover 'very well known' things now and then!
(Recently alt+.) -
If you didn’t know, you might also find ctrl+w useful, for deleting the last “word”, rather than the whole line.
-
ddephor45115yI'm so happy since I discovered CTRL-r (search history), it saved me so much typing on frequent commands.
-
In zsh, you can type the begining of a command you need and use the arrow keys to search through history based on that start. Crazy useful.
-
@ddephor Reverse search seems nice unless you realize that forward search (should be Ctrl + S) is often mapped to something else in certain distros, so it's annoying when navigating too far.
Recently, I switched to fzr https://github.com/junegunn/fzf and it is a huge production boost.
Here some issues with the forward search: https://unix.stackexchange.com/a/... -
ddephor45115y@k0pernikus Backward search is ok for me. I usually search for commands I can use directly without any change, so I use the significant part as search term. Or I search for a somehow similar command and change just a part to save typing.
-
jimmy11765yNice tip!
I have memorized 'Ctrl+a, Ctrl+k' and imagine it as machine gunning down everything on the prompt. -
I find "Ctrl + p/n" useful, so you don't need to move your arm to the up/down arrow key.
-
Since a lot of people are now posting their favorite shortcuts:
Keep in mind that bash and other shells use emacs binding as a default. So search for a list of emacs bindings and see if they work on your command line. (For example, Ctr + T would swap the last two letters, fixing typos like `gti` into `git`).
Before any hardcore vi{,m} user has a heart attack not being able to bear the thought of having used emacs all along: You can safe yourself by switching to vi bindings on bash.
Related Rants
Today I discovered by myself that...
...in a shell...
...when entering a password (e.g. ssh)...
...and you make a typo... 🤦♂️
...you don't need to smack that backspace key like a maniac! You can just use the clear line shortcut: control+U (^U). This clears all input to the left of your cursor and this also works for passwords.
rant
shortcut
shell
password