3 ms·
I've been using the ~. shortcut for a while, but somehow escaped learning about the help menu. Another neat thing I noticed while playing with it just now: the
by andrewflnr 8mo ago
I've been using the ~. shortcut for a while, but somehow escaped learning about the help menu.
Another neat thing I noticed while playing with it just now: there's an option to enter ~ twice to send a literal ~, but usually you don't have to do this when typing something like 'ls ~' in a regular session. Not only does the ~ have to be the first character on a line to start an escape sequence, but typing on a line, backspacing all the way to the start and then typing ~ also sends a literal tilde. It only triggers the escape sequence if the ~ is the chronologically first character after a newline (or first in the session), which is an unlikely thing to type into a shell in a normal session. Good choice of UI, both the character and the state machine.
- computerfriend 8mo agoThe drawback is that if you think your session is hanging and want to bail with ~., you have to press enter, which might actually make it to the server and execute something.
- bandie91 8mo agomany get used to Ctrl-U, Return, ~, period keystroke sequence for this.
- aragilar 8mo agoFor those of us in today's 10000, Ctrl-U is the default readline shortcut for unix-line-discard (see https://www.gnu.org/software/bash/manual/html_node/Commands-For-Killing.html#index-unix_002dline_002ddiscard-_0028C_002du_0029 https://www.gnu.org/software/bash/manual/html_node/Commands-... and https://susam.net/unix-line-discard.html https://susam.net/unix-line-discard.html).
- bandie91 8mo ago> typing on a line, backspacing all the way to the start and then typing ~ also sends a literal tilde for the younger readers, yes, because in terminal echo mode, "backspacing" does not clear your terminal line buffer, those characters backspaced are already sent on the line. if you ever seen a misconfigured terminal, it hints what's going on, like: user@host$ ls ~/^?^?^?^?^?~/a.out ^? is backspace's control char. that is ssh watches what you type, not what is on the screen (terminal).
- layer8 8mo agoSometimes it’s ^H. You can use `stty -a` to inspect the current setting (backspace is what’s called “erase” there).