flake8: New completion

This commit is contained in:
Ville Skyttä 2014-02-08 20:59:30 +02:00
parent e14617e498
commit 5152356ad1
4 changed files with 55 additions and 0 deletions

View File

@ -97,6 +97,7 @@ bashcomp_DATA = 2to3 \
filesnarf \ filesnarf \
find \ find \
find_member \ find_member \
flake8 \
freebsd-update \ freebsd-update \
freeciv-gtk2 \ freeciv-gtk2 \
freeciv-server \ freeciv-server \

35
completions/flake8 Normal file
View File

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

View File

@ -0,0 +1 @@
assert_source_completions flake8

View File

@ -0,0 +1,18 @@
proc setup {} {
save_env
}
proc teardown {} {
assert_env_unmodified
}
setup
assert_complete_any "flake8 "
sync_after_int
teardown