What problem are you trying to solve?
cdd init supports fish, bash, and zsh only. Nushell users cannot Jump: the binary prints a path but there is no Wrapper to change the caller's directory.
Proposed solution
Add nu (alias nushell) to cdd init. Nushell cannot source from a pipe, so follow the pattern starship and zoxide use: the user writes the script to a file once and sources it from config.nu:
cdd init nu | save -f ~/.cache/cdd/init.nu
source ~/.cache/cdd/init.nu
The emitted script defines def --env cdd [...args] so cd affects the caller. It forwards pass-through subcommands to the binary with ^cdd, otherwise captures ^cdd pick ...$args | str trim, checks the exit code, guards against an empty result, and runs cd.
Alternatives considered
- Nushell plugins. Far heavier than a two-line function.
Additional context
What problem are you trying to solve?
cdd initsupports fish, bash, and zsh only. Nushell users cannot Jump: the binary prints a path but there is no Wrapper to change the caller's directory.Proposed solution
Add
nu(aliasnushell) tocdd init. Nushell cannotsourcefrom a pipe, so follow the pattern starship and zoxide use: the user writes the script to a file once and sources it fromconfig.nu:The emitted script defines
def --env cdd [...args]socdaffects the caller. It forwards pass-through subcommands to the binary with^cdd, otherwise captures^cdd pick ...$args | str trim, checks the exit code, guards against an empty result, and runscd.Alternatives considered
Additional context