Tuckr icon indicating copy to clipboard operation
Tuckr copied to clipboard

tuckr ignores directory `Configs/foo_macos` if `Configs/foo` does not exist.

Open jasha-hrp opened this issue 1 year ago • 1 comments

Tuckr ignores a folder with a os suffix (e.g. foo_macos) if the corresponding non-suffixed folder foo does not exist.

For example, if my .dotfiles directory looks like this:

      - │           ┌─ yazi.toml
      - │        ┌─ yazi
      - │     ┌─ .config
      - │  ┌─ yazi_macos
      - ├─ Configs
57344 B .dotfiles

then runing tuckr add yazi fails:

$ tuckr add yazi                                  
yazi doesn't exist.

I was able to make tuckr add yazi work by creating a yazi folder next to the yazi_macos folder:

      - │           ┌─ yazi.toml
      - │        ┌─ yazi
      - │     ┌─ .config
      - │  ┌─ yazi_macos
      - │  │  ┌─ .gitkeep
      - │  ├─ yazi
      - ├─ Configs
57344 B .dotfiles

I created a file Configs/yazi/.gitkeep file so that the yazi folder could be checked into version control. As a result, tuckr creates a symlink to the .gitkeep file in my home directory, which I'd like to avoid.

Would you be willing to consider one of the following modifications to tuckr?

  • Have tuckr add foo add files from e.g. Configs/foo_macos even if the folder Configs/foo does not exist
  • Have tuckr ignore files titled .gitkeep (or e.g. files titled .tuckrignore)

jasha-hrp avatar Aug 27 '24 02:08 jasha-hrp

I prefer adding the first option where the base group foo is not needed. It'll probably require some change in the way I'm handling groups but we'll see how it goes :)

RaphGL avatar Aug 27 '24 08:08 RaphGL

So it's been a while since this issue was reported. Back when this was reported there was no way of actually achieving this properly as I recall, since I tried a few times and it just needed too much to be able to do it properly.

But today, I decided to give it a shot again and it now seems to be "easily" achievable. I managed to implement this functionality and make it work, but while attempting to make a unit test work I ended up losing all my progress :))))

This was actually going to ship into the 0.10 release but I wanted to get the latest version on people's hands asap, I've marked this as 0.11. But since this is actually a usability issue for some, I might end up making a minor release for this if I feel like 0.11 will take too long to be ready.

RaphGL avatar Oct 30 '24 23:10 RaphGL

It's done now. If it you spot any bugs in how conditional groups are handled because of this, please let me know.

RaphGL avatar Nov 03 '24 20:11 RaphGL