Christoph Anton Mitterer, le mar. 19 sept. 2023 14:23:47 +0200, a ecrit:
> > Random difference guesses:
> > 
> > - Does it happen with a plain
> > 
> > PS1="$ "
> > 
> > prompt?
> 
> It does indeed not happen with that prompt string.

Ok, so the prompt does matter.

> My PS1 is  a bit more complex, but has worked so far:
> $ printf '%s\n' "$PS1"
> \[\e[0m\]\[\e[32m\]\u\[\e[0m\]\[\e[2;37m\]@\[\e[0m\]\[\e[32m\]\h\[\e[0m\]\[\e[2;37m\]:\[\e[0m\]\[\e[1;34m\]\w\[\e[0m\]$(
>  [ "$?" -eq 0 ] && { [ -n "$(jobs -s; jobs -r)" ] && printf 
> '%s{%s%s\j%s%s}%s' '\[\e[2;37m\]' '\[\e[0m\]' '\[\e[36m\]' '\[\e[0m\]' 
> '\[\e[2;37m\]' '\[\e[0m\]'; true; } || { [ -n "$(jobs -s; jobs -r)" ] && 
> printf '%s{%s%s\j%s%s}%s' '\[\e[2;37m\]' '\[\e[0m\]' '\[\e[36m\]' '\[\e[0m\]' 
> '\[\e[2;37m\]' '\[\e[0m\]'; false; } )$( [ "$?" -eq 0 ] && printf '%s' 
> '\[\e[2;37m\]' || printf '%s' '\[\e[31m\]' )\$\[\e[0m\]\[\e]0;\u@\h:\w\e\\\]

Ok, with that PS1 it seems I can reproduce it.

I also notice that there is a bug as soon as pressing the up arrow: the
trailing ] gets dropped. If I press ^L after pressing the up arrow,
dropping the 2 doesn't eat the > along. So possibly it's actually the up
arrow output which is bogus, and the > eat is just a consequence. I'll
dig a bit.

> > - Is your terminal using TERM=xterm-256color or something else?
> TERM is xterm-256color

Ok.

> > - Does it happen with a reinitialized profile?
> What do you mean? Fresh .profile and friends?

I just meant the gnome-terminal profile. But since I can reproduce with
my current setting, it should be all good.

Samuel

Reply via email to