dotter icon indicating copy to clipboard operation
dotter copied to clipboard

[FEATURE] dotter init should be recursive

Open KrullBorg opened this issue 2 years ago • 2 comments

Is your feature request related to a problem? Please describe. For directories dotter init makes empty items in default package files section

Describe the solution you'd like I think it should be recursive, considering each directory as a package (as GNU Stow)

For example, this .dotfiles directory

bash/.bashrc
bash/.bash_logout
bash/.profile
emacs/.emacs
openbox/.config/openbox/rc.xml

should produce this global.toml

[default]
depends = []

[default.files]

[default.variables]

[bash]
depends = []

[bash.files]
"bash/.bashrc"="~/.bashrc"
"bash/.bash_logout"="~/.bash_logout"
"bash/.profile"="~/.profile"

[emacs]
depends = []

[emacs.files]
"emacs/.emacs"="~/.emacs"

[emacs.variables]

[openbox]
depends = []

[openbox.files]
"openbox/.config/openbox/rc.xml"="~/.config/openbox/rc.xml"

[openbox.variables]

KrullBorg avatar May 15 '23 09:05 KrullBorg

Right now dotter init is there for you to avoid getting stuck on basic toml syntax or field names. It's all empty on purpose.

I think this could be a cool idea to add as a dotter init --stow flag though. I'm not sure how stow does things exactly, but I assume this would only take folders and ignore files at the top level. A PR for this is very welcome :)

SuperCuber avatar May 15 '23 09:05 SuperCuber

ok i'll try

KrullBorg avatar May 15 '23 09:05 KrullBorg