summaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
authorBoris Faure <billiob@gmail.com>2019-10-10 23:37:51 +0200
committerBoris Faure <billiob@gmail.com>2019-10-10 23:37:51 +0200
commit4b24157e2bb7d02d7fab5f63904cafb25efa756f (patch)
tree2eeb29896f27ec123efe5ef2f9f7d4a5fb8ab5f9 /src
parent80124a72ca2d71c31ee5b9c0b446881fd8e40131 (diff)
typop: with many args, pop first then queue the others
Diffstat (limited to 'src')
-rw-r--r--src/bin/typop.c3
1 files changed, 2 insertions, 1 deletions
diff --git a/src/bin/typop.c b/src/bin/typop.c
index 13fe262..8a9e159 100644
--- a/src/bin/typop.c
+++ b/src/bin/typop.c
@@ -37,7 +37,8 @@ main(int argc, char **argv)
37 37
38 path = argv[i]; 38 path = argv[i];
39 if (realpath(path, buf)) path = buf; 39 if (realpath(path, buf)) path = buf;
40 snprintf(tbuf, sizeof(tbuf), "%c}pn%s", 0x1b, path); 40 snprintf(tbuf, sizeof(tbuf), "%c}p%c%s", 0x1b,
41 (i == 1) ? 'n': 'q', path);
41 if (write(1, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1)) perror("write"); 42 if (write(1, tbuf, strlen(tbuf) + 1) != (signed)(strlen(tbuf) + 1)) perror("write");
42 } 43 }
43 return 0; 44 return 0;