BBS:      TELESC.NET.BR
Assunto:  Re: Titles in lxterminal
De:       bp
Data:     Tue, 24 Feb 2026 11:00:01 +1100
-----------------------------------------------------------
Richard Harnden  wrote:
> On 22/02/2026 00:21, bp@www.zefox.net wrote:
> 
>> 
>> It seems the remaining puzzle is how to replace the string
>> Hello World with the name of the last-typed command...
>> 
> 
> I think this works ...
> 
> ESC=$(echo -en "\033")
> BEL=$(echo -en "\007")
> 
> export HISTFILE=~./bash_history$(tty | sed "s,/,_,g")
> 
> export PS1='${ESC}]0;\
> $(fc -ln -1 |\
> tail -1 |\
> sed "s/^[[:space:]]*//g")${BEL}\
> ${LOGNAME}@${HOSTNAME}:${PWD/$HOME/\~} $ '

I really owe everybody an apology here. I thought there'd
be some trivial way to auto-title lxterminal windows so 
they could be easily distinguished. Clearly there isn't
such a thing. The "name tab" option takes only a few seconds
and is probably the most efficient way to keep folks like me
from typing the wrong commands in the wrong window....

Thanks for everybody's help and patience!


bob prohaska


--- PyGate Linux v1.5.12
 * Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)

-----------------------------------------------------------
[Voltar]