# bash completion for jshint -*- shell-script -*- proc _jshint { local cur prev words cword split _init_completion -s || return match $prev { with -v|--version|-h|--help|--exclude|--filename|-e|--extra-ext return with -c|--config _filedir return with --reporter setglobal COMPREPLY = ''( $( compgen -W "jslint checkstyle unix" -- "$cur" ) ) return with --extract setglobal COMPREPLY = ''( $( compgen -W "auto always never" -- "$cur" ) ) return } $split && return if [[ $cur == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir js } && complete -F _jshint jshint # ex: ts=4 sw=4 et filetype=sh