twpayne / chezmoi

Manage your dotfiles across multiple diverse machines, securely.
https://www.chezmoi.io/
MIT License
13.27k stars 493 forks source link

Make chezmoi init user remember the username for http #2561

Closed davidolrik closed 1 year ago

davidolrik commented 1 year ago

When doing chezmoi init user, chezmoi will guess the repo using following table taken from the documentation.

Pattern HTTPS Repo today HTTPS Repo proposed
user https://github.com/user/dotfiles.git https://user@github.com/user/dotfiles.git
user/repo https://github.com/user/repo.git https://user@github.com/user/repo.git
site/user/repo https://site/user/repo.git https://user@site/user/repo.git
sr.ht/~user https://git.sr.ht/~user/dotfiles https://user@git.sr.ht/~user/dotfiles
sr.ht/~user/repo https://git.sr.ht/~user/repo https://user@git.sr.ht/~user/repo

I have added a proposed column that also remembers the username in the .git/config thus saving some typing when doing chezmoi update

twpayne commented 1 year ago

Nice suggestion, thank you. Implemented in #2562.