5 ms·
The number of times i realized half way that I probably posted the wrong password and so I vigorously type the 'delete' key to reset the input is too damn high
by mbesto 7mo ago
The number of times i realized half way that I probably posted the wrong password and so I vigorously type the 'delete' key to reset the input is too damn high
- larsbrinkhoff 7mo agoJust type Control-U once.
- tspng 7mo agoThat's great. I've been using terminals for 20+ years, and never new about CTRL-U. Thanks! TIL.
- larsbrinkhoff 7mo agoIt's built into the Unix terminal driver. Control-U is the default, but it can be changed with e.g. "stty kill". Libraries like readline also support it.
- eptcyka 7mo agoThe Just in that sentence is wholly unjustified. There are plenty of cli/tui/console/shell shortcuts that are incredibly useful, yet they are wholly undiscoverable and do not work cross-platform, e.g. shell motions between macOS and reasonable OSes.
- QuantumNomad_ 7mo ago> shell motions between macOS and reasonable OSes All the movement commands I know work the same in the terminal on a default install of macOS as it does in the terminal on various Linux distros I use. Ctrl+A to go to beginning of line Ctrl+E to go to end of line Esc, B to jump cursor one word backwards Esc, F to jump cursor one word forward Ctrl+W to delete backwards until beginning of word And so on Both in current versions of macOS where zsh is the default shell, and in older versions of macOS where bash was the default shell. Am I misunderstanding what you are referring to by shell motions?
- eptcyka 7mo agoYea, but ctrl + arrows to move cursor between ‘words’ don’t work, especially sad when SSH’ing in from linux. It works fine when using terminal on macOS - you just use command + arrows.
- mathfailure 7mo agoWorks fine for me. Configure your shell.
- malfist 7mo agoWhat happens when you press home or end?
- int_19h 7mo agoIn iTerm at least it goes to the beginning or end of current line.
- jorvi 7mo agoThese are emacs bindings of yore. On macOS and some Linux DEs they also work in UI text fields :)
- fer 7mo ago> e.g. shell motions between macOS and reasonable OSes. I forgot about this since I started NixOS/home-manager everywhere.
- macintux 7mo agoThe number of times I’ve attempted to use Ctrl-U in a Python shell only to discover it doesn’t work…
- fulafel 7mo agoHaven't seen this - shouldn't this always work on unixy platforms? If using readline/editline it works, and if built without it also works.
- macintux 7mo agoIt’s an internal, custom, vaguely UNIX-like shell in Windows. Typically I’m running Python from bash; Ctrl-U works under bash, but not Python.
- deleted 7mo ago[deleted]
- queenkjuul 7mo agoI only know this because of xkcd
- hilliardfarmer 7mo agoGet out of my head, lol :) But yeh, never thought this was a problem anyone else delt with. My passwords are all a variant of my on "master password" and sometimes forget which session I'm in so trying to save keystrokes, count backward to where I think the cursor should be.
- amarant 7mo agoThe number of times I've posted my sudo password in a random slack channel instead of my terminal is not very high, but too damn high nonetheless
- antod 7mo agoStart your password with a forward slash :)
- lxgr 7mo agoThe trick is to use a plausible Slack message as your sudo password :)
- Matheus28 7mo ago“I quit!” Even includes a special character
- doubled112 7mo ago"I, uhh, need your thoughts." should have fewer consequences AND be more secure.
- rkomorn 7mo agoDid you just type in your password on HN?
- dotancohen 7mo agohunter2
- asimovDev 7mo agoI have had a similar issue where I thought my computer went to sleep so I start typing my password while the monitor wakes up only to realize that it was only the screen that turned off and the computer was already unlocked so when I hit enter the password was sent into a slack thread or dm instead