-
-
Notifications
You must be signed in to change notification settings - Fork 7.9k
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 bash_completion coding style #1816
Conversation
@@ -3,19 +3,19 @@ | |||
# bash completion for Node Version Manager (NVM) | |||
|
|||
if ! command -v nvm &> /dev/null; then | |||
return |
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.
is editorconfig not being enforced on this file already?
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.
Nope as it can't understand the syntax, it can yell when the indentation is 3 or 5 spaces, but as we set to 2 space, 4 or 6 spaces will be both fine to it.
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.
Why can't it understand the syntax?
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.
it's not language based.
bash_completion
Outdated
@@ -3,19 +3,19 @@ | |||
# bash completion for Node Version Manager (NVM) | |||
|
|||
if ! command -v nvm &> /dev/null; then | |||
return | |||
return | |||
fi | |||
|
|||
__nvm_generate_completion() | |||
{ |
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.
these curly braces should all be in OTBS, not in allman style.
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.
Sure
bash_completion
Outdated
esac | ||
case "${current_word}" in | ||
-*) __nvm_options ;; | ||
*) __nvm_generate_completion "${COMMANDS}" ;; |
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.
these really only need one space after )
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.
Cool, I prefer that.
9690c2d
to
e7ade17
Compare
Updated. BTW, CI not triggered? |
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.
LGTM, but I'm looking into why CI isn't running.
Correct the indent and make the code more readable