diff --git a/clean_files.txt b/clean_files.txt index de0f6c1e87..61eb8b2fb9 100644 --- a/clean_files.txt +++ b/clean_files.txt @@ -51,6 +51,7 @@ completion/available/gem.completion.bash completion/available/git.completion.bash completion/available/github-cli.completion.bash completion/available/go.completion.bash +completion/available/gulp.completion.bash completion/available/helm.completion.bash completion/available/jboss5.completion.bash completion/available/jboss7.completion.bash diff --git a/completion/available/gulp.completion.bash b/completion/available/gulp.completion.bash index 91e287645a..09d69b7286 100644 --- a/completion/available/gulp.completion.bash +++ b/completion/available/gulp.completion.bash @@ -1,50 +1,5 @@ -#!/bin/bash -# Borrowed from grunt-cli -# http://gruntjs.com/ -# -# Copyright jQuery Foundation and other contributors, https://jquery.org/ +# shellcheck shell=bash -# This software consists of voluntary contributions made by many -# individuals. For exact contribution history, see the revision history -# available at https://github.com/gruntjs/grunt . - -# The following license applies to all parts of this software except as -# documented below: - -# ==== - -# Permission is hereby granted, free of charge, to any person obtaining -# a copy of this software and associated documentation files (the -# "Software"), to deal in the Software without restriction, including -# without limitation the rights to use, copy, modify, merge, publish, -# distribute, sublicense, and/or sell copies of the Software, and to -# permit persons to whom the Software is furnished to do so, subject to -# the following conditions: - -# The above copyright notice and this permission notice shall be -# included in all copies or substantial portions of the Software. - -# THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, -# EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF -# MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND -# NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE -# LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION -# OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION -# WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE. - -# Usage: -# -# To enable bash completion for gulp, add the following line (minus the -# leading #, which is the bash comment character) to your ~/.bashrc file: -# -# eval "$(gulp --completion=bash)" -# Enable bash autocompletion. -function _gulp_completions() { -# The currently-being-completed word. -local cur="${COMP_WORDS[COMP_CWORD]}" -#Grab tasks -local compls=$(gulp --tasks-simple) -# Tell complete what stuff to show. -COMPREPLY=($(compgen -W "$compls" -- "$cur")) -} -complete -o default -F _gulp_completions gulp +if _command_exists gulp; then + eval "$(gulp --completion=bash)" +fi