Skip to content

Commit

Permalink
feat(nvm): add fallback 3rd-party completion loader
Browse files Browse the repository at this point in the history
  • Loading branch information
akinomyoga and scop committed Sep 18, 2023
1 parent e3cbfba commit dea7e1d
Show file tree
Hide file tree
Showing 4 changed files with 11 additions and 0 deletions.
1 change: 1 addition & 0 deletions completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -299,6 +299,7 @@ bashcomp_DATA = 2to3 \
nslookup \
nsupdate \
ntpdate \
_nvm \
oggdec \
openssl \
opera \
Expand Down
8 changes: 8 additions & 0 deletions completions/_nvm
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# 3rd party completion loader for nvm -*- shell-script -*-
#
# This serves as a fallback in case the completion is not installed otherwise.

# shellcheck disable=SC1091
[[ ${NVM_DIR-} && -r $NVM_DIR/bash_completion ]] && . "$NVM_DIR"/bash_completion

# ex: filetype=sh
1 change: 1 addition & 0 deletions test/fallback/completions/Makefile.am
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,7 @@ EXTRA_DIST = \
newgrp \
nmcli \
nox \
nvm \
pip \
pipenv \
renice \
Expand Down
1 change: 1 addition & 0 deletions test/fallback/completions/nvm

0 comments on commit dea7e1d

Please sign in to comment.