문제

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'

도움이 되었습니까?

해결책

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

다른 팁

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.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top