Last active
August 29, 2015 14:05
-
-
Save davesque/205df31dd64933c89f0b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
_s() { | |
COMPREPLY=() | |
cur="${COMP_WORDS[COMP_CWORD]}" | |
if [[ $COMP_CWORD -eq 1 ]]; then | |
opts=($S_BIN_PATH/*) | |
basenames="${opts[@]##*/}" | |
COMPREPLY=( $(compgen -W "${basenames[@]}" -- $cur) ) | |
fi | |
} | |
complete -F _s s |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment