0

Wondering if anyone else has seen this and has a solution:

  1. Context: Cygwin on Windows 7, ssh into Ubutntu 16.04.6
  2. Spend some time in the shell, so your command history has something in it.
  3. press Up Arrow to see previous commands
  4. press Home (or left arrow repeatedly) to get to the beginning of the line

RESULT: the cursor won't go all the way to the beginning of the line. It'll stop about 10 chars short and won't let you go any farther. For example: [prompt text]$ ls /somedir/anotherdir/ Instead of the cursor going to the space before "ls", it only goes to the "t" in "somesdir" It's impossible to go back further to the beginning of the command (end of the prompt).

EXPECT: Home takes the cursor to just left of the "l" in "ls"

Thanks to anyone who has a solution!

0

If you just want to 'fix' the prompt, type reset. It'll reset the prompt back to normal for you.

As to what's happening it appears to be normally caused by a long command in your history, overflowing the current line causing a weirdly formatted prompt. I'm sure this isn't the only way to have this occur, as I've had amusing situations where the prompt wouldn't show any characters, instead showing the prompt immediately upon anything being entered. -- https://unix.stackexchange.com/questions/105958/terminal-prompt-not-wrapping-correctly explains it better than I can.

| improve this answer | |
  • Thanks, @djsmiley2k, appreciate the help. You got no characters!? That's pretty bad. I've had long commands cause the problem and long commands not cause the problem - it's intermittent. Same for you? .... And, any way around it? e.g., it's a bummer to have to retype the long commands from scratch.... – DanH Sep 3 '19 at 18:27

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.