diff options
author | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
---|---|---|
committer | Daniel Baumann <daniel.baumann@progress-linux.org> | 2024-05-04 01:03:18 +0000 |
commit | f2621414ee5f2f601424c22f00e207903e3b6104 (patch) | |
tree | 56a856dafd1ca684bb23263cacaa723ee4f404fc /completions/links | |
parent | Adding debian version 1:2.11-8. (diff) | |
download | bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.tar.xz bash-completion-f2621414ee5f2f601424c22f00e207903e3b6104.zip |
Merging upstream version 1:2.12.0.
Signed-off-by: Daniel Baumann <daniel.baumann@progress-linux.org>
Diffstat (limited to 'completions/links')
-rw-r--r-- | completions/links | 48 |
1 files changed, 24 insertions, 24 deletions
diff --git a/completions/links b/completions/links index e0c28e2..989e9e0 100644 --- a/completions/links +++ b/completions/links @@ -1,17 +1,17 @@ # bash completion for links -*- shell-script -*- -_links() +_comp_cmd_links() { - local cur prev words cword - _init_completion -n : || return + local cur prev words cword comp_args + _comp_initialize -n : -- "$@" || return case $prev in -html-t-text-color | -html-t-link-color) - COMPREPLY=($(compgen -W '{0..15}' -- "$cur")) + _comp_compgen -- -W '{0..15}' return ;; -http.fake-firefox | -html-[gt]-ignore-document-color) - COMPREPLY=($(compgen -W '0 1' -- "$cur")) + _comp_compgen -- -W '0 1' return ;; --help | -help | -mode | -display | -source | -dump | -width | -max-connections | \ @@ -23,78 +23,78 @@ _links() return ;; -lookup) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; -driver) local drivers=$("$1" -driver foo 2>&1 | command sed -ne '$!d' -e '/^[a-z0-9, ]\{1,\}$/s/,/ /gp') [[ $drivers ]] || drivers='x svgalib fb directfb pmshell atheos' - COMPREPLY=($(compgen -W "$drivers" -- "$cur")) + _comp_compgen -- -W "$drivers" return ;; -codepage | -bookmarks-codepage | -http-assume-codepage) - _xfunc iconv _iconv_charsets + _comp_compgen -x iconv charsets return ;; -download-dir) - _filedir -d + _comp_compgen_filedir -d return ;; -bind-address) - _ip_addresses + _comp_compgen_ip_addresses return ;; -bind-address-ipv6) - _ip_addresses -6 - __ltrim_colon_completions "$cur" + _comp_compgen_ip_addresses -6 return ;; -async-dns | -download-utime | -aggressive-cache | -only-proxies | \ -http-bugs.* | -http.do-not-track | -ftp.use-* | -ftp.fast | -ftp.set-iptos | \ -smb.allow-hyperlinks-to-smb | -save-url-history | -dither-letters | \ -dither-images | -overwrite-instead-of-scroll | -html-*) - COMPREPLY=($(compgen -W '0 1' -- "$cur")) + _comp_compgen -- -W '0 1' return ;; -address-preference | -http.referer) - COMPREPLY=($(compgen -W '{0..4}' -- "$cur")) + _comp_compgen -- -W '{0..4}' return ;; -ssl-certificates | -display-optimize | -gamma-correction) - COMPREPLY=($(compgen -W '{0..2}' -- "$cur")) + _comp_compgen -- -W '{0..2}' return ;; -ssl.client-cert-key) - _filedir '@(key|pem)' + _comp_compgen_filedir '@(key|pem)' return ;; -ssl.client-cert-crt) - _filedir '@(c?(e)rt|cer|pem|der)' + _comp_compgen_filedir '@(c?(e)rt|cer|pem|der)' return ;; -bookmarks-file) - _filedir html + _comp_compgen_filedir html return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" | - command grep -vF -- "->")' -- "$cur")) + _comp_compgen -R help + ((${#COMPREPLY[@]})) && + _comp_compgen -- -W '"${COMPREPLY[@]}"' -X "->" return fi local dir for dir in .links .links2; do if [[ -r ~/$dir/links.his ]]; then - COMPREPLY+=($(compgen -W '$(cat ~/$dir/links.his)' -- "$cur")) - __ltrim_colon_completions "$cur" + _comp_compgen -a split -- "$(cat ~/$dir/links.his)" + _comp_ltrim_colon_completions "$cur" fi done - _filedir '@(htm|html)' + _comp_compgen -a filedir '@(htm|html)' } && - complete -F _links links links2 + complete -F _comp_cmd_links links links2 # ex: filetype=sh |