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
Path completion keeps the old directory after cd when overlay use runs inside a block (if/try) #19449
When overlay use runs inside a nested block, such as if true { overlay use m.nu } or try { overlay use m.nu }, Tab path completion keeps resolving against the directory the shell was in when the overlay was activated. $env.PWD, pwd, ls and external commands all see the new directory correctly; only completion is stale. The same overlay use at the top level works. Adding as x does not help inside a block.
This hits configs that load an overlay conditionally, such as a Starship init file inside try.
With overlay use test.nu at the top level, both completions are correct. Every later cd is affected too.
Expected behavior
Completion follows $env.PWD.
Configuration
Reproduced on 0.116.1 (nixpkgs, x86_64-linux) and 0.113.1.
Additional context
Possibly the same family as #15859 (overlay from a symlink), whose repro no longer reproduces for me on 0.116.1, and #6522 (overlay activated through an alias).
Activity
fdncred commentedon Nov 5, 2026
Does this one fix it? #19458
luccahuguet commentedon Nov 5, 2026
yes! I just tested it
fdncred commentedon Nov 5, 2026
good. it'll be in 0.118.0 - we're too close to 0.117.0 to make it in
luccahuguet commentedon Nov 5, 2026
very awesome.
I already have a workaround in the meanwhile, so I wont even feel the wait