NVM autocompletions
Glennmen opened this issue · comments
Would it be interesting to add autocompletion to zsh-nvm just like the default nvm plugin has? https://github.com/robbyrussell/oh-my-zsh/blob/master/plugins/nvm/_nvm
If interested I can try to make a PR for this.
A PR would be welcome for this :)
I will warn you though, my availability for OSS is not great right now so I can't promise I'll be able to review quickly.
@lukechilds I was thinking about copying it from the main nvm
plugin so it should be a quick PR. Of course I will test it first before making a PR to be sure that it works with lazy loading.
@lukechilds @Glennmen Could we as an easy start just activate the out-of-the-box completions already provided by nvm-sh? They are in
https://github.com/nvm-sh/nvm/blob/master/bash_completion
(and work with Zsh as well).
For example
[[ -s $NVM_DIR/bash_completion ]] && \. $NVM_DIR/bash_completion
could be added to
zsh-nvm.plugin.zsh
with or without a separate environment variable flag like NVM_USE_COMPLETIONS
.
(I would argue they should be active by default.)
@memark @lukechilds The reason why I don't like the included bash nvm-sh completion compared to the custom ZSH nvm completion.
Zsh completion gives the option to add extra information to the commands, which can of course be very useful when you are looking for the correct command.
@Glennmen I totally understand. I guess it's a tradeoff between functionality and maintainability.