From 4b24157e2bb7d02d7fab5f63904cafb25efa756f Mon Sep 17 00:00:00 2001 From: Boris Faure Date: Thu, 10 Oct 2019 23:37:51 +0200 Subject: [PATCH] typop: with many args, pop first then queue the others --- src/bin/typop.c | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/bin/typop.c b/src/bin/typop.c index 13fe2623..8a9e1597 100644 --- a/src/bin/typop.c +++ b/src/bin/typop.c @@ -37,7 +37,8 @@ main(int argc, char **argv) path = argv[i]; if (realpath(path, buf)) path = buf; - snprintf(tbuf, sizeof(tbuf), "%c}pn%s", 0x1b, path); + snprintf(tbuf, sizeof(tbuf), "%c}p%c%s", 0x1b, + (i == 1) ? 'n': 'q', path); if (write(1, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1)) perror("write"); } return 0;