doron-cohen / antidot

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

Feature Request: rule for creating a config file #171

Open magnus-ISU opened 2 years ago

magnus-ISU commented 2 years ago

For example, looking at wget here we could use an alias but this is less desireable as wget and some other commands (this is just the first example I ran into after installing Garuda today) can be run in scripts too and a config file would ensure all usages of wget won't cause issues.

My initial idea would be to create an action of type: create-config which takes path and data which is a multiline string which is written to the file and can substitute variables for absolute paths. If the file already exists, error and do not complete the rule, printing data and telling the user to manually do it.

It would be interesting to see if we could extend this to manual-only rules for editing root-owned files, too. You can get rid of .bashrc and .bash_profile by editing /etc/profile for example.