TheLocehiliosan / yadm

Yet Another Dotfiles Manager
https://yadm.io/
GNU General Public License v3.0
5.07k stars 176 forks source link

`yadm config local.classes` #422

Closed tkna91 closed 2 years ago

tkna91 commented 2 years ago

Is your feature request related to a problem? Please describe.

I have a script that I use in ~/.config/yadm/bootstrap.d/* that checks the class of that machine with the following command and processes it accordingly.

yadm config local.class

Multiple classes have been implemented in #304, but there doesn't appear to be a command to check for them yet. Sorry if there is.

Describe the solution you'd like

It would be useful to have a command like the following.

yadm config local.classes

Describe alternatives you've considered

Currently the following command does the same thing. It would be useful if this were a standard feature.

alias ycls="grep class ~/.share/yadm/repo.git/config | sed -e 's@^.* = @@g '"

Additional context

185

erijo commented 2 years ago

I haven't tried, but you could test if yadm config --get-all local.class works.

tkna91 commented 2 years ago

I was able to use it. Thank you!

$ grep class ~/.share/yadm/repo.git/config | sed -e 's@^.* = @@g'
thic
main
$ yadm config --get-all local.class
thic
main
$
tkna91 commented 2 years ago

I'm reopening it as it may be relevant to creating documents and other tasks. Sorry for closing it without permission. Please close it if there is no problem.

TheLocehiliosan commented 2 years ago

I've updated the website documentation to include this info.