diff options
author | Jeroen Roovers <jer@gentoo.org> | 2018-02-05 21:47:51 +0100 |
---|---|---|
committer | Jeroen Roovers <jer@gentoo.org> | 2018-02-05 21:48:08 +0100 |
commit | 90495f87e0831ee83b4da2634d03618a099fe5ac (patch) | |
tree | b037bbd4b824ab9bf33241e75cccb379c1675862 /www-client/surfraw/files | |
parent | sys-apps/portage: git portage requires gemato-11+ (diff) | |
download | gentoo-90495f87e0831ee83b4da2634d03618a099fe5ac.tar.gz gentoo-90495f87e0831ee83b4da2634d03618a099fe5ac.tar.bz2 gentoo-90495f87e0831ee83b4da2634d03618a099fe5ac.zip |
www-client/surfraw: Version 2.3.0.
Package-Manager: Portage-2.3.24, Repoman-2.3.6
Diffstat (limited to 'www-client/surfraw/files')
-rw-r--r-- | www-client/surfraw/files/surfraw-2.3.0-completion.patch | 43 |
1 files changed, 43 insertions, 0 deletions
diff --git a/www-client/surfraw/files/surfraw-2.3.0-completion.patch b/www-client/surfraw/files/surfraw-2.3.0-completion.patch new file mode 100644 index 000000000000..1f86ec55f014 --- /dev/null +++ b/www-client/surfraw/files/surfraw-2.3.0-completion.patch @@ -0,0 +1,43 @@ +--- a/surfraw-bash-completion.IN ++++ b/surfraw-bash-completion.IN +@@ -4,6 +4,23 @@ + # installing the bash-completion package which sets this explicitly. + shopt -s extglob + ++_srpkgname() ++{ ++ local pd ++ local dir=$(sed -n -e '/^PORTDIR=/ { s/^[^=]\+="\?\([^"]\+\|\S\+\).*/\1/p ; q }' \ ++ /etc/make.{conf,globals})/* ++ local cur="$1" ++ ++ COMPREPLY=($(compgen -W "$( ++ for pd in $dir ++ do ++ [ ! -d ${pd} ] && continue ++ builtin cd ${pd} ++ echo * ++ done)" -- ${cur}) ++ ) ++} ++ + _surfraw() + { COMPREPLY=() + local cur=${COMP_WORDS[COMP_CWORD]} +@@ -20,7 +37,7 @@ + then COMPREPLY=( $( compgen -W "$elvi" -- $cur ) ) + # "sr go<tab>" for google + elif [[ $prev == @(alioth|deb@(bugs|contents|packages|pts|sec)|freshmeat|fsfdir|sourceforge) ]] +- then COMPREPLY=( $(apt-cache --generate pkgnames $cur) ) ++ then _srpkgname ${cur} + # "sr debbugs 4<tab>" to check 44bsd-rdist bugs... + elif [[ -x /usr/bin/look ]] # in bsdmainutils, "important" + then COMPREPLY=( $(/usr/bin/look ${cur:-''}) ) +@@ -29,5 +46,5 @@ + fi + return 0 + } +-# test first in case removed-but-unpurged +-type -p surfraw >/dev/null 2>&1 && complete -F _surfraw surfraw sr ++ ++complete -F _surfraw surfraw sr |