Skip to content
Browse files

[tab-completion.sh] Tab-complete the project name for every parameter

after the initial command, rather than only on the second parameter
  • Loading branch information...
1 parent 4750e2a commit 690dcd875bd571b1a3a438dbd850b96ae86b4150 carlin committed
Showing with 4 additions and 2 deletions.
  1. +4 −2 tab-completion.sh
View
6 tab-completion.sh
@@ -21,8 +21,10 @@ _proto ()
return 0
fi
- if [[ $COMP_CWORD -eq 2 ]]; then
- COMPREPLY=( $( compgen -W '$( command cat projects.list | grep -i '^[a-z0-9\-]*:$' | sed -e 's/://' )' -- $cur ) )
+ if [[ $COMP_CWORD > 1 ]]; then
+ COMPREPLY=( $( compgen -W '$( command cat projects.list \
+ | grep -i '^[a-z0-9\-]*:$' \
+ | sed -e 's/://' )' -- $cur ) )
return 0
fi
}

0 comments on commit 690dcd8

Please sign in to comment.
Something went wrong with that request. Please try again.