fix: suppress socat stdout in _cmux_send to prevent "OK" leak (#1619)
The socat path in _cmux_send did not redirect stdout/stderr, causing the cmux socket's "OK" response to print to the user's terminal on every shell integration event (new tab, cd, precmd, preexec). The ncat path avoids this via --send-only, and the nc path already redirects to /dev/null. This aligns the socat path with both. Fixes #1618 Co-authored-by: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
parent
dfbd238e47
commit
aefb7767f6
2 changed files with 2 additions and 2 deletions
|
|
@ -5,7 +5,7 @@ _cmux_send() {
|
|||
if command -v ncat >/dev/null 2>&1; then
|
||||
printf '%s\n' "$payload" | ncat -w 1 -U "$CMUX_SOCKET_PATH" --send-only
|
||||
elif command -v socat >/dev/null 2>&1; then
|
||||
printf '%s\n' "$payload" | socat -T 1 - "UNIX-CONNECT:$CMUX_SOCKET_PATH"
|
||||
printf '%s\n' "$payload" | socat -T 1 - "UNIX-CONNECT:$CMUX_SOCKET_PATH" >/dev/null 2>&1
|
||||
elif command -v nc >/dev/null 2>&1; then
|
||||
# Some nc builds don't support unix sockets, but keep as a last-ditch fallback.
|
||||
#
|
||||
|
|
|
|||
|
|
@ -6,7 +6,7 @@ _cmux_send() {
|
|||
if command -v ncat >/dev/null 2>&1; then
|
||||
print -r -- "$payload" | ncat -w 1 -U "$CMUX_SOCKET_PATH" --send-only
|
||||
elif command -v socat >/dev/null 2>&1; then
|
||||
print -r -- "$payload" | socat -T 1 - "UNIX-CONNECT:$CMUX_SOCKET_PATH"
|
||||
print -r -- "$payload" | socat -T 1 - "UNIX-CONNECT:$CMUX_SOCKET_PATH" >/dev/null 2>&1
|
||||
elif command -v nc >/dev/null 2>&1; then
|
||||
# Some nc builds don't support unix sockets, but keep as a last-ditch fallback.
|
||||
#
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue