[Bash-completion-commits] [bash-completion] 01/02: pyflakes: New completion
Ville Skyttä
scop-guest at moszumanska.debian.org
Sat Feb 8 18:59:40 UTC 2014
This is an automated email from the git hooks/post-receive script.
scop-guest pushed a commit to branch master
in repository bash-completion.
commit e14617e498f0e2e2faceea9205f96d72c3e9ef8d
Author: Ville Skyttä <ville.skytta at iki.fi>
Date: Sat Feb 8 20:55:50 2014 +0200
pyflakes: New completion
---
completions/Makefile.am | 1 +
completions/pyflakes | 23 +++++++++++++++++++++++
test/completion/pyflakes.exp | 1 +
test/lib/completions/pyflakes.exp | 18 ++++++++++++++++++
4 files changed, 43 insertions(+)
diff --git a/completions/Makefile.am b/completions/Makefile.am
index 7666ade..ec06a9e 100644
--- a/completions/Makefile.am
+++ b/completions/Makefile.am
@@ -283,6 +283,7 @@ bashcomp_DATA = 2to3 \
pwdx \
pwgen \
pydoc \
+ pyflakes \
pylint \
python \
qdbus \
diff --git a/completions/pyflakes b/completions/pyflakes
new file mode 100644
index 0000000..f374252
--- /dev/null
+++ b/completions/pyflakes
@@ -0,0 +1,23 @@
+# pyflakes(1) completion -*- shell-script -*-
+
+_pyflakes()
+{
+ local cur prev words cword
+ _init_completion || return
+
+ case $prev in
+ -h|--help|--version)
+ return
+ ;;
+ esac
+
+ if [[ $cur == -* ]]; then
+ COMPREPLY=( $( compgen -W '$( _parse_help "$1" )' -- "$cur" ) )
+ return
+ fi
+
+ _filedir py
+} &&
+complete -F _pyflakes pyflakes
+
+# ex: ts=4 sw=4 et filetype=sh
diff --git a/test/completion/pyflakes.exp b/test/completion/pyflakes.exp
new file mode 100644
index 0000000..b10445f
--- /dev/null
+++ b/test/completion/pyflakes.exp
@@ -0,0 +1 @@
+assert_source_completions pyflakes
diff --git a/test/lib/completions/pyflakes.exp b/test/lib/completions/pyflakes.exp
new file mode 100644
index 0000000..22a8cf7
--- /dev/null
+++ b/test/lib/completions/pyflakes.exp
@@ -0,0 +1,18 @@
+proc setup {} {
+ save_env
+}
+
+
+proc teardown {} {
+ assert_env_unmodified
+}
+
+
+setup
+
+
+assert_complete_any "pyflakes "
+sync_after_int
+
+
+teardown
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/bash-completion/bash-completion.git
More information about the Bash-completion-commits
mailing list