You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
fish wrap: a typed rtk run --shell fish -c behind a leading line continuation is wrapped again #4923
With hooks.wrap_fish_scripts = true, fish on PATH, and settings allowing Bash(rtk:*) and Bash(git:*), rtk hook claude answers:
typed command
permissionDecision
updatedInput.command
rtk run --shell fish -c 'echo ok'; and git status
(no output)
\, newline, rtk run --shell fish -c 'echo ok'; and git status
ask
rtk run --shell fish -c '\⏎rtk run --shell fish -c '\''echo ok'\''; and git status'
try_wrap (src/discover/fish_script.rs) refuses a script whose first word is rtk, read as script.split_whitespace().next() on the trimmed text. Behind a leading \ and newline, that first word is the \, so the check passes and a command the agent already typed in the wrap form is wrapped a second time. Bash drops the continuation, and the rewrite rules drop it too (#4762's row for the && form).
Measured on 32b2ec4 (#4127's merge, shipped in v1.1.0) and on #4785's head. The outcome is an extra prompt: the wrap carries an explicit ask, and a settings deny still blocks it.
A fix reads the first word as bash does, after the leading continuations. Test: the second row leaves the command unwrapped, as the first row does.
Activity