diff options
author | Sean Enck | 2018-01-05 14:40:22 -0500 |
---|---|---|
committer | Sean Enck | 2018-01-05 14:40:22 -0500 |
commit | f437892c68e42a65904a03546e1bc65c884f30fe (patch) | |
tree | ab0bd886e0a27de28abdf38d7d384c0961c72948 | |
parent | af7a352e7b363e5c76fe15ef99da20b917c7a6bd (diff) | |
download | aur-f437892c68e42a65904a03546e1bc65c884f30fe.tar.gz |
adding bash completions
-rw-r--r-- | .SRCINFO | 5 | ||||
-rw-r--r-- | PKGBUILD | 9 | ||||
-rw-r--r-- | bash.completions | 11 |
3 files changed, 21 insertions, 4 deletions
@@ -1,17 +1,20 @@ pkgbase = python-pyxstitch pkgdesc = takes source code files and produces syntax-highlighted patterns for cross stitching. pkgver = 1.7.2 - pkgrel = 2 + pkgrel = 3 url = https://github.com/enckse/pyxstitch arch = any license = MIT depends = python depends = python-pillow depends = python-pygments + optdepends = bash-completion: for bash completions source = https://pypi.python.org/packages/17/06/5b6c179e7fbf26fdfd718290cc8a5d6d2de4da67f2c73d1a31c4472484ef/pyxstitch-1.7.2.tar.gz#md5=597c0a895b453f0c2a090280ed16aff5 source = https://raw.githubusercontent.com/enckse/pyxstitch/master/LICENSE + source = bash.completions md5sums = 597c0a895b453f0c2a090280ed16aff5 md5sums = 09b2ac6fbde8b1a1c4f223aa3ffedbba + md5sums = 689f58128e3ce8271ed5ef6faef70d9d pkgname = python-pyxstitch @@ -2,18 +2,21 @@ _name=pyxstitch pkgname=python-$_name pkgver=1.7.2 -pkgrel=2 +pkgrel=3 pkgdesc="takes source code files and produces syntax-highlighted patterns for cross stitching." arch=("any") url="https://github.com/enckse/$_name" license=('MIT') depends=('python' 'python-pillow' 'python-pygments') +optdepends=("bash-completion: for bash completions") _md5='597c0a895b453f0c2a090280ed16aff5' source=("https://pypi.python.org/packages/17/06/5b6c179e7fbf26fdfd718290cc8a5d6d2de4da67f2c73d1a31c4472484ef/$_name-$pkgver.tar.gz#md5=$_md5" - "https://raw.githubusercontent.com/enckse/$_name/master/LICENSE") -md5sums=("$_md5" "09b2ac6fbde8b1a1c4f223aa3ffedbba") + "https://raw.githubusercontent.com/enckse/$_name/master/LICENSE" + "bash.completions") +md5sums=("$_md5" "09b2ac6fbde8b1a1c4f223aa3ffedbba" "689f58128e3ce8271ed5ef6faef70d9d") package() { install -Dm644 LICENSE "$pkgdir"/usr/share/licenses/$pkgname/LICENSE + install -Dm 644 bash.completions $pkgdir/usr/share/bash-completion/completions/pyxstitch cd "$srcdir/$_name-$pkgver" python setup.py install --root="$pkgdir/" --optimize=1 } diff --git a/bash.completions b/bash.completions new file mode 100644 index 000000000000..831d07890137 --- /dev/null +++ b/bash.completions @@ -0,0 +1,11 @@ +function _pyxstitch() +{ + local cur opts + if [ $COMP_CWORD -eq 1 ]; then + cur=${COMP_WORDS[COMP_CWORD]} + opts=$(pyxstitch --help | sed "s/^\s*//g;s/, //g;s/^-h//g" | grep "^\-" | cut -d " " -f 1) + COMPREPLY=( $(compgen -W "$opts" -- $cur) ) + fi +} + +complete -F _pyxstitch pyxstitch |