- links completion by Alan Ford <alan@whirlnet.co.uk>

This commit is contained in:
ianmacd 2002-10-01 06:55:38 +00:00
parent 10f0ddb851
commit dc4838bad9

View File

@ -1,6 +1,6 @@
# bash_completion - some programmable completion functions for bash 2.05b
#
# $Id: bash_completion,v 1.417 2002/10/01 08:07:33 ianmacd Exp $
# $Id: bash_completion,v 1.418 2002/10/01 08:55:38 ianmacd Exp $
#
# Copyright (C) Ian Macdonald <ian@caliban.org>
#
@ -77,7 +77,7 @@ complete -f -X '!*.@(mid?(i))' timidity playmidi
complete -f -X '*.@(o|so|so.*|a|tar|tgz|tbz2|rpm|zip|ZIP|gif|GIF|jp?(e)g|JP?(E)G|mp3|MP3|mpg|MPG|avi|AVI|asf|ASF|ogg|OGG)' vi vim gvim emacs
complete -f -X '!*.@(exe|EXE|com|COM|scr|SCR)' wine
complete -f -X '!*.@(zip|ZIP|z|Z|gz|GZ|tgz|TGZ)' bzme
complete -f -X '!*.@(htm?(l))' netscape mozilla lynx opera w3m galeon links curl dillo elinks
complete -f -X '!*.@(htm?(l))' netscape mozilla lynx opera w3m galeon curl dillo elinks
# FINISH exclude -- do not remove this line
# start of section containing compspecs that can be handled within bash
@ -3799,6 +3799,41 @@ _lilo()
}
[ "$have" ] && complete -F _lilo lilo
# links completion
#
have links &&
_links()
{
local cur
COMPREPLY=()
cur=${COMP_WORDS[COMP_CWORD]}
case "$cur" in
--*)
COMPREPLY=( $( compgen -W '--help' -- $cur ) )
;;
-*)
COMPREPLY=( $( compgen -W '-async-dns -max-connections \
-max-connections-to-host -retries \
-receive-timeout -unrestartable-receive-timeout\
-format-cache-size -memory-cache-size \
-http-proxy -ftp-proxy -download-dir \
-assume-codepage -anonymous -dump -no-connect \
-source -version -help' -- $cur ) )
;;
*)
COMPREPLY=( $( compgen -W '$( < ~/.links/links.his )' \
-- $cur ) )
_filedir '@(htm|html)'
return 0
;;
esac
return 0
}
[ "$have" ] && complete -F _links $filenames links
_filedir_xspec()
{
local IFS cur xspec