-
-
Notifications
You must be signed in to change notification settings - Fork 8.1k
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
Improve readability & complexity by nvm_has_not_aliased_exec() #1443
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks, this is a nice cleanup. Just a couple comments.
nvm.sh
Outdated
@@ -39,6 +39,12 @@ nvm_has() { | |||
type "${1-}" > /dev/null 2>&1 | |||
} | |||
|
|||
nvm_has_not_aliased_exec() { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
let's name this nvm_has_non_aliased
instead
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
update
nvm.sh
Outdated
@@ -39,6 +39,12 @@ nvm_has() { | |||
type "${1-}" > /dev/null 2>&1 | |||
} | |||
|
|||
nvm_has_not_aliased_exec() { | |||
if ! nvm_has "${1-}" || nvm_is_alias "${1-}"; then |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
can this function body just be nvm_has "${1-}" && ! nvm_is_alias "${1-}"
?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
updated
73ada3c
to
feabe9f
Compare
feabe9f
to
fa3631f
Compare
No description provided.