summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-client/surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch')
-rw-r--r--www-client/surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch37
1 files changed, 37 insertions, 0 deletions
diff --git a/www-client/surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch b/www-client/surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch
new file mode 100644
index 000000000000..4e17de986a73
--- /dev/null
+++ b/www-client/surfraw/files/surfraw-2.1.5-gentoo_pkg_tools.patch
@@ -0,0 +1,37 @@
+ Needs a little more thought, or some method which would allow for an upstream
+push without affecting the non-Gentoo users.
+
+Index: surfraw-2.1.5/surfraw-bash-completion.IN
+===================================================================
+--- surfraw-2.1.5/surfraw-bash-completion.IN {cset 8f95d483-869f-47ba-aba2-f0a12bb9dd07}
++++ surfraw-2.1.5/surfraw-bash-completion.IN {local clone}
+@@ -1,4 +1,20 @@
+ # -*- sh -*- bash programmable completion for Surfraw, v2.2
++_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]}
+@@ -14,7 +30,7 @@ _surfraw()
+ 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:-''}) )