Skip to content

Conversation

@mattdodge
Copy link

Certain libraries and plugins (e.g. neomake) may have .zsh files in test folders. These are not intended to be sourced when starting up.

@mattdodge mattdodge force-pushed the patch-1 branch 2 times, most recently from a4a4252 to f2f6c36 Compare November 6, 2018 18:17
@blueyed
Copy link

blueyed commented Nov 8, 2018

As mentioned in neomake/neomake#2123 (comment) you should have a whitelist instead probably, i.e. only certain folders.
But maybe it's also not meant to e.g. have Neomake and other things in $ZSH in the first place?

@mattdodge mattdodge changed the title Ignore zsh files in test folders Only source zsh files from top-level topic directories Nov 9, 2018
@mattdodge
Copy link
Author

@blueyed makes a great point I think. Unless I've set up my dotfiles folder incorrectly, then a lot of plugin directories end up nested under the dotfiles folders (e.g. vim, tmux, zsh). Using the globstar ** means recursing all the way down and finding anything that ends with .zsh and sourcing it. A malicious library could include a zsh file and run that code in every user's environment.

I've modified this PR to only look in the top-level topic directories for zsh files to source. I think that's a bit more in the spirit of what this features is trying to do anyways. In fact the description on the README already kind of indicates it's only going to look in that top level (although I added a clarification just in case).

carhartl added a commit to carhartl/dotfiles that referenced this pull request Nov 10, 2018
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