marlonrichert / zsh-snap

⚡️ Znap! Fast, easy-to-use tools for Zsh dotfiles & plugins, plus git repos
MIT License
1.32k stars 38 forks source link

[Request] Use `$HOME` instead of `/home/username` in `~/.gitconfig` #253

Closed yozachar closed 1 year ago

yozachar commented 1 year ago

What do you want?

In the [maintenance] section if ~/.gitconfig, znap pull populates it with:

[maintenance]
    repo = /home/username/.znap/repos/asdf
    repo = /home/username/.znap/repos/asdf-direnv
    repo = /home/username/.znap/repos/firefox-gnome-theme
    repo = /home/username/.znap/repos/grub2-themes
    repo = /home/username/.znap/repos/Gruvbox-GTK-Theme
    repo = /home/username/.znap/repos/stylepak
    repo = /home/username/.znap/repos/Tela-circle-icon-theme
    repo = /home/username/.znap/repos/zsh-autosuggestions
    repo = /home/username/.znap/repos/zsh-syntax-highlighting

instead I'd like to see:

[maintenance]
    repo = $HOME/.znap/repos/asdf
    repo = $HOME/.znap/repos/asdf-direnv
    repo = $HOME/.znap/repos/firefox-gnome-theme
    repo = $HOME/.znap/repos/grub2-themes
    repo = $HOME/.znap/repos/Gruvbox-GTK-Theme
    repo = $HOME/.znap/repos/stylepak
    repo = $HOME/.znap/repos/Tela-circle-icon-theme
    repo = $HOME/.znap/repos/zsh-autosuggestions
    repo = $HOME/.znap/repos/zsh-syntax-highlighting

Why do you want this?

I'm using chezmoi to backup my dot files, and I'd like to do it with as much system independence as possible.

Who else would benefit from this?

Every user of zsh-snap & chezmoi.

How should it work?

  1. When I run znap source github.com/user/repo or znap pull.
  2. It populates ~/.gitconfig, in which /home/username is replaced with $HOME.
marlonrichert commented 1 year ago

git maintenance does that. Sorry, but I have no control over that. You should contact the Git developers about this.

yozachar commented 1 year ago

image