pilgo icon indicating copy to clipboard operation
pilgo copied to clipboard

useHome doesn't work for files in subdirectories

Open nichobi opened this issue 3 years ago • 1 comments

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
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.

nichobi avatar Feb 27 '21 19:02 nichobi

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.

gbrlsnchs avatar Mar 01 '21 13:03 gbrlsnchs