doron-cohen / antidot

Cleans up your $HOME from those pesky dotfiles
MIT License
311 stars 18 forks source link

Minimize writes - do not write scripts to disk, generate them on the fly when `antidot init` is run. #167

Closed magnus-ISU closed 2 years ago

magnus-ISU commented 2 years ago

Simplifies a lot of logic, makes the program touch less stuff / have less files that could break, resolves #162, also improves some help messages and causes antidot init to tell the user what to do with the output / how to run it.

Also makes it marginally easier to support new shells.

Previously antidot clean would generate ~/.local/share/antidot/kvstore.json, ~/.local/share/antidot/env.sh, and ~/.local/share/antidot/alias.sh and then antidot init would create a default script that would source those two scripts, with extra logic to test if those scripts exist and other nonsense.

Now antidot clean generates ~/.local/share/antidot/kvstore.json and antidot init creates a script based on the kvstore that creates all aliases and sources all variables.