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

2011-02-21 Thread Linda Walsh
BTW, thanks much for an overlooked, and elegant solution! Bob Proulx wrote: Linda Walsh wrote: 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 t

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

2011-02-14 Thread Linda Walsh
Dennis Williamson wrote: On Mon, Feb 14, 2011 at 12:34 PM, Linda Walsh wrote: (My 'PUBLIC's are short for: alias PUB_CONST="typeset -xr" alias PUBLIC="typeset -x" � � � ##aka EXPORT Why not just do export _prompt_open="" Except that it's not likely that those variables need to be exporte

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

2011-02-14 Thread Dennis Williamson
On Mon, Feb 14, 2011 at 12:34 PM, Linda Walsh wrote: > > For completeness current code (haven't fixed the DISPLAY part yet): > > if [ -n "$_sh_interactive_shell" ] ; then       shopt -s cdspell checkhash > checkwinsize cmdhist dotglob extglob         shopt -s histappend > hostcomplete lithist >  

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

2011-02-14 Thread Linda Walsh
For completeness current code (haven't fixed the DISPLAY part yet): if [ -n "$_sh_interactive_shell" ] ; then shopt -s cdspell checkhash checkwinsize cmdhist dotglob extglob shopt -s histappend hostcomplete lithist shopt -s no_empty_cmd_completion xpg_echo # build a prompt #

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

2011-02-14 Thread Linda Walsh
Bob Proulx wrote: Linda Walsh wrote: But anyway, something else is is awry. Now my root prompt, instead of being red, looks like: "\[\033[1m\]\[\033[31m\]Ishtar:root#\[\033[0m\] " ;-/ That will be due to incorrect quoting. Which suggestion did you implement? There were several. What v

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

2011-02-14 Thread Bob Proulx
Greg Wooledge wrote: > red=$(tput setaf 1) bold=$(tput bold) reset=$(tput sgr0) > PS1='\[$red\]\h\[$reset\]:\[$bold\]\w\[$reset\]\$ ' > > I tested that. It works. Nicely cleaned up! > PS1='\h:\w\$ ' For what it is worth I use something similar: PS1='\u@\h:\w\$ ' Bob

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

2011-02-14 Thread Greg Wooledge
On Sun, Feb 13, 2011 at 08:17:05PM -0700, Bob Proulx wrote: >_CRed=$(tput setaf 1) #Red >_CRST=$(tput sgr0) #Reset >_CBLD=$(tput bold) #Bold >_prompt_open="" >_prompt_close="" >_prompt=">" >[[ $UID -eq 0 ]] && { >_prompt_open="$_CBLD$_CRed" >_prompt_

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

2011-02-13 Thread Bob Proulx
Linda Walsh wrote: > But anyway, something else is is awry. > > Now my root prompt, instead of being red, looks like: > > "\[\033[1m\]\[\033[31m\]Ishtar:root#\[\033[0m\] " > > ;-/ That will be due to incorrect quoting. Which suggestion did you implement? There were several. > What version of

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

2011-02-13 Thread Linda Walsh
Bob Proulx wrote: Linda Walsh wrote: Thanks for all the great suggestions on how to do the encoding differently -- how about ideas on the input line length being truncated? You seem to have misunderstood. --- Actually, I saw the two rewrites first as they were sent via Personal mail and li

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

2011-02-13 Thread Bob Proulx
Linda Walsh wrote: > Thanks for all the great suggestions on how to do the > encoding differently -- how about ideas on the input line > length being truncated? You seem to have misunderstood. Each and every one of those response has addressed your issue of input line length problems. The soluti

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

2011-02-13 Thread Linda Walsh
Thanks for all the great suggestions on how to do the encoding differently -- how about ideas on the input line length being truncated? ;-) Andreas Schwab wrote: Dennis Williamson writes: _CRed='\[\033[31m\]' #Red _CRST='\[\033[0m\]' #Reset _CBLD='\[\033[1m\]' #Bold _CRed="\\[$(tput s

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

2011-02-13 Thread Andreas Schwab
Dennis Williamson writes: > _CRed='\[\033[31m\]'  #Red > _CRST='\[\033[0m\]'  #Reset > _CBLD='\[\033[1m\]'  #Bold _CRed="\\[$(tput setaf 1)\\]" _CRST="\\[$(tput sgr0)\\]" _CBLD="\\[$(tput bold)\\]" Andreas. -- Andreas Schwab, sch...@linux-m68k.org GPG Key fingerprint = 58CA 54C7 6D53 942B 175

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

2011-02-13 Thread Dennis Williamson
On Sun, Feb 13, 2011 at 3:50 PM, Linda Walsh wrote: > 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

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

2011-02-13 Thread Bob Proulx
Linda Walsh wrote: > 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. It sounds like you have forgotten to enclose non-printing cha