What problem are you trying to solve?
cdd init supports fish, bash, and zsh only. Elvish users cannot Jump: the binary prints a path but there is no Wrapper to change the caller's directory.
Proposed solution
Add elvish to cdd init, sourced from rc.elv:
eval (cdd init elvish | slurp)
The emitted script defines fn cdd {|@args| ...} in the user's namespace. It forwards pass-through subcommands with e:cdd, otherwise captures e:cdd pick $@args, checks the exit status, guards against an empty result, and runs builtin:cd.
Alternatives considered
- None. Elvish has no way to change the caller's directory from a child process either, so a function is required.
Additional context
What problem are you trying to solve?
cdd initsupports fish, bash, and zsh only. Elvish users cannot Jump: the binary prints a path but there is no Wrapper to change the caller's directory.Proposed solution
Add
elvishtocdd init, sourced fromrc.elv:The emitted script defines
fn cdd {|@args| ...}in the user's namespace. It forwards pass-through subcommands withe:cdd, otherwise capturese:cdd pick $@args, checks the exit status, guards against an empty result, and runsbuiltin:cd.Alternatives considered
Additional context