Email or username:

Password:

Forgot your password?
Julia Evans

Yesterday a program made my terminal’s cursor disappear! I was really surprised because programs so rarely mess up my terminal these days. (fish prevents almost all problems like this)

the problem was that it printed out "\033[?25l" to make the cursor invisible without printing out a corresponding "\033[?25h” to make it visible again

like most "my terminal is broken" problems you can fix this by running `reset` but it was VERY disorienting until I realized what had happened

screenshots:

my prompt with a visible cursor
my prompt with a invisible cursor
4 comments
Simon Tatham

@b0rk it is a bit annoying that there's nothing you can sensibly do before printing a shell prompt that resets _everything_.

The 'reset' program sends ESC c, which resets the terminal completely to its power-on state, including clearing the screen. But you don't want to clear the screen before every shell prompt. You'd like a sequence that does all of ESC c _except_ that!

So instead the shell has to think of every individual setting that might need to be reset, and likely forget one :-(

João S. O. Bueno

@b0rk i still remember the day I first met "reset". If there were an oscar nomination for cli utilities, I'd certainly name it.

Go Up