summary refs log tree commit diff
path: root/bin
diff options
context:
space:
mode:
Diffstat (limited to '')
-rw-r--r--bin/man1/ptee.16
-rw-r--r--bin/ptee.c7
2 files changed, 12 insertions, 1 deletions
diff --git a/bin/man1/ptee.1 b/bin/man1/ptee.1
index a38d61c7..04f9cdac 100644
--- a/bin/man1/ptee.1
+++ b/bin/man1/ptee.1
@@ -1,4 +1,4 @@
-.Dd July 8, 2019
+.Dd July 17, 2019
 .Dt PTEE 1
 .Os
 .
@@ -27,6 +27,10 @@ to a file or pipe.
 Type
 .Ic ^S
 to toggle writing to standard output.
+Type
+.Ic ^Q
+to write the media copy sequence for
+.Xr shotty 1 .
 .
 .Sh SEE ALSO
 .Xr tee 1
diff --git a/bin/ptee.c b/bin/ptee.c
index a5f9d954..6a9a16b4 100644
--- a/bin/ptee.c
+++ b/bin/ptee.c
@@ -83,6 +83,13 @@ int main(int argc, char *argv[]) {
 				continue;
 			}
 
+			if (rlen == 1 && buf[0] == CTRL('Q')) {
+				char dump[] = "\x1B[10i";
+				ssize_t wlen = write(STDOUT_FILENO, dump, sizeof(dump) - 1);
+				if (wlen < 0) err(EX_IOERR, "write");
+				continue;
+			}
+
 			ssize_t wlen = write(pty, buf, rlen);
 			if (wlen < 0) err(EX_IOERR, "write");
 		}
2021-01-20Remove Lua supportJune McEnroe Lua support is unused and the dlsym fwrite/write hacks horrify me. Clean it up. 2021-01-20Fix tests for diff spansJune McEnroe 2021-01-20Avoid matching ':' in make tagsJune McEnroe Otherwise a :: rule includes one of the ':'s in the tag name. 2021-01-19Prefer tag matches not preceded by [[:alnum:]]June McEnroe Otherwise the "id" in "void" matches for "void id". 2021-01-19Escape \ and / in mtags search patternsJune McEnroe 2021-01-20Use mtags in source-filterJune McEnroe 2021-01-19Add mtags to generate tags for make and mdocJune McEnroe 2021-01-19Map tags to IDs using only [[:alnum:]-._]June McEnroe 2021-01-19Don't use a pager if reading standard inputJune McEnroe 2021-01-19Support BSD make syntax and match *.amJune McEnroe These don't really go together, but... 2021-01-19Match tab following escaped newline in make assignmentsJune McEnroe Otherwise it ends up going into Shell state. 2021-01-18Allow matching lexers using first input lineJune McEnroe