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

stop "setopt nullglob" from leaking into user's shell #207

Open
wants to merge 1 commit into
base: master
Choose a base branch
from

Conversation

alinsavix
Copy link

In the install_requirements function, we do a setopt nullglob and never attempt to set it back to how it was set previously, which means that the behavior of the user's shell as a whole can (and likely will, as this isn't the default) change globbing behavior without the user's knowledge or consent.

Adding a setopt localoptions before changing any options will cause changed options to reset to their original values when the enclosing function exits, stopping this option change from leaking into the user's shell. See LOCAL_OPTIONS at https://zsh.sourceforge.io/Doc/Release/Options.html for more details

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.

1 participant