[Gambas-user] removing xterm escape codes from terminal text

Benoit Minisini benoit.minisini at gambas-basic.org
Thu Jun 9 17:18:36 CEST 2022


Le 08/06/2022 à 00:37, Bruce Steers a écrit :
>     Why do you want to do that?
> 
> 
> Because I can us the Process_Read() of the terminal process to control 
> things inside a terminalview running a shell like bash or dash.
> 
> I have working a routine that can "Wait" and get return codes/text from 
> commands running inside the bash terminal but it reeds to read the 
> terminal text that has a lot of hidden codes to process out.
> I know there is terminalview.text but reading each bit as I t comes and 
> not all the text is preferred.
> Cheers
> 

Why don't you clear the "TERM" environmental variable while running your 
sub-processes? If there is no TERM, programs are supposed to not emit 
any xterm (or any other terminal) escape codes.

Regards,

-- 
Benoît Minisini.


More information about the User mailing list