diff options
author | June McEnroe <june@causal.agency> | 2019-07-17 23:09:34 -0400 |
---|---|---|
committer | June McEnroe <june@causal.agency> | 2019-07-17 23:09:34 -0400 |
commit | a3b2def54ff06eb56f0864337360b6692658bb23 (patch) | |
tree | 7dbc02f57504696fa2da4a67b14a6bf7461e6b7a /bin/ptee.c | |
parent | Add Adulthood Rites (diff) | |
download | src-a3b2def54ff06eb56f0864337360b6692658bb23.tar.gz src-a3b2def54ff06eb56f0864337360b6692658bb23.zip |
Add ^Q to ptee for MC sequence
Diffstat (limited to '')
-rw-r--r-- | bin/ptee.c | 7 |
1 files changed, 7 insertions, 0 deletions
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"); } |