TheLocehiliosan / yadm

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

add yadm "edit" command #366

Open xenoterracide opened 2 years ago

xenoterracide commented 2 years ago

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

it's annoying to have to type yadm ~/.config/yadm/alt/.config/yadm/bootstrap##...,etc

Describe the solution you'd like

So the other day I noticed that you can do, e.g systemctl edit cups which will edit an override file for cups.service. I realized it would be really cool to do this for yadm. so for example, I could do, on manjaro as root, and it would be equivalent to doing

yadm edit ~/.config/yadm/pkglist.txt
vi ~/.config/yadm/alt/.config/yadm/pkglist.txt\#\#os.Linux,distro.ManjaroLinux,user.root,e.txt
yadm alt # maybe? this is optional to me

I'm of course suggesting that the edit command take the "conditions" into consideration, as well as use EDITOR and VISUAL environment variables, as well as probably its own configs and perhaps a default.

https://www.freedesktop.org/software/systemd/man/systemctl.html#edit%20UNIT%E2%80%A6

you'll note it reloads the daemon, but it doesn't start/stop anything, so not sure about yadm alt

Describe alternatives you've considered

Do what I'm doing now. I suppose I could write a shell function that I put in my zshrc and alias it in the yadm gitconfig.

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.

github-actions[bot] commented 2 years ago

This issue has been labeled as stale because it has been open 60 days with no activity. Remove stale label or comment or this will be closed in 7 days.