My Nix configuration. Enter at your own risk.
0

Configure Feed

Select the types of activity you want to include in your feed.

run-quiet: Support BSD script(1) on macOS

util-linux script(1) and BSD script(1) take incompatible flags: util-linux
uses -f to flush and -c to pass the command as a single string, while BSD
uses -F to flush and takes the command as positional args after the
typescript path. Branch on uname so this works on both.

author
Isaac Corbrey
date (Jun 4, 2026, 9:39 AM -0400) commit b932c81e parent 02935443 change-id molvlrrn
+17 -12
+17 -12
scripts/run-quiet
··· 72 72 done 73 73 fi 74 74 75 - cmd_str="" 76 - for arg in "$@"; do 77 - cmd_str+="$(printf '%q ' "$arg")" 78 - done 79 - 80 - # Run inside a PTY so the command produces colored output. 81 - # -q: quiet 82 - # -e: return the child's exit status 83 - # -f: flush output after each write (for live streaming) 84 - # -c: command to run 85 - # /dev/null: discard the typescript 86 - "${sudo_prefix[@]}" script -qefc "$cmd_str" /dev/null > "$log" 2>&1 & 75 + # Run inside a PTY so the command produces colored output. BSD `script` 76 + # (macOS) and util-linux `script` (Linux) take incompatible flags, so 77 + # branch on OS: 78 + # -q: quiet (both) 79 + # -e: return the child's exit status (both) 80 + # -F (BSD) / -f (util-linux): flush after each write 81 + # BSD takes the command as positional args after the typescript file; 82 + # util-linux needs the command as a single string via -c. 83 + if [[ "$(uname)" == "Darwin" ]]; then 84 + ${sudo_prefix[@]+"${sudo_prefix[@]}"} script -qeF /dev/null "$@" > "$log" 2>&1 & 85 + else 86 + cmd_str="" 87 + for arg in "$@"; do 88 + cmd_str+="$(printf '%q ' "$arg")" 89 + done 90 + ${sudo_prefix[@]+"${sudo_prefix[@]}"} script -qefc "$cmd_str" /dev/null > "$log" 2>&1 & 91 + fi 87 92 pid=$! 88 93 89 94 frame=0