Expand description
Shell integration โ generates dodot-init.sh.
Unlike the Go implementation which ships a ~400-line shell script that re-discovers the datastore layout at runtime, we generate a flat, declarative script from the actual datastore state. This means:
- Zero logic duplication between Rust and shell
- The script is just
sourceandPATH=lines โ trivially fast - Changes to the datastore layout only need to happen in Rust
The generated script is written to data_dir/shell/dodot-init.sh.
Users source it from their shell profile:
[ -f ~/.local/share/dodot/shell/dodot-init.sh ] && . ~/.local/share/dodot/shell/dodot-init.shIn the future, this can also be exposed as dodot init-sh or
a minimal standalone binary for even faster shell startup.
Functionsยง
- generate_
init_ script - Generate the shell init script content from the current datastore state.
- write_
init_ script - Generate and write the init script to
data_dir/shell/dodot-init.sh.