# flake8 completion -*- shell-script -*- proc _flake8 { local cur prev words cword split _init_completion -s || return match $prev { with -h|--help|--version|--exclude|--filename|--select|--ignore|\ --max-line-length|--max-complexity|--builtins return with --format setglobal COMPREPLY = ''( $( compgen -W 'default pylint' -- "$cur" ) ) return with --config _filedir return } $split && return if [[ $cur == -* ]] { setglobal COMPREPLY = ''( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) ) [[ $COMPREPLY == *= ]] && compopt -o nospace return } _filedir py } && complete -F _flake8 flake8 # ex: ts=4 sw=4 et filetype=sh