Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[bug]: zinit compile --all operates on irrelevant files in $ZINIT[PLUGINS_DIR] #156

Open
nbrown opened this issue Jan 4, 2022 · 0 comments
Labels
bug Something isn't working

Comments

@nbrown
Copy link
Contributor

nbrown commented Jan 4, 2022

Issue description

macOS creates .DS_Store files in directories opened with finder. If one is created in the zinit plugin directory, ${ZINIT[PLUGINS_DIR]}, the command zinit compile --all treats .DS_Store as a plugin. This occurs because of the following line in zinit-autoload.zsh:

2332: plugins=( "${ZINIT[PLUGINS_DIR]}"/*(DN) )

If we add / to the glob qualifiers, files in the plugin directory won't be added to the plugins variable. I quickly checked to see if this construct is used anywhere else and found a few similar constructs:

zinit-autoload.zsh
2019:        files=( ${ZINIT[PLUGINS_DIR]}/*(ND/) )
2126:    plugins=( "${ZINIT[PLUGINS_DIR]}"/*(DN) )
2332:    plugins=( "${ZINIT[PLUGINS_DIR]}"/*(DN) )
2544:    plugin_paths=( "${ZINIT[PLUGINS_DIR]}"/*(DN) )
2940:    plugins=( ${ZINIT[PLUGINS_DIR]}/*(DN-/) )

This should probably be made consistent but I am unsure if the - should be included or not. I also did not do a thorough search, so there may be others I missed.

zinit config

zinit \
  null \
  atclone'true' \
  for zdharma_continuum/null

zinit version or commit ID

98d3eaa

zsh version

5.8

host info

OSTYPE=darwin20.0 CPUTYPE=x86_64 MACHTYPE=x86_64

@nbrown nbrown added 🎲 triage bug Something isn't working labels Jan 4, 2022
@vladdoster vladdoster changed the title 🐞 bug: zinit compile --all tries to operate on files (non-plugins) in ${ZINIT[PLUGINS_DIR]} bug: zinit compile --all tries to operate on (non-plugins) files in $ZINIT[PLUGINS_DIR] Apr 5, 2022
@vladdoster vladdoster changed the title bug: zinit compile --all tries to operate on (non-plugins) files in $ZINIT[PLUGINS_DIR] [bug]: zinit compile --all tries to operate on (non-plugins) files in $ZINIT[PLUGINS_DIR] Apr 30, 2022
@vladdoster vladdoster changed the title [bug]: zinit compile --all tries to operate on (non-plugins) files in $ZINIT[PLUGINS_DIR] [bug]: zinit compile --all operates on irrelevant files in $ZINIT[PLUGINS_DIR] Apr 30, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

2 participants