[Surfraw-devel] Bug#361668: surfraw: bash-completer updates
Justin B Rye
jbr at edlug.org.uk
Sun Apr 9 14:12:55 UTC 2006
Package: surfraw
Version: 2.1.4
Severity: wishlist
Tags: patch
This adds the new "sr debsec" and "sr fsfdir" to the list of elvi
for which tab-completion offers packagenames rather than dictionary
words. It also corrects the comment referring to "sr g<tab>", now
that the gutenberg elvis is there to get in google's way.
I am not going to try to come up with a patch that tab-completes for
"sr yubnub" by first calling "sr yubnub ls".
Hang on, why does it mix old-style [] tests with new-style [[]]
tests? Optional cumulative patch #2 for increased consistency.
-- System Information:
Debian Release: testing/unstable
APT prefers testing
APT policy: (500, 'testing'), (50, 'unstable')
Architecture: i386 (i586)
Shell: /bin/sh linked to /bin/bash
Kernel: Linux 2.6.16.xamanek
Locale: LANG=en_GB, LC_CTYPE=en_GB (charmap=ISO-8859-1)
Versions of packages surfraw depends on:
ii firefox [www-browser] 1.5.dfsg+1.5.0.1-4 lightweight web browser based on M
ii w3m [www-browser] 0.5.1-4 WWW browsable pager with excellent
Versions of packages surfraw recommends:
ii w3m 0.5.1-4 WWW browsable pager with excellent
-- debconf information:
* surfraw/surfraw-path:
surfraw/surfraw-v2-upgrade:
--
JBR
Ankh kak! (Ancient Egyptian blessing)
-------------- next part --------------
--- /etc/bash_completion.d/surfraw 2005-04-20 23:14:03.000000000 +0100
+++ /etc/bash_completion.d/surfraw.23 2006-04-09 02:18:58.000000000 +0100
@@ -1,4 +1,4 @@
-# -*- sh -*- bash programmable completion for Surfraw, v2.2
+# -*- sh -*- bash programmable completion for Surfraw, v2.3
_surfraw()
{ COMPREPLY=()
local cur=${COMP_WORDS[COMP_CWORD]}
@@ -12,8 +12,8 @@
# I can't see a way to get the =yes/=no parts to work...
elif [ "$COMP_CWORD" -eq 1 ]
then COMPREPLY=( $( compgen -W "$elvi" -- $cur ) )
- # "sr g<tab>" for google
- elif [[ $prev == @(alioth|deb@(bug|content|package|pt)s|freshmeat|sourceforge) ]]
+ # "sr go<tab>" for google
+ elif [[ $prev == @(alioth|deb@(bugs|contents|packages|pts|sec)|freshmeat|fsfdir|sourceforge) ]]
then COMPREPLY=( $(apt-cache --generate pkgnames $cur) )
# "sr debbugs 4<tab>" to check 44bsd-rdist bugs...
elif test -x /usr/bin/look # in bsdmainutils, "important"
-------------- next part --------------
--- surfraw.23 2006-04-09 02:18:58.000000000 +0100
+++ surfraw.24 2006-04-09 02:26:43.000000000 +0100
@@ -1,4 +1,4 @@
-# -*- sh -*- bash programmable completion for Surfraw, v2.3
+# -*- sh -*- bash programmable completion for Surfraw, v2.4
_surfraw()
{ COMPREPLY=()
local cur=${COMP_WORDS[COMP_CWORD]}
@@ -10,13 +10,13 @@
if [[ $cur == -* ]]
then COMPREPLY=( $( compgen -W "$opts" -- $cur ) )
# I can't see a way to get the =yes/=no parts to work...
- elif [ "$COMP_CWORD" -eq 1 ]
+ elif [[ $COMP_CWORD -eq 1 ]]
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) )
# "sr debbugs 4<tab>" to check 44bsd-rdist bugs...
- elif test -x /usr/bin/look # in bsdmainutils, "important"
+ elif [[ -x /usr/bin/look ]] # in bsdmainutils, "important"
then COMPREPLY=( $(/usr/bin/look ${cur:-''}) )
# "sr l<tab> vy<tab>" to find the German for "vying"
else COMPREPLY=( $( compgen -o default -- $cur) ) # copout
More information about the Surfraw-devel
mailing list