Skip to content

Conversation

PeterDaveHello
Copy link
Collaborator

No description provided.

@@ -92,5 +92,5 @@ if [[ -n ${ZSH_VERSION-} ]]; then
autoload -U +X bashcompinit && bashcompinit
fi

complete -o default -o nospace -F __nvm nvm
complete -o default -F __nvm nvm
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Can you elaborate on what this change does and why it's preferred?

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

If you type nvm a[tab it'll give you only nvm alias, so if you want to keep entering the next parameter, you'll need to manually add another space here, then you can press [tab] again, or it'll not work. By removing -o no space, the same situation, it'll give you nvm alias , and you can directly press the next [tab] for the next parameter, that's what most of the bash_completions doing, I don't know why we should disable it here.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm - I feel like that might be safer, in that you can't accidentally tab through more than one argument.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

That's not what the other bash_completions doing, will be special case, which makes no sense, as the previous PR, you can try curl --compr[tab] or git --vers[tab], they'll give you the space.

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

fair enough

@ljharb ljharb force-pushed the bash_completion-space branch from f0eea84 to 676fff0 Compare March 28, 2017 07:22
@ljharb ljharb merged commit 676fff0 into nvm-sh:master Mar 28, 2017
@PeterDaveHello PeterDaveHello deleted the bash_completion-space branch March 28, 2017 08:03
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.

2 participants