diff options
author | Case Duckworth | 2023-03-08 14:23:50 -0600 |
---|---|---|
committer | Case Duckworth | 2023-03-08 14:23:50 -0600 |
commit | c7f4ecf9c261ce09c4e8ddc0185505f551cf49a4 (patch) | |
tree | b8bfd83ac004688cea5058d05a3746e3eb3b8294 | |
parent | Fix arithmetic error in scroll causing crash (diff) | |
download | vellum-c7f4ecf9c261ce09c4e8ddc0185505f551cf49a4.tar.gz vellum-c7f4ecf9c261ce09c4e8ddc0185505f551cf49a4.zip |
-rwxr-xr-x | vellum | 6 |
1 files changed, 3 insertions, 3 deletions
diff --git a/vellum b/vellum index 8cd03c2..5058b34 100755 --- a/vellum +++ b/vellum | |||
@@ -1,4 +1,4 @@ | |||
1 | set +x | 1 | # make sure to put a shebang here |
2 | 2 | ||
3 | readc() { # arg: <variable-name> | 3 | readc() { # arg: <variable-name> |
4 | # adapted from https://unix.stackexchange.com/a/464963 | 4 | # adapted from https://unix.stackexchange.com/a/464963 |
@@ -30,10 +30,10 @@ readc() { # arg: <variable-name> | |||
30 | # Break on EOF | 30 | # Break on EOF |
31 | test -n "$c" || break | 31 | test -n "$c" || break |
32 | 32 | ||
33 | eval "$var=\${$var}$c" | 33 | eval "$var=\"\${$var}$c\"" |
34 | 34 | ||
35 | # Break when we have a full character (wc -m) | 35 | # Break when we have a full character (wc -m) |
36 | test "$(eval printf %s "\$$var" | wc -m)" -eq 0 || break | 36 | test "$(eval printf %s "\"\$$var\"" | wc -m)" -eq 0 || break |
37 | done | 37 | done |
38 | 38 | ||
39 | # Round-trip sanitized variables | 39 | # Round-trip sanitized variables |