feat: auto-select the gating group; 'party' becomes the fallback
Bare 'party host' now walks staff, users, wheel, party and gates on the first group the caller belongs to, announcing the pick. Boxes where people already share a system group need no setup; the curated 'party' group remains the fallback and the explicit --group / TMUX_PARTY_GROUP paths are unchanged. Caller membership is the only probe (id -nG, portable everywhere); whether a guest is a member stays an invite-time warning, where it can actually be answered.
This commit is contained in:
parent
22606ea55d
commit
7770289d85
6 changed files with 165 additions and 22 deletions
|
|
@ -19,6 +19,12 @@ setup_party_sandbox() {
|
|||
# zsh with clean env). party uses $USER under set -eu, so guarantee it.
|
||||
export USER="${USER:-$(id -un)}"
|
||||
|
||||
# Pin the gating group. cmd_host auto-selects a candidate group when
|
||||
# TMUX_PARTY_GROUP is unset, which would make bare `party host` calls
|
||||
# environment-dependent; tests keep the historical explicit default.
|
||||
# Suites that test auto-selection unset this themselves.
|
||||
export TMUX_PARTY_GROUP="${TMUX_PARTY_GROUP:-party}"
|
||||
|
||||
export PARTY_TMP="$BATS_TEST_TMPDIR/party"
|
||||
export PARTY_SOCKET_DIR="$PARTY_TMP/sockets"
|
||||
mkdir -p "$PARTY_SOCKET_DIR"
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue