bug-bash
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

how to workaroun 'nl' being added to input-line after 49 characters....


From: Linda Walsh
Subject: how to workaroun 'nl' being added to input-line after 49 characters....
Date: Sun, 13 Feb 2011 13:50:58 -0800
User-agent: Mozilla/5.0 (Windows; U; Windows NT 6.0; en-US; rv:1.8.1.24) Thunderbird/2.0.0.24 Mnenhy/0.7.6.666

I'm having a problem, I think,  due to my setting the prompt in
'root' mode, to a different color.  This results in me being able to
enter only 49 characters on the input line before it wraps to the next
line.

I add an open and close sequence to the normal prompt (which has no
weird problems with changing the input line length):


   #specific to linux console compat emulations
   _CRed="$(echo -en "\033[31m")"  #Red
   _CRST="$(echo -en "\033[0m")"   #Reset
   _CBLD="$(echo -en "\033[1m")"   #Bold
   export _prompt_open=""
   export _prompt_close=">"
   [[ $UID -eq 0 ]] && {
       _prompt_open="$_CBLD$_CRed"
       _prompt_close="#$_CRST"
   }
   export PS1='${_prompt_open}$(spwd "$PWD")${_prompt_close} ';

Is there some easy way to tell bash either to not keep track of what it thinks is the screen width (and just allow it to wrap, if that's possible), or to reset bash's idea of where it thinks it is on the line?

Thanks!
Linda





reply via email to

[Prev in Thread] Current Thread [Next in Thread]