From 5d691f64871393a5226481b1086e68e69966296e Mon Sep 17 00:00:00 2001 From: Steve Mao Date: Thu, 11 May 2017 22:20:13 +1000 Subject: [PATCH] add tab completion --- bin/completion.sh | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 bin/completion.sh diff --git a/bin/completion.sh b/bin/completion.sh new file mode 100644 index 0000000..1542d4a --- /dev/null +++ b/bin/completion.sh @@ -0,0 +1,7 @@ +_npmRunComplete() +{ + local cur=${COMP_WORDS[COMP_CWORD]} + COMPREPLY=( $(compgen -W "$(ls $(npm bin))" -- $cur) ) +} + +complete -F _npmRunComplete npm-run