From 8bde92b21c311a28904ec9abf61818a9f34a86db Mon Sep 17 00:00:00 2001 From: miqlas <5569059+extrowerk@users.noreply.github.com> Date: Wed, 14 Feb 2018 01:44:35 +0100 Subject: [PATCH] bash_completion : bump (#2172) --- .../bash_completion-2.7.recipe | 65 +++++++++++++ .../patches/bash_completion-2.7.patchset | 96 +++++++++++++++++++ 2 files changed, 161 insertions(+) create mode 100644 app-shells/bash_completion/bash_completion-2.7.recipe create mode 100644 app-shells/bash_completion/patches/bash_completion-2.7.patchset diff --git a/app-shells/bash_completion/bash_completion-2.7.recipe b/app-shells/bash_completion/bash_completion-2.7.recipe new file mode 100644 index 000000000..6b4ba41d8 --- /dev/null +++ b/app-shells/bash_completion/bash_completion-2.7.recipe @@ -0,0 +1,65 @@ +SUMMARY="Tab-completion for the Bash shell" +DESCRIPTION="Since v2.04, bash has allowed you to intelligently program \ +and extend its standard completion behavior to achieve complex command \ +lines with just a few keystrokes. Imagine typing ssh [Tab] and being \ +able to complete on hosts from your ~/.ssh/known_hosts files. Or typing \ +man 3 str [Tab] and getting a list of all string handling functions in \ +the UNIX manual. mount system: [Tab] would complete on all exported \ +file-systems from the host called system, while make [Tab] would complete \ +on all targets in Makefile. This project was conceived to produce \ +programmable completion routines for the most common Linux/UNIX commands, \ +reducing the amount of typing sysadmins and programmers need to do on \ +a daily basis." +HOMEPAGE="https://github.com/scop/bash-completion" +COPYRIGHT="2006-2017 Debian Project" +LICENSE="GNU GPL v2" +REVISION="1" +SOURCE_URI="https://github.com/scop/bash-completion/releases/download/$portVersion/bash-completion-$portVersion.tar.xz" +CHECKSUM_SHA256="41ba892d3f427d4a686de32673f35401bc947a7801f684127120cdb13641441e" +SOURCE_DIR="bash-completion-$portVersion" +PATCHES="bash_completion-$portVersion.patchset" + +ARCHITECTURES="x86_64" + +PROVIDES=" + bash_completion = $portVersion + " +REQUIRES=" + cmd:bash + " +BUILD_REQUIRES=" + cmd:bash + " +BUILD_PREREQUIRES=" + haiku + cmd:aclocal + cmd:autoconf + cmd:automake + cmd:awk + cmd:bash + cmd:make + " + +GLOBAL_WRITABLE_FILES=" + settings/profile.d/bash_completion.sh auto-merge + " +USER_SETTINGS_FILES=" + settings/profile.d/bash_completion.sh + " + +BUILD() +{ + autoreconf -i + runConfigure ./configure + make $jobArgs +} + +INSTALL() +{ + make install +} + +#TEST() +#{ +# make check +#} diff --git a/app-shells/bash_completion/patches/bash_completion-2.7.patchset b/app-shells/bash_completion/patches/bash_completion-2.7.patchset new file mode 100644 index 000000000..543df517e --- /dev/null +++ b/app-shells/bash_completion/patches/bash_completion-2.7.patchset @@ -0,0 +1,96 @@ +From e2a76ee024fcf5ac70ebdd6bf875dd3010c193cc Mon Sep 17 00:00:00 2001 +From: Kostadin Damyanov +Date: Wed, 23 Sep 2015 22:55:52 +0300 +Subject: Add pkgman and finddir support. + + +diff --git a/completions/Makefile.am b/completions/Makefile.am +index 99c283c..9279511 100644 +--- a/completions/Makefile.am ++++ b/completions/Makefile.am +@@ -411,7 +411,10 @@ bashcomp_DATA = 2to3 \ + _yum \ + yum-arch \ + zopfli \ +- zopflipng ++ zopflipng \ ++ pkgman \ ++ finddir ++ + + EXTRA_DIST = $(bashcomp_DATA) + +diff --git a/completions/finddir b/completions/finddir +new file mode 100644 +index 0000000..cf7f6e4 +--- /dev/null ++++ b/completions/finddir +@@ -0,0 +1,17 @@ ++_finddir() ++{ ++ local cur words ++ _init_completion || return ++ ++ COMPREPLY=() ++ cur=${COMP_WORDS[COMP_CWORD]} ++ ++ if [[ "$cur" == -* ]]; then ++ COMPREPLY=( $( compgen -W '-l -v' -- "$cur" ) ) ++ else ++ COMPREPLY=( $( compgen -W '$( finddir -l )' -- "$cur" ) ) ++ fi ++ ++ return 0 ++} && ++complete -F _finddir finddir +diff --git a/completions/pkgman b/completions/pkgman +new file mode 100644 +index 0000000..f1f942f +--- /dev/null ++++ b/completions/pkgman +@@ -0,0 +1,42 @@ ++_pkgman() ++{ ++ local cur words ++ _init_completion || return ++ ++ COMPREPLY=() ++ cur=${COMP_WORDS[COMP_CWORD]} ++ ++ local special i ++ for (( i=0; i < ${#words[@]}-1; i++ )); do ++ if [[ ${words[i]} == @(install|uninstall) ]]; then ++ special=${words[i]} ++ fi ++ done ++ ++ if [[ -n $special ]]; then ++ case $special in ++ install) ++ COMPREPLY=( $( compgen -W "$( pkgman search -a -D | awk 'NR>2 { print $2 }' )" -- "$cur" ) ) ++ return 0 ++ ;; ++ uninstall) ++ COMPREPLY=( $( compgen -W "$( pkgman search -a -i | awk 'NR>2 { print $2 }' )" -- "$cur" ) ) ++ return 0 ++ ;; ++ *) ++ return 0 ++ ;; ++ esac ++ fi ++ ++ if [[ "$cur" == -* ]]; then ++ COMPREPLY=( $( compgen -W '-h --help' -- "$cur" ) ) ++ else ++ COMPREPLY=( $( compgen -W 'full-sync install search \ ++ uninstall update add-repo drop-repo list-repos refresh \ ++ resolve-dependencies' -- "$cur" ) ) ++ fi ++ ++ return 0 ++} && ++complete -F _pkgman pkgman +-- +2.2.2 +