I have met a command to load nvm environment in .zshrc, but I don't know what it exactly does with flag -s. I know that the square bracket is condition to check whether folder in this command exists or not. But don't know what -s does.
[ -s "/usr/local/opt/nvm/nvm.sh" ] && . "/usr/local/opt/nvm/nvm.sh" # This loads nvm
Does anyone know the flag -s in this command? Thank in advance.
[
is the same as test
. Checking test
's manpage:
-s file True if file exists and has a size greater than zero.
Update: Actually, using man '['
works, too.