Hi! I’m seeing what looks like an argv/quoting bug in vt’s wrapper script.
Version
- VibeTunnel
v1.0.0-beta.15
Expected
vt --title-mode dynamic echo test runs echo test with title mode set.
Actual
The flag isn’t consumed by vibetunnel fwd, and --title-mode … appears to get treated as part of the spawned command (often surfacing as zsh “no such option: title_mode”).
Root cause
In web/bin/vt, TITLE_MODE_ARGS is constructed as a string with a space:
TITLE_MODE_ARGS="--title-mode $2"
but passed as a single argv token due to quoting:
${TITLE_MODE_ARGS:+"$TITLE_MODE_ARGS"}
So the forwarder receives a single argument like --title-mode dynamic (one token), but web/src/server/fwd.ts only parses --title-mode when it’s a separate argv element (remainingArgs[0] === '--title-mode').
Minimal reproduction (argv capture)
If I swap VIBETUNNEL_BIN for a tiny argv dumper, vt clearly passes --title-mode <mode> as one token:
env -u VIBETUNNEL_SESSION_ID OSTYPE=linux-gnu \
VIBETUNNEL_BIN=/path/to/argvdump.sh \
SHELL=/bin/zsh \
./web/bin/vt --title-mode dynamic echo test
Output includes:
argv[1]=--title-mode\ dynamic
Suggested fix
Represent TITLE_MODE_ARGS as an array and expand it safely:
TITLE_MODE_ARGS=()
if [[ "$1" == "--title-mode" && $# -gt 1 ]]; then
TITLE_MODE_ARGS=(--title-mode "$2")
shift 2
fi
…
exec … ${VERBOSITY_ARGS:+$VERBOSITY_ARGS} "${TITLE_MODE_ARGS[@]}" …
Optionally, accept --title-mode=<mode> in vt (and/or in the forwarder parser) for UX.
Thanks — happy to test a patch.
Hi! I’m seeing what looks like an argv/quoting bug in
vt’s wrapper script.Version
v1.0.0-beta.15Expected
vt --title-mode dynamic echo testrunsecho testwith title mode set.Actual
The flag isn’t consumed by
vibetunnel fwd, and--title-mode …appears to get treated as part of the spawned command (often surfacing as zsh “no such option: title_mode”).Root cause
In
web/bin/vt,TITLE_MODE_ARGSis constructed as a string with a space:TITLE_MODE_ARGS="--title-mode $2"but passed as a single argv token due to quoting:
${TITLE_MODE_ARGS:+"$TITLE_MODE_ARGS"}So the forwarder receives a single argument like
--title-mode dynamic(one token), butweb/src/server/fwd.tsonly parses--title-modewhen it’s a separate argv element (remainingArgs[0] === '--title-mode').Minimal reproduction (argv capture)
If I swap
VIBETUNNEL_BINfor a tiny argv dumper,vtclearly passes--title-mode <mode>as one token:Output includes:
Suggested fix
Represent
TITLE_MODE_ARGSas an array and expand it safely:Optionally, accept
--title-mode=<mode>invt(and/or in the forwarder parser) for UX.Thanks — happy to test a patch.