Created
February 3, 2019 13:37
-
-
Save YodasWs/3fb981b0ae8725faa00000525ffab838 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
# Gulp Completion | |
# Sam Grundman <[email protected]> | |
# | |
# This will auto-complete your Gulp task names when you hit tab! | |
# | |
# License: CC BY 4.0 https://creativecommons.org/licenses/by/4.0/ | |
# | |
# Installation | |
# 1. Save to ~/ | |
# 2. in .bashrc: | |
# source ~/gulp-completion.sh | |
function _gulp_completions() { | |
# Get all gulp tasks as known by gulp | |
gulp_tasks=`gulp --tasks-simple` | |
# Without this autocompletion would not work for colons | |
COMP_WORDBREAKS=${COMP_WORDBREAKS//:} | |
# Tell complete what stuff to show. | |
COMPREPLY=($(compgen -W "$gulp_tasks" -- "$cur")) | |
} | |
complete -o default -F _gulp_completions gulp |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment