typop: with many args, pop first then queue the others

terminology-1.6
Boris Faure 3 years ago
parent 80124a72ca
commit 4b24157e2b
  1. 3
      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;

Loading…
Cancel
Save