style: reword em-dashes; put colons inside bold run-in labels
Punctuation sweep across README, ROADMAP, and the script's comments: em-dashes become colons, commas, or parentheses; bold list labels take the colon inside the bold with lowercase text after. Comments only in the script, no code changes.
This commit is contained in:
parent
ff92d812ad
commit
be3fb049d2
3 changed files with 30 additions and 30 deletions
28
party
28
party
|
|
@ -118,7 +118,7 @@ user_in_party_group() {
|
|||
|
||||
# Soft assertion: caller is in TMUX_PARTY_GROUP. Fails loudly with
|
||||
# remediation instructions when not. Called by cmd_host before any
|
||||
# filesystem work; the other subcommands don't need it — non-members
|
||||
# filesystem work; the other subcommands don't need it: non-members
|
||||
# are stopped by the FS perimeter itself (EACCES at the per-party dir)
|
||||
# and get the friendlier group-gate message in cmd_join.
|
||||
require_caller_in_group() {
|
||||
|
|
@ -245,7 +245,7 @@ roster_read() {
|
|||
[ -n "$RR_PARTY_NAME" ] || return 1
|
||||
|
||||
# Pattern parity with cmd_host. The basename glob (party-*:*.d) is
|
||||
# permissive — names like 'a b' or 'my.party' match the glob but
|
||||
# permissive: names like 'a b' or 'my.party' match the glob but
|
||||
# validate_party_name rejects them (dots are banned: tmux rewrites
|
||||
# them in session names). Run the canonical validator so the
|
||||
# invariant cmd_host enforces on write is also checked on read.
|
||||
|
|
@ -342,12 +342,12 @@ is_party_alive() {
|
|||
|
||||
# Classify the caller's relationship to a party socket. Prints exactly
|
||||
# one of:
|
||||
# ok — live tmux server, the caller is authorized.
|
||||
# unauthorized — live tmux server, but it refused us. CAUTION, the
|
||||
# ok : live tmux server, the caller is authorized.
|
||||
# unauthorized : live tmux server, but it refused us. CAUTION, the
|
||||
# reason this function exists: tmux answers a
|
||||
# non-allowlisted user with "access not allowed" on
|
||||
# stderr and EXIT STATUS 0 (verified live on 3.3a,
|
||||
# 3.5a, and 3.6/SunOS), for every command — including
|
||||
# 3.5a, and 3.6/SunOS), for every command, including
|
||||
# has-session, which then reports any target as
|
||||
# existing. Exit codes alone cannot distinguish
|
||||
# authorized from unauthorized. We deliberately do NOT
|
||||
|
|
@ -357,8 +357,8 @@ is_party_alive() {
|
|||
# list-clients writes nothing to stderr, so rc 0 plus
|
||||
# ANY stderr output classifies as unauthorized. Should
|
||||
# tmux ever warn on an authorized call, that degrades
|
||||
# to a hidden party — never to a false "ok".
|
||||
# dead — nothing speaking the tmux protocol at that socket
|
||||
# to a hidden party, never to a false "ok".
|
||||
# dead : nothing speaking the tmux protocol at that socket
|
||||
# (stale roster, killed server, AF_UNIX impostor).
|
||||
party_conn_state() {
|
||||
_cs_err=$("$PARTY_TMUX" -S "$1" list-clients 2>&1 >/dev/null) \
|
||||
|
|
@ -480,8 +480,8 @@ compute_default_party_name() {
|
|||
# Absolute path to this script, for embedding in tmux server state that
|
||||
# outlives this invocation (the status-right #() widget runs with the
|
||||
# tmux server's PATH, which need not contain an installed `party`).
|
||||
# $0 forms: absolute — take it; relative-with-slash — anchor to cwd;
|
||||
# bare word — resolve via PATH, falling back to $0 verbatim. No `--`
|
||||
# $0 forms: absolute, take it; relative-with-slash, anchor to cwd;
|
||||
# bare word, resolve via PATH, falling back to $0 verbatim. No `--`
|
||||
# after command -v/dirname/basename: old illumos userland predates it,
|
||||
# and $0 here never starts with '-'.
|
||||
party_self_path() {
|
||||
|
|
@ -510,11 +510,11 @@ tmux_party_setup_server() {
|
|||
# hosts at most one socket so a fixed name is safe.
|
||||
notify_script="${sock%/*}/.party-notify"
|
||||
# Two heredocs: the first (expanding) pins the tmux binary the party
|
||||
# was hosted with — a bare `tmux` from the server's PATH may be a
|
||||
# was hosted with: a bare `tmux` from the server's PATH may be a
|
||||
# different, older binary than $PARTY_TMUX, which is the whole reason
|
||||
# PARTY_TMUX exists. The second (quoted) is the static body. A
|
||||
# PARTY_TMUX containing a double quote, $, or backslash would break
|
||||
# the pin; that's accepted — it's the host's own env var on their
|
||||
# the pin; that's accepted: it's the host's own env var on their
|
||||
# own party.
|
||||
cat > "$notify_script" <<EOF
|
||||
#!/bin/sh
|
||||
|
|
@ -540,7 +540,7 @@ EOF
|
|||
"$PARTY_TMUX" -S "$sock" set-option -s exit-empty on
|
||||
party_self=$(party_self_path)
|
||||
# The #() body is run by the tmux server via sh, so the embedded
|
||||
# paths are single-quoted — a path containing a single quote, a `)`,
|
||||
# paths are single-quoted: a path containing a single quote, a `)`,
|
||||
# or `#{` (tmux's #() parser ends at the first unescaped `)`) is
|
||||
# accepted breakage (host's own install path).
|
||||
"$PARTY_TMUX" -S "$sock" set-option -g status-right \
|
||||
|
|
@ -975,7 +975,7 @@ EOF
|
|||
# by the host via `party invite`). Pre-flight here so the user gets
|
||||
# a helpful message instead of an opaque tmux refusal. For an
|
||||
# unauthorized caller server-access -l prints its refusal on stderr
|
||||
# with EMPTY stdout (and exit 0 — see party_conn_state), so the awk
|
||||
# with EMPTY stdout (and exit 0, see party_conn_state), so the awk
|
||||
# match comes up empty and we land in the exit-13 branch.
|
||||
acl_line=$("$PARTY_TMUX" -S "$RR_SOCKET" server-access -l 2>/dev/null \
|
||||
| awk -v u="$USER" '$1 == u { print; exit }')
|
||||
|
|
@ -1242,7 +1242,7 @@ cmd_list() {
|
|||
"$RR_HOST_USER" "$RR_PARTY_NAME" "$attendees" "$group_tag"
|
||||
else
|
||||
# Live server, connection refused: we can't count attendees
|
||||
# (list-clients is behind the auth gate — its empty stdout
|
||||
# (list-clients is behind the auth gate: its empty stdout
|
||||
# used to render here as a bogus "0 attendee(s)"), but the
|
||||
# party is real and the caller can ask for an invite.
|
||||
printf '%-12s %-30s invite-only (ask %s)%s\n' \
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue