nvm enables zsh's nonomatch option globally #1937
Labels
bugs
Oh no, something's broken :-(
pull request wanted
This is a great way to contribute! Help us out :-D
shell: zsh
Operating system and version: macOS
nvm debug
output:nvm ls
output:How did you install
nvm
?: HomebrewWhat steps did you perform?
Sourced
nvm.sh
from my~/.zshrc
.setopt
reports thenonomatch
option is set.setopt
reports thenonomatch
option is unset (ornomatch
is set)..bashrc
,.bash_profile
,.zshrc
, etc) that modifies thePATH
?Yes, but that is unrelated.
I can see why you added the check for the
nomatch
option in f9e14b7. By default zsh reports an error when you glob something that does not exist. The problem is that the way the option is enabled makes it the global default, regardless of user preference.The zsh way would be to either add the
N
glob qualifier to the globs used innvm_check_file_permissions
, but that would yield to different behaviors on shells that do not support zsh glob qualifiers.Another zsh-specific option is to use
setopt local_options <some-option>
to scope the option to the function.The text was updated successfully, but these errors were encountered: