14 if (($?)); then
i'm using this PROMPT_COMMAND to set PS1 everytime it is played, it seems to work perfectly except later i found a strange behavior of the terminal, both in xterm under X and agetty under the console. for example, when under the console, i found the terminal column indicated by the bash variable $COLUMNS is 160, however, when i type some command about 50 characters long, the line which i'm typing wraps to the begining, and destroys what i typed earlier, this makes typing long commands really difficult...and everything is just fine when i just set the PS1 variable to a very simple value without escape sequences.
anyone knows how to fix this?