Commit b81ee2b5 authored by Moritz Muehlenhoff's avatar Moritz Muehlenhoff

Changes from Justin B Rye

parent e8484a77
......@@ -18,6 +18,7 @@
Tur Mar 30 01:21:03 CEST 2004 - surfraw 2.0.2
* Added bash completion support by Justin B Rye
* Do not set $DISPLAY when running in text mode
* Removed sharereactor elvi
Tue Feb 10 04:01:40 GMT 2004 - surfraw 2.0.1
......
surfraw (2.0.2-1) unstable; urgency=low
* Added bash completion code by Justin B Rye (Closes: #240629)
* Several patches from Justin B Rye:
+ Add bash completion (Closes: #240629)
+ Add some missing elvis in surfraw_elvi.list (Closes: #241079)
+ Don't set DISPLAY when in text-only mode (Closes: #235251)
+ Correctly test for text-mode in w3_browse_url()
+ Readability improvements
+ Use argv[0] instead of computing it through basename
* Removed elvi:
+ sharereactor: has been closed down
......
# Programmable completion for Surfraw elvi
_surfraw()
{ COMPREPLY=( $( compgen -W "$(ls /usr/lib/surfraw)" -- ${COMP_WORDS[COMP_CWORD]} ) )
# -*- sh -*- bash programmable completion for Surfraw, v2.1
_surfraw()
{ COMPREPLY=()
local cur=${COMP_WORDS[COMP_CWORD]}
local prev=${COMP_WORDS[COMP_CWORD-1]}
local opts='-browser= -elvi -escape-url-args -graphical \
-help -p0rn -q -quote -quiet -text -version'
local elvi="$(cut -f1 /etc/surfraw.bookmarks ~/.surfraw.bookmarks 2>&-
ls /usr/lib/surfraw 2>&-)"
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 ]
then COMPREPLY=( $( compgen -W "$elvi" -- $cur ) )
# "sr g<tab>" for google
elif [[ $prev == @(alioth|deb@(bug|content|package)s|freshmeat|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"
then COMPREPLY=( $(/usr/bin/look ${cur:-''}) )
# "sr l<tab> vy<tab>" to find the German for "vying"
else COMPREPLY=( $( compgen -o default -- $cur) ) # copout
fi
return 0
}
complete -F _surfraw surfraw sr
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment