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
In apps/server/src/project/ProjectSetupScriptRunner.ts (wrapCommandForCompletion, case "nushell"), the worktree setup wrapper runs:
^$nu.current-exe --login --commands $"cd $env.T3CODE_WORKTREE_PATH; source ($__t3f | to nuon)"
While $__t3f is properly quoted via | to nuon, $env.T3CODE_WORKTREE_PATH is interpolated raw into the --commands string parsed by the child Nushell process. Any worktree path containing spaces splits cd into extra positional arguments (nu::parser::extra_positional), and paths containing Nushell syntax characters (;, (, #, quotes) break parsing or execute unintended commands.
Quoting it as ($env.T3CODE_WORKTREE_PATH | to nuon) matches ($__t3f | to nuon) on the same line and preserves spaces and special characters across POSIX and Windows paths.
I tried to reproduce this on the current build and could not.
Commit origin/main 902d369. Downloaded Nushell 0.117.0 (x86_64 Linux release). Took the exact wrapper string main's wrapCommandForCompletion emits for the nushell case (the existing test pins it byte for byte). The setup command was print "setup ran in"; pwd. Ran it (a) as a script with nu --no-config-file and (b) typed into an interactive nu on a PTY after bracketed paste turned on, which is how the server submits it. T3CODE_WORKTREE_PATH was set to worktree dirs named wt dir/feat, a b, a;b, a#b, a(b), a'b, a"b, a$b and x;print PWNED;y. Every run printed the correct full path from pwd and ended with exit code 0; PWNED never printed and there was no parse error. print $"cd $env.T3CODE_WORKTREE_PATH; source ($f | to nuon)" prints cd $env.T3CODE_WORKTREE_PATH; source "/tmp/a b.nu": Nushell interpolation only expands ( ), so the child nu gets the variable reference and resolves it from its inherited environment as one argument. The reported nu::parser::extra_positional only appears when a spaced path is written literally after cd, which the wrapper never does. The full app flow with Nushell as the terminal shell was not driven.
Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.
Activity
juliusmarminge commentedon Nov 24, 2026
I tried to reproduce this on the current build and could not.
Commit origin/main 902d369. Downloaded Nushell 0.117.0 (x86_64 Linux release). Took the exact wrapper string main's wrapCommandForCompletion emits for the nushell case (the existing test pins it byte for byte). The setup command was
print "setup ran in"; pwd. Ran it (a) as a script withnu --no-config-fileand (b) typed into an interactive nu on a PTY after bracketed paste turned on, which is how the server submits it. T3CODE_WORKTREE_PATH was set to worktree dirs namedwt dir/feat,a b,a;b,a#b,a(b),a'b,a"b,a$bandx;print PWNED;y. Every run printed the correct full path from pwd and ended with exit code 0; PWNED never printed and there was no parse error.print $"cd $env.T3CODE_WORKTREE_PATH; source ($f | to nuon)"printscd $env.T3CODE_WORKTREE_PATH; source "/tmp/a b.nu": Nushell interpolation only expands( ), so the child nu gets the variable reference and resolves it from its inherited environment as one argument. The reportednu::parser::extra_positionalonly appears when a spaced path is written literally aftercd, which the wrapper never does. The full app flow with Nushell as the terminal shell was not driven.Closing as not planned. If it still happens for you, reply with the exact steps and the version you are on and it will be looked at again.