Question

When i paste a command in to bash and hit enter, the next lines prompt contains half of the previous issued command. E.G:

host:/Users/user $ some really long command pasted in

-bash: some: command not found

host:/Users/user $ some really command pasFoo

-bash: Foo: command not found

i typed Foo at the next prompt and hit enter. You can see that it only recognized the Foo command so the visual of the previous command is 'not really there'

Was it helpful?

Solution

Does your prompt contain colors? If so, tell bash what's printable and what isn't, and it should correctly wrap your lines.

OTHER TIPS

What kind of terminal are you using? If on Windows with, say Cygwin, or MingW, I've seen this happen when the bash environment variable TERM is not set correctly.

Basically, no matter what kind of terminal you are on, the display interface to the screen (via something like curses or ncurses) is not working perfectly and there may be ways of improving it:

Sometimes, I can improve things by doing export TERM=vt100 (that has even helped me on Linux in a regular terminal window. vt100 is a very old and highly compatible terminal type.

Do an echo $TERM to see what TERM is currently.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top