Skip to content

fix(setup): prevent clobbered cd related issues e.g. Zoxide#8

Merged
guodong-sq merged 1 commit intoblock:mainfrom
bezhermoso:command-cd
Feb 9, 2026
Merged

fix(setup): prevent clobbered cd related issues e.g. Zoxide#8
guodong-sq merged 1 commit intoblock:mainfrom
bezhermoso:command-cd

Conversation

@bezhermoso
Copy link
Copy Markdown
Contributor

@bezhermoso bezhermoso commented Feb 7, 2026

👋 Some CLI tools like zoxide either enhances and/or clobbers the cd command in a way that interferes with other setup scripts that rely on cd for their own inits early in a shell's init.

This is usually fixable by guaranteeing load order in ~/.zshrc, but IMO a more robust solution is to ensure we call the system's cd command by using command cd instead, especially in the context of _wt_resolve_root which is expected to be called during shell init to bootstrap wt.

@bezhermoso
Copy link
Copy Markdown
Contributor Author

Also command is part of the POSIX standards, so this change wouldn't make wt any less portable.

@guodong-sq guodong-sq merged commit 283eb99 into block:main Feb 9, 2026
1 check passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants