From: "chiasa.men" <chiasa.men@web.de> To: "zsh-users@zsh.org" <zsh-users@zsh.org> Subject: gnu script and zsh: only log command output Date: Thu, 12 May 2022 20:45:48 +0200 [thread overview] Message-ID: <2282060.4c44sqeuZD@march> (raw) 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
next reply other threads:[~2022-05-12 18:46 UTC|newest] Thread overview: 2+ messages / expand[flat|nested] mbox.gz Atom feed top 2022-05-12 18:45 chiasa.men [this message] 2022-05-13 19:12 ` Bart Schaefer
Reply instructions: You may reply publicly to this message via plain-text email using any one of the following methods: * Save the following mbox file, import it into your mail client, and reply-to-all from there: mbox Avoid top-posting and favor interleaved quoting: https://en.wikipedia.org/wiki/Posting_style#Interleaved_style * Reply using the --to, --cc, and --in-reply-to switches of git-send-email(1): git send-email \ --in-reply-to=2282060.4c44sqeuZD@march \ --to=chiasa.men@web.de \ --cc=zsh-users@zsh.org \ --subject='Re: gnu script and zsh: only log command output' \ /path/to/YOUR_REPLY https://kernel.org/pub/software/scm/git/docs/git-send-email.html * If your mail client supports setting the In-Reply-To header via mailto: links, try the mailto: link
Code repositories for project(s) associated with this inbox: https://git.vuxu.org/mirror/zsh/ This is a public inbox, see mirroring instructions for how to clone and mirror all data and code used for this inbox; as well as URLs for NNTP newsgroup(s).