Zsh Mailing List Archive
Messages sorted by: Reverse Date, Date, Thread, Author

gnu script and zsh: only log command output



When I use "script --log-output o --log-input i" I am facing two problems:

1: The output log contains the actual input: e.g. ".]0;test@test: echo 5.5"
(see below)
2: The prompts

I really just want the programs output logged - no prompts, no shell-related
output.

Is that possible?

Actually Im using a python script with "pid, master_fd = pty.fork();
pty._copy(master_fd, _my_read_function, _my_stdin_read_function)"

So would there be a way to reliably filter the zsh-related output e.g. within
the _my_read_function function?

Example logs:
output:
> .[1m.[7m%.[27m.[1m.[0m
>
> .]0;test@test: ~/script.
> .[0m.[27m.[24m.[J.[1m.[31m.[39m.[0m.[1m.[34mtest.[39m.[0m@test .[1m~/script
.[0m% .[K.[?1h.=.[?2004he.echo 5.[?1l.>.[?2004l
>
> .]0;test@test: echo 5.5
> .[1m.[7m%.[27m.[1m.[0m
>
> .]0;test@test: ~/script.
> .[0m.[27m.[24m.[J.[1m.[31m.[39m.[0m.[1m.[34mtest.[39m.[0m@test .[1m~/script
.[0m% .[K.[?1h.=.[?2004he.exit.[?1l.>.[?2004l
>
> .]0;test@test: exit.

input:
> echo 5
> exit









Messages sorted by: Reverse Date, Date, Thread, Author