screen-users
[Top][All Lists]
Advanced

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

Re: Odd "backspace" behavior?


From: Trent W. Buck
Subject: Re: Odd "backspace" behavior?
Date: Fri, 23 Jan 2009 21:18:09 +1100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/23.0.60 (gnu/linux)

"Dan Mahoney, System Admin"
<address@hidden> writes:

> Hey all, I've currently got my prompt set like so:
>
> if ($TERM == "screen") then
> #alias precmd    'printf "\033%s%s %s\033\\" "k" "tcsh" "[$HOST]"'
> set prompt="%{\ek%}tcsh [$HOST] %{\e\\%}\%"
> alias postcmd   'printf "\033%s%s %s %s\033\\" "k" "\!#:0" "\!#:$"
> "[$HOST]"'
> endif
>
> what I notice, however, is that there's some "oddness" that the screen
> manpage makes vague allusions to.  Specifically, when I backspace,
> everything gets corrupted, but only some of the time.

This is because the shell assumes that the prompt is as long on-screen
as it is in the string.  You can fix it with \[ and \] within the prompt
string, when using bash.  I don't know about tcsh.





reply via email to

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