From 813352679a1feafb8e43b51e45edeaf4abcb3f98 Mon Sep 17 00:00:00 2001 From: "C. McEnroe" Date: Mon, 18 Oct 2021 13:52:12 -0400 Subject: Swap functions of ^Q and ^S in ptee --- bin/man1/ptee.1 | 10 +++++----- bin/ptee.c | 4 ++-- 2 files changed, 7 insertions(+), 7 deletions(-) (limited to 'bin') diff --git a/bin/man1/ptee.1 b/bin/man1/ptee.1 index 04f9cdac..ba615f27 100644 --- a/bin/man1/ptee.1 +++ b/bin/man1/ptee.1 @@ -1,4 +1,4 @@ -.Dd July 17, 2019 +.Dd October 18, 2021 .Dt PTEE 1 .Os . @@ -26,14 +26,14 @@ to a file or pipe. .Pp Type .Ic ^S -to toggle writing to standard output. +to write a media copy sequence +to standard output. Type .Ic ^Q -to write the media copy sequence for -.Xr shotty 1 . +to toggle writing to standard output. . .Sh SEE ALSO -.Xr tee 1 +.Xr script 1 . .Sh BUGS Window size changes are not propagated diff --git a/bin/ptee.c b/bin/ptee.c index 6a9a16b4..f2ea9609 100644 --- a/bin/ptee.c +++ b/bin/ptee.c @@ -78,12 +78,12 @@ int main(int argc, char *argv[]) { ssize_t rlen = read(STDIN_FILENO, buf, sizeof(buf)); if (rlen < 0) err(EX_IOERR, "read"); - if (rlen == 1 && buf[0] == CTRL('S')) { + if (rlen == 1 && buf[0] == CTRL('Q')) { stop ^= true; continue; } - if (rlen == 1 && buf[0] == CTRL('Q')) { + if (rlen == 1 && buf[0] == CTRL('S')) { char dump[] = "\x1B[10i"; ssize_t wlen = write(STDOUT_FILENO, dump, sizeof(dump) - 1); if (wlen < 0) err(EX_IOERR, "write"); -- cgit 1.4.1