BBS: TELESC.NET.BR
Assunto: Re: Titles in lxterminal
De: Richard Harnden
Data: Mon, 23 Feb 2026 10:26:56 +0000
-----------------------------------------------------------
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/\~} $ '
--- PyGate Linux v1.5.12
* Origin: Dragon's Lair, PyGate NNTP<>Fido Gate (3:633/10)
-----------------------------------------------------------
[Voltar]