Skip to content

Instantly share code, notes, and snippets.

@marek-saji
Created June 28, 2014 20:09
Show Gist options
  • Save marek-saji/3d42144093d60a122da7 to your computer and use it in GitHub Desktop.
Save marek-saji/3d42144093d60a122da7 to your computer and use it in GitHub Desktop.
__gulp()
{
local cur prev
COMPREPLY=()
cur="${COMP_WORDS[COMP_CWORD]}"
if ! type gulp >/dev/null 2>&1
then
return 0
fi
if [[ ${cur} == * ]]
then
COMPREPLY=( $(compgen -W "$( gulp --tasks | grep ─ | grep -v │ | cut -d\ -f3- )" -- ${cur}) )
return 0
fi
}
complete -F __gulp gulp
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment