aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authoriamcheeseman <[hidden email]>2026-03-01 12:41:17 -0500
committeriamcheeseman <[hidden email]>2026-03-01 12:41:17 -0500
commitf3696d311331e86a72c5cae2e42e66ebc51dcd6a (patch)
treeb4e74c23fd64f2ecf6481c7f23c8607d268afda8
parenta22baf4ba2ab78dfe0c5bbd74c9f6fef5aa35f5d (diff)
Allow spaces in tsarc arguments
-rw-r--r--src/pipe.c4
-rwxr-xr-xtsarc3
2 files changed, 5 insertions, 2 deletions
diff --git a/src/pipe.c b/src/pipe.c
index 9fc8406..d688179 100644
--- a/src/pipe.c
+++ b/src/pipe.c
@@ -38,7 +38,9 @@ void await_change(void) {
break;
}
- if (isspace(chr)) {
+ // octal 201 is an unused ascii character, so it's safe to use as a
+ // delimiter
+ if (chr == '\201') {
if (chr_on == 0) {
i++;
continue;
diff --git a/tsarc b/tsarc
index 26754b2..f053d07 100755
--- a/tsarc
+++ b/tsarc
@@ -1,2 +1,3 @@
#! /bin/sh
-echo "$*" > /tmp/tsarc.pipe
+printf "%s\201" "$@" > /tmp/tsarc.pipe
+