Skip to content

Conversation

@schmir
Copy link

@schmir schmir commented Oct 17, 2024

I'm using yadm and would like to track the plugins as submodules of the yadm repository. When checking out such a submodule, .git is not a directory, but rather a file. This resulted in the following error, for each of the plugins that I track as a submodule:

% exec zsh
.znap.source:16: no directory expansion: ~[superbrothers/zsh-kubectl-prompt] 
.znap.source:16: no directory expansion: ~[mattmc3/zfunctions] 
.znap.source:16: no directory expansion: ~[olets/zsh-abbr] 
.znap.source:16: no directory expansion: ~[Aloxaf/fzf-tab]

With this commit ..znap.repos and ..znap.dirname handle that case. Please note that there are other checks in some of the scripts that do also check for a .git directory. They may still need to be changed.

Before submitting your Pull Request (PR), please check the following:

  • There is no other PR (open or closed) similar to yours. If there is, please first discuss over there.
  • Your new code in each file follows the same style as the existing code in that file.
  • Each commit messages follows the Seven Rules of a Great Commit Message.
  • Each commit message includes Fixes #<bug> or Resolves #<issue> in its body (not subject, that is, the
    first line) for each issue it resolves (if any).
  • You have squashed any redundant or insignificant commits.

I'm using yadm and would like to track the plugins as submodules of the yadm
repository. When checking out such a submodule, .git is not a directory, but
rather a file. This resulted in the following error, for each of the plugins
that I track as a submodule:

% exec zsh
.znap.source:16: no directory expansion: ~[superbrothers/zsh-kubectl-prompt]
.znap.source:16: no directory expansion: ~[mattmc3/zfunctions]
.znap.source:16: no directory expansion: ~[olets/zsh-abbr]
.znap.source:16: no directory expansion: ~[Aloxaf/fzf-tab]

With this commit ..znap.repos and ..znap.dirname handle that case. Please note
that there are other checks in some of the scripts that do also check for a .git
directory. They may still need to be changed.
@marlonrichert
Copy link
Owner

Thanks for wanting to contribute! 🙂

I have one problem with your solution, though: What if you wanted to let Znap handle submodules in multiple repos? And if so, then what if multiple repos contain the same submodule? Your code doesn't address that.

@marlonrichert marlonrichert self-requested a review June 30, 2025 10:02
@marlonrichert marlonrichert removed their request for review June 30, 2025 11:22
@schmir
Copy link
Author

schmir commented Sep 16, 2025

What if you wanted to let Znap handle submodules in multiple repos?

I'm not even sure what that should mean. Can you explain that a bit more?

@schmir
Copy link
Author

schmir commented Nov 21, 2025

I'm closing that one since we now have conflicts and I don't use znap anymore.

@schmir schmir closed this Nov 21, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants