gbrlsnchs / pilgo

Configuration-based dotfiles manager
MIT License
85 stars 4 forks source link

useHome doesn't work for files in subdirectories #9

Open nichobi opened 3 years ago

nichobi commented 3 years ago

Describe the bug Giving a file the useHome option has no effect if the file is in a subdirectory of the dotfiles folder.

To reproduce Steps to reproduce the behavior:

  1. plg init
  2. mkdir example && touch example/thisbelongsinhome
  3. plg scan && plg scan example
  4. plg config -H example/thisbelongsinhome
  5. plg check
    .
    └── example                                                                  (SKIP)
    └── thisbelongsinhome <- /home/nichobi/.config/example/thisbelongsinhome (READY)

    Expected behavior thisbelongsinhome should be linked to ~/thisbelongsinhome

Environment (please complete the following information): Pilgo 0.5.0 Additional context This could be useful when a program requires some dotfiles to be placed in the home directory, but the rest can be in ~/.config. An example I've had is that my zsh config requires a .zshenv file in ~ to tell it to look for subsequent files in ~/.config/zsh. To keep things tidy I would like to keep this with the rest of my zsh config.

gbrlsnchs commented 3 years ago

This is definitely a bug. The only way to make it work right now is by running plg config -H -f example afterwards.

The UX is not the best right now, so... sorry for that. I'm rewriting the whole thing pretty soon in order to enhance it.