[Gambas-user] removing xterm escape codes from terminal text
Bruce Steers
bsteers4 at gmail.com
Thu Jun 9 18:05:17 CEST 2022
On Thu, 9 Jun 2022 at 16:19, Benoit Minisini <
benoit.minisini at gambas-basic.org> wrote:
> 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.
>
aaah perfect. Cheers Ben
That works a treat..
hTerminalView.Exec(aCommand, ["TERM="])
Problem all gone away :)
Many thanks
BruceS
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gambas-basic.org/pipermail/user/attachments/20220609/c9d25701/attachment.htm>
More information about the User
mailing list