bash starts replacing the characters on the current line insead of moving over to the next line

Posted by Lazer on Super User See other posts from Super User or by Lazer
Published on 2011-01-08T18:07:33Z Indexed on 2011/01/08 18:55 UTC
Read the original article Hit count: 324

Filed under:
|
|
|

I use bash shell

$ bash --version
GNU bash, version 3.2.25(1)-release (x86_64-redhat-linux-gnu)
Copyright (C) 2005 Free Software Foundation, Inc.
$

Sometimes, when typing a command on the prompt that is pretty lengthy and does not fit in the current line, instead of displaying the extra characters on the next line, bash starts again on the current line.. replacing the characters that were there and making a mess.

what should happen :

|---------------------------------------------|
| $ my big long command takes a lot of argumen|
| s and does not fit in a single line         |
|                                             |
|---------------------------------------------|

what happens instead :

|---------------------------------------------|
| s and does not fit in a single linef argumen|
|                                             |
|                                             |
|---------------------------------------------|
  • The issue is intemittent
  • If I resize my shell window to really small width, normal behaviour is restored

Does anyone have any idea what is happening here?


$ echo $TERM
xterm
$ echo $PS1
\[\e[30m\][\t]\[\e[0m\]\[\e]0;\w\a\]\[\e[30m\][\W]$
$

© Super User or respective owner

Related posts about linux

Related posts about bash