vim-patch:d56f15caf602

runtime(wget): Update for Wget2 2.1.0 (vim/vim#13497)

d56f15caf6

Co-authored-by: dkearns <dougkearns@gmail.com>
This commit is contained in:
Christian Clason 2023-11-09 18:19:15 +01:00
parent 267c346e2c
commit ae8ca79920
4 changed files with 178 additions and 180 deletions

View File

@ -1,5 +1,5 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc) " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 28 " Last Change: 2022 Apr 28
@ -18,7 +18,7 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<" let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Wget Configuration File (wgetrc, .wgetrc)\twgetrc;.wgetrc\n" . let b:browsefilter = "Wget Configuration File (wgetrc, .wgetrc)\twgetrc;.wgetrc\n" ..
\ "All Files (*.*)\t*.*\n" \ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter" let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif endif

View File

@ -1,5 +1,5 @@
" Vim filetype plugin file " Vim filetype plugin file
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc) " Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 28 " Last Change: 2022 Apr 28
@ -18,7 +18,7 @@ setlocal formatoptions-=t formatoptions+=croql
let b:undo_ftplugin = "setl fo< com< cms<" let b:undo_ftplugin = "setl fo< com< cms<"
if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter") if (has("gui_win32") || has("gui_gtk")) && !exists("b:browsefilter")
let b:browsefilter = "Wget2 Configuration File (wget2rc, .wget2rc)\twget2rc;.wget2rc\n" . let b:browsefilter = "Wget2 Configuration File (wget2rc, .wget2rc)\twget2rc;.wget2rc\n" ..
\ "All Files (*.*)\t*.*\n" \ "All Files (*.*)\t*.*\n"
let b:undo_ftplugin ..= " | unlet! b:browsefilter" let b:undo_ftplugin ..= " | unlet! b:browsefilter"
endif endif

View File

@ -1,7 +1,7 @@
" Vim syntax file " Vim syntax file
" Language: Wget configuration file (/etc/wgetrc ~/.wgetrc) " Language: Wget configuration file (/etc/wgetrc ~/.wgetrc)
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 28 " Last Change: 2023 Nov 05
" GNU Wget 1.21 built on linux-gnu. " GNU Wget 1.21 built on linux-gnu.
@ -12,7 +12,7 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
syn match wgetComment "#.*$" contains=wgetTodo contained syn match wgetComment "#.*" contains=wgetTodo contained
syn keyword wgetTodo TODO NOTE FIXME XXX contained syn keyword wgetTodo TODO NOTE FIXME XXX contained
@ -21,208 +21,206 @@ syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
syn case ignore syn case ignore
syn keyword wgetBoolean on off yes no contained syn keyword wgetBoolean on off yes no contained
syn keyword wgetNumber inf contained syn keyword wgetNumber inf contained
syn match wgetNumber "\<\d\+>" contained
syn match wgetNumber "\<\d\+>" contained syn match wgetQuota "\<\d\+[kmgt]\>" contained
syn match wgetQuota "\<\d\+[kmgt]\>" contained syn match wgetTime "\<\d\+[smhdw]\>" contained
syn match wgetTime "\<\d\+[smhdw]\>" contained
"{{{ Commands "{{{ Commands
let s:commands =<< trim EOL let s:commands =<< trim EOL
accept accept
accept_regex accept-regex
add_host_dir add-host-dir
adjust_extension adjust-extension
always_rest always-rest
ask_password ask-password
auth_no_challenge auth-no-challenge
background background
backup_converted backup-converted
backups backups
base base
bind_address bind-address
bind_dns_address bind-dns-address
body_data body-data
body_file body-file
ca_certificate ca-certificate
ca_directory ca-directory
cache cache
certificate certificate
certificate_type certificate-type
check_certificate check-certificate
choose_config choose-config
ciphers ciphers
compression compression
connect_timeout connect-timeout
content_disposition content-disposition
content_on_error content-on-error
continue continue
convert_file_only convert-file-only
convert_links convert-links
cookies cookies
crl_file crl-file
cut_dirs cut-dirs
debug debug
default_page default-page
delete_after delete-after
dns_cache dns-cache
dns_servers dns-servers
dns_timeout dns-timeout
dir_prefix dir-prefix
dir_struct dir-struct
domains domains
dot_bytes dot-bytes
dots_in_line dots-in-line
dot_spacing dot-spacing
dot_style dot-style
egd_file egd-file
exclude_directories exclude-directories
exclude_domains exclude-domains
follow_ftp follow-ftp
follow_tags follow-tags
force_html force-html
ftp_passwd ftp-passwd
ftp_password ftp-password
ftp_user ftp-user
ftp_proxy ftp-proxy
ftps_clear_data_connection ftps-clear-data-connection
ftps_fallback_to_ftp ftps-fallback-to-ftp
ftps_implicit ftps-implicit
ftps_resume_ssl ftps-resume-ssl
hsts hsts
hsts_file hsts-file
ftp_stmlf ftp-stmlf
glob glob
header header
html_extension html-extension
htmlify htmlify
http_keep_alive http-keep-alive
http_passwd http-passwd
http_password http-password
http_proxy http-proxy
https_proxy https-proxy
https_only https-only
http_user http-user
if_modified_since if-modified-since
ignore_case ignore-case
ignore_length ignore-length
ignore_tags ignore-tags
include_directories include-directories
inet4_only inet4-only
inet6_only inet6-only
input input
input_meta_link input-meta-link
iri iri
keep_bad_hash keep-bad-hash
keep_session_cookies keep-session-cookies
kill_longer kill-longer
limit_rate limit-rate
load_cookies load-cookies
locale locale
local_encoding local-encoding
logfile logfile
login login
max_redirect max-redirect
metalink_index metalink-index
metalink_over_http metalink-over-http
method method
mirror mirror
netrc netrc
no_clobber no-clobber
no_config no-config
no_parent no-parent
no_proxy no-proxy
numtries numtries
output_document output-document
page_requisites page-requisites
passive_ftp passive-ftp
passwd passwd
password password
pinned_pubkey pinned-pubkey
post_data post-data
post_file post-file
prefer_family prefer-family
preferred_location preferred-location
preserve_permissions preserve-permissions
private_key private-key
private_key_type private-key-type
progress progress
protocol_directories protocol-directories
proxy_passwd proxy-passwd
proxy_password proxy-password
proxy_user proxy-user
quiet quiet
quota quota
random_file random-file
random_wait random-wait
read_timeout read-timeout
rec_level rec-level
recursive recursive
referer referer
regex_type regex-type
reject reject
rejected_log rejected-log
reject_regex reject-regex
relative_only relative-only
remote_encoding remote-encoding
remove_listing remove-listing
report_speed report-speed
restrict_file_names restrict-file-names
retr_symlinks retr-symlinks
retry_connrefused retry-connrefused
retry_on_host_error retry-on-host-error
retry_on_http_error retry-on-http-error
robots robots
save_cookies save-cookies
save_headers save-headers
secure_protocol secure-protocol
server_response server-response
show_all_dns_entries show-all-dns-entries
show_progress show-progress
simple_host_check simple-host-check
span_hosts span-hosts
spider spider
start_pos start-pos
strict_comments strict-comments
sslcertfile sslcertfile
sslcertkey sslcertkey
timeout timeout
timestamping timestamping
use_server_timestamps use-server-timestamps
tries tries
trust_server_names trust-server-names
unlink unlink
use_askpass use-askpass
user user
use_proxy use-proxy
user_agent user-agent
verbose verbose
wait wait
wait_retry wait-retry
warc_cdx warc-cdx
warc_cdx_dedup warc-cdx-dedup
warc_compression warc-compression
warc_digests warc-digests
warc_file warc-file
warc_header warc-header
warc_keep_log warc-keep-log
warc_max_size warc-max-size
warc_temp_dir warc-temp-dir
wdebug wdebug
xattr xattr
EOL EOL
"}}} "}}}
call map(s:commands, "substitute(v:val, '_', '[-_]\\\\=', 'g')")
for cmd in s:commands for cmd in s:commands
exe 'syn match wgetCommand "\<' . cmd . '\>" nextgroup=wgetAssignmentOperator skipwhite contained' exe 'syn match wgetCommand "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wgetAssignmentOperator skipwhite contained'
endfor endfor
unlet s:commands
syn case match syn case match
syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite syn match wgetLineStart "^" nextgroup=wgetCommand,wgetComment skipwhite
syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained
hi def link wgetAssignmentOperator Special hi def link wgetAssignmentOperator Special

View File

@ -1,9 +1,9 @@
" Vim syntax file " Vim syntax file
" Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc) " Language: Wget2 configuration file (/etc/wget2rc ~/.wget2rc)
" Maintainer: Doug Kearns <dougkearns@gmail.com> " Maintainer: Doug Kearns <dougkearns@gmail.com>
" Last Change: 2022 Apr 28 " Last Change: 2023 Nov 05
" GNU Wget2 2.0.0 - multithreaded metalink/file/website downloader " GNU Wget2 2.1.0 - multithreaded metalink/file/website downloader
if exists("b:current_syntax") if exists("b:current_syntax")
finish finish
@ -12,21 +12,20 @@ endif
let s:cpo_save = &cpo let s:cpo_save = &cpo
set cpo&vim set cpo&vim
syn match wgetComment "#.*$" contains=wgetTodo contained syn match wget2Comment "#.*" contains=wget2Todo contained
syn keyword wgetTodo TODO NOTE FIXME XXX contained syn keyword wget2Todo TODO NOTE FIXME XXX contained
syn region wgetString start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline syn region wget2String start=+"+ skip=+\\\\\|\\"+ end=+"+ contained oneline
syn region wgetString start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline syn region wget2String start=+'+ skip=+\\\\\|\\'+ end=+'+ contained oneline
syn case ignore syn case ignore
syn keyword wgetBoolean on off yes no y n contained syn keyword wget2Boolean on off yes no y n contained
syn keyword wgetNumber infinity inf contained syn keyword wget2Number infinity inf contained
syn match wget2Number "\<\d\+>" contained
syn match wgetNumber "\<\d\+>" contained syn match wget2Quota "\<\d\+[kmgt]\>" contained
syn match wgetQuota "\<\d\+[kmgt]\>" contained syn match wget2Time "\<\d\+[smhd]\>" contained
syn match wgetTime "\<\d\+[smhd]\>" contained
"{{{ Commands "{{{ Commands
let s:commands =<< trim EOL let s:commands =<< trim EOL
@ -67,6 +66,7 @@ let s:commands =<< trim EOL
cut-dirs cut-dirs
cut-file-get-vars cut-file-get-vars
cut-url-get-vars cut-url-get-vars
dane
debug debug
default-http-port default-http-port
default-https-port default-https-port
@ -85,6 +85,7 @@ let s:commands =<< trim EOL
execute execute
filter-mime-type filter-mime-type
filter-urls filter-urls
follow-sitemaps
follow-tags follow-tags
force-atom force-atom
force-css force-css
@ -221,28 +222,27 @@ let s:commands =<< trim EOL
EOL EOL
"}}} "}}}
call map(s:commands, "substitute(v:val, '_', '[-_]\\\\=', 'g')")
for cmd in s:commands for cmd in s:commands
exe 'syn match wgetCommand "\<' . cmd . '\>" nextgroup=wgetAssignmentOperator skipwhite contained' exe 'syn match wget2Command "\<' .. substitute(cmd, '-', '[-_]\\=', "g") .. '\>" nextgroup=wget2AssignmentOperator skipwhite contained'
endfor endfor
unlet s:commands
syn case match syn case match
syn match wgetStart "^" nextgroup=wgetCommand,wgetComment skipwhite syn match wget2LineStart "^" nextgroup=wget2Command,wget2Comment skipwhite
syn match wgetAssignmentOperator "=" nextgroup=wgetString,wgetBoolean,wgetNumber,wgetQuota,wgetTime skipwhite contained syn match wget2AssignmentOperator "=" nextgroup=wget2String,wget2Boolean,wget2Number,wget2Quota,wget2Time skipwhite contained
hi def link wgetAssignmentOperator Special hi def link wget2AssignmentOperator Special
hi def link wgetBoolean Boolean hi def link wget2Boolean Boolean
hi def link wgetCommand Identifier hi def link wget2Command Identifier
hi def link wgetComment Comment hi def link wget2Comment Comment
hi def link wgetNumber Number hi def link wget2Number Number
hi def link wgetQuota Number hi def link wget2Quota Number
hi def link wgetString String hi def link wget2String String
hi def link wgetTime Number hi def link wget2Time Number
hi def link wgetTodo Todo hi def link wget2Todo Todo
let b:current_syntax = "wget" let b:current_syntax = "wget2"
let &cpo = s:cpo_save let &cpo = s:cpo_save
unlet s:cpo_save unlet s:cpo_save