Skip to content

daft shell-init ​

Generate shell wrapper functions for daft commands

Description ​

Generate shell wrapper functions that enable automatic cd into new worktrees.

By default, when daft commands create or switch to a worktree, the process changes directory but the parent shell remains in the original directory. These wrappers solve this by reading the CD target from a temp file and using the shell's builtin cd.

Add to your shell config: Bash (~/.bashrc): eval "$(daft shell-init bash)" Zsh (~/.zshrc): eval "$(daft shell-init zsh)" Fish (~/.config/fish/config.fish): daft shell-init fish | source

With short aliases (gwco, etc.): eval "$(daft shell-init bash --aliases)"

Usage ​

daft shell-init [OPTIONS] <SHELL>

Arguments ​

ArgumentDescriptionRequired
<SHELL>Target shell (bash, zsh, or fish)Yes

Options ​

OptionDescriptionDefault
--aliasesInclude short aliases (gwco, etc.)

Global Options ​

OptionDescription
-h, --helpPrint help information
-V, --versionPrint version information

See Also ​

Released under MIT or Apache-2.0.