diff --git a/etc/bash_completion.d/000_bash_completion_compat.bash b/etc/bash_completion.d/000_bash_completion_compat.bash new file mode 100644 index 00000000000..480ffcc6a75 --- /dev/null +++ b/etc/bash_completion.d/000_bash_completion_compat.bash @@ -0,0 +1,507 @@ +# Deprecated bash_completion functions and variables -*- shell-script -*- + +_comp_deprecate_func 2.12 _userland _comp_userland +_comp_deprecate_func 2.12 _sysvdirs _comp_sysvdirs +_comp_deprecate_func 2.12 _have _comp_have_command +_comp_deprecate_func 2.12 _rl_enabled _comp_readline_variable_on +_comp_deprecate_func 2.12 _command_offset _comp_command_offset +_comp_deprecate_func 2.12 _command _comp_command +_comp_deprecate_func 2.12 _root_command _comp_root_command +_comp_deprecate_func 2.12 _xfunc _comp_xfunc +_comp_deprecate_func 2.12 _upvars _comp_upvars +_comp_deprecate_func 2.12 _get_comp_words_by_ref _comp_get_words +_comp_deprecate_func 2.12 _known_hosts_real _comp_compgen_known_hosts +_comp_deprecate_func 2.12 __ltrim_colon_completions _comp_ltrim_colon_completions +_comp_deprecate_func 2.12 _variables _comp_compgen_variables +_comp_deprecate_func 2.12 _signals _comp_compgen_signals +_comp_deprecate_func 2.12 _mac_addresses _comp_compgen_mac_addresses +_comp_deprecate_func 2.12 _available_interfaces _comp_compgen_available_interfaces +_comp_deprecate_func 2.12 _configured_interfaces _comp_compgen_configured_interfaces +_comp_deprecate_func 2.12 _ip_addresses _comp_compgen_ip_addresses +_comp_deprecate_func 2.12 _kernel_versions _comp_compgen_kernel_versions +_comp_deprecate_func 2.12 _uids _comp_compgen_uids +_comp_deprecate_func 2.12 _gids _comp_compgen_gids +_comp_deprecate_func 2.12 _xinetd_services _comp_compgen_xinetd_services +_comp_deprecate_func 2.12 _services _comp_compgen_services +_comp_deprecate_func 2.12 _bashcomp_try_faketty _comp_try_faketty +_comp_deprecate_func 2.12 _expand _comp_expand +_comp_deprecate_func 2.12 _pids _comp_compgen_pids +_comp_deprecate_func 2.12 _pgids _comp_compgen_pgids +_comp_deprecate_func 2.12 _pnames _comp_compgen_pnames +_comp_deprecate_func 2.12 _modules _comp_compgen_kernel_modules +_comp_deprecate_func 2.12 _installed_modules _comp_compgen_inserted_kernel_modules +_comp_deprecate_func 2.12 _usergroup _comp_compgen_usergroups +_comp_deprecate_func 2.12 _complete_as_root _comp_as_root +_comp_deprecate_func 2.12 __load_completion _comp_load + +# completers +_comp_deprecate_func 2.12 _service _comp_complete_service +_comp_deprecate_func 2.12 _user_at_host _comp_complete_user_at_host +_comp_deprecate_func 2.12 _known_hosts _comp_complete_known_hosts +_comp_deprecate_func 2.12 _longopt _comp_complete_longopt +_comp_deprecate_func 2.12 _filedir_xspec _comp_complete_filedir_xspec +_comp_deprecate_func 2.12 _minimal _comp_complete_minimal + +_comp_deprecate_var 2.12 COMP_FILEDIR_FALLBACK BASH_COMPLETION_FILEDIR_FALLBACK +_comp_deprecate_var 2.12 COMP_KNOWN_HOSTS_WITH_AVAHI BASH_COMPLETION_KNOWN_HOSTS_WITH_AVAHI +_comp_deprecate_var 2.12 COMP_KNOWN_HOSTS_WITH_HOSTFILE BASH_COMPLETION_KNOWN_HOSTS_WITH_HOSTFILE + +# @deprecated 2.12 Use `_comp_xspecs` +declare -Ag _xspecs + +# Backwards compatibility for compat completions that use have(). +# @deprecated 1.90 should no longer be used; generally not needed with +# dynamically loaded completions, and _comp_have_command is suitable for +# runtime use. +# shellcheck disable=SC2317 # available at load time only +have() +{ + unset -v have + _comp_have_command "$1" && have=yes +} + +# This function shell-quotes the argument +# @deprecated 2.12 Use `_comp_quote` instead. Note that `_comp_quote` stores +# the results in the variable `REPLY` instead of writing them to stdout. +quote() +{ + local quoted=${1//\'/\'\\\'\'} + printf "'%s'" "$quoted" +} + +# @deprecated 2.12 Use `_comp_quote_compgen` +quote_readline() +{ + local REPLY + _comp_quote_compgen "$1" + printf %s "$REPLY" +} + +# This function is the same as `_comp_quote_compgen`, but receives the second +# argument specifying the variable name to store the result. +# @param $1 Argument to quote +# @param $2 Name of variable to return result to +# @deprecated 2.12 Use `_comp_quote_compgen "$1"` instead. Note that +# `_comp_quote_compgen` stores the result in a fixed variable `REPLY`. +_quote_readline_by_ref() +{ + [[ $2 == REPLY ]] || local REPLY + _comp_quote_compgen "$1" + [[ $2 == REPLY ]] || printf -v "$2" %s "$REPLY" +} + +# This function shell-dequotes the argument +# @deprecated 2.12 Use `_comp_dequote' instead. Note that `_comp_dequote` +# stores the results in the array `REPLY` instead of writing them to stdout. +dequote() +{ + local REPLY + _comp_dequote "$1" + local rc=$? + printf %s "$REPLY" + return $rc +} + +# Assign variable one scope above the caller +# Usage: local "$1" && _upvar $1 "value(s)" +# @param $1 Variable name to assign value to +# @param $* Value(s) to assign. If multiple values, an array is +# assigned, otherwise a single value is assigned. +# NOTE: For assigning multiple variables, use '_comp_upvars'. Do NOT +# use multiple '_upvar' calls, since one '_upvar' call might +# reassign a variable to be used by another '_upvar' call. +# @see https://fvue.nl/wiki/Bash:_Passing_variables_by_reference +# @deprecated 2.10 Use `_comp_upvars' instead +_upvar() +{ + echo "bash_completion: $FUNCNAME: deprecated function," \ + "use _comp_upvars instead" >&2 + if unset -v "$1"; then # Unset & validate varname + # shellcheck disable=SC2140 # TODO + if (($# == 2)); then + eval "$1"=\"\$2\" # Return single value + else + eval "$1"=\(\"\$"{@:2}"\"\) # Return array + fi + fi +} + +# Get the word to complete. +# This is nicer than ${COMP_WORDS[COMP_CWORD]}, since it handles cases +# where the user is completing in the middle of a word. +# (For example, if the line is "ls foobar", +# and the cursor is here --------> ^ +# @param $1 string Characters out of $COMP_WORDBREAKS which should NOT be +# considered word breaks. This is useful for things like scp where +# we want to return host:path and not only path, so we would pass the +# colon (:) as $1 in this case. +# @param $2 integer Index number of word to return, negatively offset to the +# current word (default is 0, previous is 1), respecting the exclusions +# given at $1. For example, `_get_cword "=:" 1' returns the word left of +# the current word, respecting the exclusions "=:". +# @deprecated 1.2 Use `_comp_get_words cur' instead +# @see _comp_get_words() +_get_cword() +{ + local LC_CTYPE=C + local cword words + _comp__reassemble_words "${1-}" words cword + + # return previous word offset by $2 + if [[ ${2-} && ${2//[^0-9]/} ]]; then + printf "%s" "${words[cword - $2]}" + elif ((${#words[cword]} == 0 && COMP_POINT == ${#COMP_LINE})); then + : # nothing + else + local i + local cur=$COMP_LINE + local index=$COMP_POINT + for ((i = 0; i <= cword; ++i)); do + # Current word fits in $cur, and $cur doesn't match cword? + while [[ ${#cur} -ge ${#words[i]} && + ${cur:0:${#words[i]}} != "${words[i]}" ]]; do + # Strip first character + cur=${cur:1} + # Decrease cursor position, staying >= 0 + ((index > 0)) && ((index--)) + done + + # Does found word match cword? + if ((i < cword)); then + # No, cword lies further; + local old_size=${#cur} + cur=${cur#"${words[i]}"} + local new_size=${#cur} + ((index -= old_size - new_size)) + fi + done + + if [[ ${words[cword]:0:${#cur}} != "$cur" ]]; then + # We messed up! At least return the whole word so things + # keep working + printf "%s" "${words[cword]}" + else + printf "%s" "${cur:0:index}" + fi + fi +} + +# Get word previous to the current word. +# This is a good alternative to `prev=${COMP_WORDS[COMP_CWORD-1]}' because bash4 +# will properly return the previous word with respect to any given exclusions to +# COMP_WORDBREAKS. +# @deprecated 1.2 Use `_comp_get_words cur prev' instead +# @see _comp_get_words() +# +_get_pword() +{ + if ((COMP_CWORD >= 1)); then + _get_cword "${@-}" 1 + fi +} + +# Get real command. +# @deprecated 2.12 Use `_comp_realcommand` instead. +# Note that `_comp_realcommand` stores the result in the variable `REPLY` +# instead of writing it to stdout. +_realcommand() +{ + local REPLY + _comp_realcommand "$1" + local rc=$? + printf "%s\n" "$REPLY" + return $rc +} + +# Initialize completion and deal with various general things: do file +# and variable completion where appropriate, and adjust prev, words, +# and cword as if no redirections exist so that completions do not +# need to deal with them. Before calling this function, make sure +# cur, prev, words, and cword are local, ditto split if you use -s. +# +# Options: +# -n EXCLUDE Passed to _comp_get_words -n with redirection chars +# -e XSPEC Passed to _filedir as first arg for stderr redirections +# -o XSPEC Passed to _filedir as first arg for other output redirections +# -i XSPEC Passed to _filedir as first arg for stdin redirections +# -s Split long options with _comp__split_longopt, implies -n = +# @var[out] cur Reconstructed current word +# @var[out] prev Reconstructed previous word +# @var[out] words Reconstructed words +# @var[out] cword Current word index in `words` +# @var[out,opt] split When "-s" is specified, `"true"/"false"` is set depending +# on whether the split happened. +# @return True (0) if completion needs further processing, +# False (> 0) no further processing is necessary. +# +# @deprecated 2.12 Use the new interface `_comp_initialize`. The new interface +# supports the same set of options. The new interface receives additional +# arguments $1 (command name), $2 (part of current word before the cursor), and +# $3 (previous word) that are specified to the completion function by Bash. +# When `-s` is specified, instead of variable `split`, the new interface sets +# variable `was_split` to the value "set"/"" when the split happened/not +# happened. +_init_completion() +{ + local was_split + _comp_initialize "$@" + local rc=$? + + # When -s is specified, convert "split={set,}" to "split={true,false}" + local flag OPTIND=1 OPTARG="" OPTERR=0 + while getopts "n:e:o:i:s" flag "$@"; do + case $flag in + [neoi]) ;; + s) + if [[ $was_split ]]; then + split=true + else + split=false + fi + break + ;; + esac + done + + return "$rc" +} + +# @deprecated 2.12 Use the variable `_comp_backup_glob` instead. This is the +# backward-compatibility name. +# shellcheck disable=SC2154 # defined in the main "bash_completion" +_backup_glob=$_comp_backup_glob + +# @deprecated 2.12 use `_comp_cmd_cd` instead. +_cd() +{ + declare -F _comp_cmd_cd &>/dev/null || __load_completion cd + _comp_cmd_cd "$@" +} + +# @deprecated 2.12 Use `_comp_command_offset` instead. Note that the new +# interface `_comp_command_offset` is changed to receive an index in +# `words` instead of that in `COMP_WORDS` as `_command_offset` did. +_command_offset() +{ + # We unset the shell variable `words` locally to tell + # `_comp_command_offset` that the index is intended to be that in + # `COMP_WORDS` instead of `words`. + local words + unset -v words + _comp_command_offset "$@" +} + +# @deprecated 2.12 Use `_comp_compgen -a filedir` +_filedir() +{ + _comp_compgen -a filedir "$@" +} + +# Perform tilde (~) completion +# @return True (0) if completion needs further processing, +# False (1) if tilde is followed by a valid username, completions are +# put in COMPREPLY and no further processing is necessary. +# @deprecated 2.12 Use `_comp_compgen -c CUR tilde [-d]`. Note that the exit +# status of `_comp_compgen_tilde` is flipped. It returns 0 when the tilde +# completions are attempted, or otherwise 1. +_tilde() +{ + ! _comp_compgen -c "$1" tilde +} + +# Helper function for _parse_help and _parse_usage. +# @return True (0) if an option was found, False (> 0) otherwise +# @deprecated 2.12 Use _comp_compgen_help__parse +__parse_options() +{ + local -a _options=() + _comp_compgen_help__parse "$1" + printf '%s\n' "${_options[@]}" +} + +# Parse GNU style help output of the given command. +# @param $1 command; if "-", read from stdin and ignore rest of args +# @param $2 command options (default: --help) +# @deprecated 2.12 Use `_comp_compgen_help`. `COMPREPLY=($(compgen -W +# '$(_parse_help "$1" ...)' -- "$cur"))` can be replaced with +# `_comp_compgen_help [-- ...]`. Also, `var=($(_parse_help "$1" ...))` can +# be replaced with `_comp_compgen -Rv var help [-- ...]`. +_parse_help() +{ + local -a args + if [[ $1 == - ]]; then + args=(-) + else + local REPLY opt IFS=$' \t\n' + _comp_dequote "$1" + _comp_split opt "${2:---help}" + args=(-c "$REPLY" ${opt[@]+"${opt[@]}"}) + fi + local -a REPLY=() + _comp_compgen -Rv REPLY help "${args[@]}" || return 1 + ((${#REPLY[@]})) && printf '%s\n' "${REPLY[@]}" + return 0 +} + +# Parse BSD style usage output (options in brackets) of the given command. +# @param $1 command; if "-", read from stdin and ignore rest of args +# @param $2 command options (default: --usage) +# @deprecated 2.12 Use `_comp_compgen_usage`. `COMPREPLY=($(compgen -W +# '$(_parse_usage "$1" ...)' -- "$cur"))` can be replaced with +# `_comp_compgen_usage [-- ...]`. `var=($(_parse_usage "$1" ...))` can be +# replaced with `_comp_compgen -Rv var usage [-- ...]`. +_parse_usage() +{ + local -a args + if [[ $1 == - ]]; then + args=(-) + else + local REPLY opt IFS=$' \t\n' + _comp_dequote "$1" + _comp_split opt "${2:---usage}" + args=(-c "$REPLY" ${opt[@]+"${opt[@]}"}) + fi + local -a REPLY=() + _comp_compgen -Rv REPLY usage "${args[@]}" || return 1 + ((${#REPLY[@]})) && printf '%s\n' "${REPLY[@]}" + return 0 +} + +# @deprecated 2.12 Use `_comp_get_ncpus`. +_ncpus() +{ + local REPLY + _comp_get_ncpus + printf %s "$REPLY" +} + +# Expand variable starting with tilde (~). +# We want to expand ~foo/... to /home/foo/... to avoid problems when +# word-to-complete starting with a tilde is fed to commands and ending up +# quoted instead of expanded. +# Only the first portion of the variable from the tilde up to the first slash +# (~../) is expanded. The remainder of the variable, containing for example +# a dollar sign variable ($) or asterisk (*) is not expanded. +# +# @deprecated 2.12 Use `_comp_expand_tilde`. The new function receives the +# value instead of a variable name as $1 and always returns the result to the +# variable `REPLY`. +__expand_tilde_by_ref() +{ + [[ ${1+set} ]] || return 0 + [[ $1 == REPLY ]] || local REPLY + _comp_expand_tilde "${!1-}" + # shellcheck disable=SC2059 + [[ $1 == REPLY ]] || printf -v "$1" "$REPLY" +} + +# @deprecated 2.12 Use `_comp_compgen -a cd_devices` +_cd_devices() +{ + _comp_compgen -a cd_devices +} + +# @deprecated 2.12 Use `_comp_compgen -a dvd_devices` +_dvd_devices() +{ + _comp_compgen -a dvd_devices +} + +# @deprecated 2.12 Use `_comp_compgen -a pci_ids` +_pci_ids() +{ + _comp_compgen -a pci_ids +} + +# @deprecated 2.12 Use `_comp_compgen -a usb_ids` +_usb_ids() +{ + _comp_compgen -a usb_ids +} + +# @deprecated 2.12 Use `_comp_compgen -a terms` +_terms() +{ + _comp_compgen -a terms +} + +# @deprecated 2.12 Use `_comp_compgen -c "${prefix:-$cur}" allowed_users` +_allowed_users() +{ + _comp_compgen -c "${1:-$cur}" allowed_users +} + +# @deprecated 2.12 Use `_comp_compgen -c "${prefix:-$cur}" allowed_groups` +_allowed_groups() +{ + _comp_compgen -c "${1:-$cur}" allowed_groups +} + +# @deprecated 2.12 Use `_comp_compgen -a shells` +_shells() +{ + _comp_compgen -a shells +} + +# @deprecated 2.12 Use `_comp_compgen -a fstypes` +_fstypes() +{ + _comp_compgen -a fstypes +} + +# This function returns the first argument, excluding options +# @deprecated 2.12 Use `_comp_get_first_arg`. Note that the new function +# `_comp_get_first_arg` operates on `words` and `cword` instead of `COMP_WORDS` +# and `COMP_CWORD`. The new function considers a command-line argument after +# `--` as an argument. The new function returns the result in variable `REPLY` +# instead of `arg`. +_get_first_arg() +{ + local i + + arg= + for ((i = 1; i < COMP_CWORD; i++)); do + if [[ ${COMP_WORDS[i]} != -* ]]; then + arg=${COMP_WORDS[i]} + break + fi + done +} + +# This function counts the number of args, excluding options +# @param $1 chars Characters out of $COMP_WORDBREAKS which should +# NOT be considered word breaks. See _comp__reassemble_words. +# @param $2 glob Options whose following argument should not be counted +# @param $3 glob Options that should be counted as args +# @var[out] args Return the number of arguments +# @deprecated 2.12 Use `_comp_count_args`. Note that the new function +# `_comp_count_args` returns the result in variable `REPLY` instead of `args`. +# In the new function, `-` is also counted as an argument. The new function +# counts all the arguments after `--`. +# shellcheck disable=SC2178 # assignments are not intended for global "args" +_count_args() +{ + local i cword words + _comp__reassemble_words "${1-}" words cword + + args=1 + for ((i = 1; i < cword; i++)); do + # shellcheck disable=SC2053 + if [[ ${words[i]} != -* && ${words[i - 1]} != ${2-} || + ${words[i]} == ${3-} ]]; then + ((args++)) + fi + done +} + +# @deprecated 2.12 Use `_comp_load -D -- CommandName` to load the completion, +# or use `_comp_complete_load` as a completion function specified to `complete +# -F`. +_completion_loader() +{ + # We call `_comp_complete_load` instead of `_comp_load -D` in case that + # `_completion_loader` is used without an argument or `_completion_loader` + # is specified to `complete -F` by a user. + _comp_complete_load "$@" +} +# ex: filetype=sh diff --git a/etc/pki/ca-trust/extracted/java/cacerts b/etc/pki/ca-trust/extracted/java/cacerts index d72cab20ec5..8de9e3875d3 100644 Binary files a/etc/pki/ca-trust/extracted/java/cacerts and b/etc/pki/ca-trust/extracted/java/cacerts differ diff --git a/etc/profile.d/bash_completion.sh b/etc/profile.d/bash_completion.sh index e1a51b0ab45..8c031cf7aee 100644 --- a/etc/profile.d/bash_completion.sh +++ b/etc/profile.d/bash_completion.sh @@ -1,4 +1,4 @@ -# shellcheck shell=sh disable=SC1091,SC2039,SC2166 +# shellcheck shell=sh disable=SC1091,SC2166,SC2268,SC3028,SC3044,SC3054 # Check for interactive bash and that we haven't already been sourced. if [ "x${BASH_VERSION-}" != x -a "x${PS1-}" != x -a "x${BASH_COMPLETION_VERSINFO-}" = x ]; then diff --git a/usr/bin/info.exe b/usr/bin/info.exe index 2e82ca4cadc..7319aea75b2 100755 Binary files a/usr/bin/info.exe and b/usr/bin/info.exe differ diff --git a/usr/bin/install-info.exe b/usr/bin/install-info.exe index 76da9c285b5..c0baf0eb27c 100755 Binary files a/usr/bin/install-info.exe and b/usr/bin/install-info.exe differ diff --git a/usr/bin/pinentry-w32.exe b/usr/bin/pinentry-w32.exe index eb37def9c27..a15d421812a 100644 Binary files a/usr/bin/pinentry-w32.exe and b/usr/bin/pinentry-w32.exe differ diff --git a/usr/bin/pinentry.exe b/usr/bin/pinentry.exe index eb37def9c27..a15d421812a 100644 Binary files a/usr/bin/pinentry.exe and b/usr/bin/pinentry.exe differ diff --git a/usr/lib/w32api/libCINTIME.a b/usr/lib/w32api/libCINTIME.a index 48fccbe4647..005908b668e 100644 Binary files a/usr/lib/w32api/libCINTIME.a and b/usr/lib/w32api/libCINTIME.a differ diff --git a/usr/lib/w32api/libPS5UI.a b/usr/lib/w32api/libPS5UI.a index 21c1a1363e8..3550fead4ea 100644 Binary files a/usr/lib/w32api/libPS5UI.a and b/usr/lib/w32api/libPS5UI.a differ diff --git a/usr/lib/w32api/libPSCRIPT5.a b/usr/lib/w32api/libPSCRIPT5.a index 165550dbebb..808f6679286 100644 Binary files a/usr/lib/w32api/libPSCRIPT5.a and b/usr/lib/w32api/libPSCRIPT5.a differ diff --git a/usr/lib/w32api/libUNIDRV.a b/usr/lib/w32api/libUNIDRV.a index d786f98bec3..962025318e1 100644 Binary files a/usr/lib/w32api/libUNIDRV.a and b/usr/lib/w32api/libUNIDRV.a differ diff --git a/usr/lib/w32api/libUNIDRVUI.a b/usr/lib/w32api/libUNIDRVUI.a index 6d0ecaa756a..acd2c874c90 100644 Binary files a/usr/lib/w32api/libUNIDRVUI.a and b/usr/lib/w32api/libUNIDRVUI.a differ diff --git a/usr/lib/w32api/libacledit.a b/usr/lib/w32api/libacledit.a index 9c7f66d8ba6..e3d462cefd5 100644 Binary files a/usr/lib/w32api/libacledit.a and b/usr/lib/w32api/libacledit.a differ diff --git a/usr/lib/w32api/libaclui.a b/usr/lib/w32api/libaclui.a index 3c43a4b8130..eeb8cc897be 100644 Binary files a/usr/lib/w32api/libaclui.a and b/usr/lib/w32api/libaclui.a differ diff --git a/usr/lib/w32api/libactiveds.a b/usr/lib/w32api/libactiveds.a index 9c54a7476a9..8fdf267e124 100644 Binary files a/usr/lib/w32api/libactiveds.a and b/usr/lib/w32api/libactiveds.a differ diff --git a/usr/lib/w32api/libadmparse.a b/usr/lib/w32api/libadmparse.a index ebee6b77b83..7ca68e54644 100644 Binary files a/usr/lib/w32api/libadmparse.a and b/usr/lib/w32api/libadmparse.a differ diff --git a/usr/lib/w32api/libadmwprox.a b/usr/lib/w32api/libadmwprox.a index eeefef4e899..00c14cbb922 100644 Binary files a/usr/lib/w32api/libadmwprox.a and b/usr/lib/w32api/libadmwprox.a differ diff --git a/usr/lib/w32api/libadptif.a b/usr/lib/w32api/libadptif.a index ffc7a9b2727..9d14cf1b08f 100644 Binary files a/usr/lib/w32api/libadptif.a and b/usr/lib/w32api/libadptif.a differ diff --git a/usr/lib/w32api/libadsiid.a b/usr/lib/w32api/libadsiid.a index 0187ec6592c..e26d32190bc 100644 Binary files a/usr/lib/w32api/libadsiid.a and b/usr/lib/w32api/libadsiid.a differ diff --git a/usr/lib/w32api/libadsiisex.a b/usr/lib/w32api/libadsiisex.a index f3b4d04e279..c57dd669364 100644 Binary files a/usr/lib/w32api/libadsiisex.a and b/usr/lib/w32api/libadsiisex.a differ diff --git a/usr/lib/w32api/libadsldpc.a b/usr/lib/w32api/libadsldpc.a index 0f86ab9a6fc..5255ec3e44d 100644 Binary files a/usr/lib/w32api/libadsldpc.a and b/usr/lib/w32api/libadsldpc.a differ diff --git a/usr/lib/w32api/libadvapi32.a b/usr/lib/w32api/libadvapi32.a index 147dc14859c..70c2e310c0a 100644 Binary files a/usr/lib/w32api/libadvapi32.a and b/usr/lib/w32api/libadvapi32.a differ diff --git a/usr/lib/w32api/libadvpack.a b/usr/lib/w32api/libadvpack.a index 84d1c61604f..11eed281e19 100644 Binary files a/usr/lib/w32api/libadvpack.a and b/usr/lib/w32api/libadvpack.a differ diff --git a/usr/lib/w32api/libagentanm.a b/usr/lib/w32api/libagentanm.a index 58148494cea..ca95f314945 100644 Binary files a/usr/lib/w32api/libagentanm.a and b/usr/lib/w32api/libagentanm.a differ diff --git a/usr/lib/w32api/libakscoinst.a b/usr/lib/w32api/libakscoinst.a index 40f43ee91c0..5e7b15bbc4b 100644 Binary files a/usr/lib/w32api/libakscoinst.a and b/usr/lib/w32api/libakscoinst.a differ diff --git a/usr/lib/w32api/libalrsvc.a b/usr/lib/w32api/libalrsvc.a index f6fdbe5d305..bc0d5a885da 100644 Binary files a/usr/lib/w32api/libalrsvc.a and b/usr/lib/w32api/libalrsvc.a differ diff --git a/usr/lib/w32api/libamstrmid.a b/usr/lib/w32api/libamstrmid.a index 8e2ef2162d1..8bfc4cf6b7c 100644 Binary files a/usr/lib/w32api/libamstrmid.a and b/usr/lib/w32api/libamstrmid.a differ diff --git a/usr/lib/w32api/libapcups.a b/usr/lib/w32api/libapcups.a index bd17a115f68..4398902fb7f 100644 Binary files a/usr/lib/w32api/libapcups.a and b/usr/lib/w32api/libapcups.a differ diff --git a/usr/lib/w32api/libapphelp.a b/usr/lib/w32api/libapphelp.a index 9669d34724b..859a7e791dc 100644 Binary files a/usr/lib/w32api/libapphelp.a and b/usr/lib/w32api/libapphelp.a differ diff --git a/usr/lib/w32api/libappmgmts.a b/usr/lib/w32api/libappmgmts.a index bda3c30c2e1..81cf8f1a13f 100644 Binary files a/usr/lib/w32api/libappmgmts.a and b/usr/lib/w32api/libappmgmts.a differ diff --git a/usr/lib/w32api/libappmgr.a b/usr/lib/w32api/libappmgr.a index 2b239431d70..8e189553cf5 100644 Binary files a/usr/lib/w32api/libappmgr.a and b/usr/lib/w32api/libappmgr.a differ diff --git a/usr/lib/w32api/libaqueue.a b/usr/lib/w32api/libaqueue.a index 9df9d52664c..a0a821e4360 100644 Binary files a/usr/lib/w32api/libaqueue.a and b/usr/lib/w32api/libaqueue.a differ diff --git a/usr/lib/w32api/libasp.a b/usr/lib/w32api/libasp.a index e4b06a3d06e..eb0b568fa18 100644 Binary files a/usr/lib/w32api/libasp.a and b/usr/lib/w32api/libasp.a differ diff --git a/usr/lib/w32api/libaspperf.a b/usr/lib/w32api/libaspperf.a index 243a36e0e63..6822a079d2f 100644 Binary files a/usr/lib/w32api/libaspperf.a and b/usr/lib/w32api/libaspperf.a differ diff --git a/usr/lib/w32api/libasycfilt.a b/usr/lib/w32api/libasycfilt.a index 257e54a02ee..98549577c01 100644 Binary files a/usr/lib/w32api/libasycfilt.a and b/usr/lib/w32api/libasycfilt.a differ diff --git a/usr/lib/w32api/libatkctrs.a b/usr/lib/w32api/libatkctrs.a index a0ea8b56b23..d005982bc5f 100644 Binary files a/usr/lib/w32api/libatkctrs.a and b/usr/lib/w32api/libatkctrs.a differ diff --git a/usr/lib/w32api/libatl.a b/usr/lib/w32api/libatl.a index 0674749224c..abb2d5bee82 100644 Binary files a/usr/lib/w32api/libatl.a and b/usr/lib/w32api/libatl.a differ diff --git a/usr/lib/w32api/libatmlib.a b/usr/lib/w32api/libatmlib.a index afddca1c32f..d92e778a1ab 100644 Binary files a/usr/lib/w32api/libatmlib.a and b/usr/lib/w32api/libatmlib.a differ diff --git a/usr/lib/w32api/libatrace.a b/usr/lib/w32api/libatrace.a index 27f43232f5f..a9928e83b25 100644 Binary files a/usr/lib/w32api/libatrace.a and b/usr/lib/w32api/libatrace.a differ diff --git a/usr/lib/w32api/libaudiosrv.a b/usr/lib/w32api/libaudiosrv.a index cbd5dab591c..7a8421b1a78 100644 Binary files a/usr/lib/w32api/libaudiosrv.a and b/usr/lib/w32api/libaudiosrv.a differ diff --git a/usr/lib/w32api/libauthz.a b/usr/lib/w32api/libauthz.a index 855be79f3d0..909bcbeaed0 100644 Binary files a/usr/lib/w32api/libauthz.a and b/usr/lib/w32api/libauthz.a differ diff --git a/usr/lib/w32api/libautodisc.a b/usr/lib/w32api/libautodisc.a index a66ad71df7a..39c7640679a 100644 Binary files a/usr/lib/w32api/libautodisc.a and b/usr/lib/w32api/libautodisc.a differ diff --git a/usr/lib/w32api/libavicap32.a b/usr/lib/w32api/libavicap32.a index dbe221b9e98..53a369236c7 100644 Binary files a/usr/lib/w32api/libavicap32.a and b/usr/lib/w32api/libavicap32.a differ diff --git a/usr/lib/w32api/libavifil32.a b/usr/lib/w32api/libavifil32.a index ac3a10b8346..97278abe297 100644 Binary files a/usr/lib/w32api/libavifil32.a and b/usr/lib/w32api/libavifil32.a differ diff --git a/usr/lib/w32api/libavrt.a b/usr/lib/w32api/libavrt.a index db4d016e439..c5ea3b6f733 100644 Binary files a/usr/lib/w32api/libavrt.a and b/usr/lib/w32api/libavrt.a differ diff --git a/usr/lib/w32api/libazroles.a b/usr/lib/w32api/libazroles.a index 932d2bdc651..7770c7f0564 100644 Binary files a/usr/lib/w32api/libazroles.a and b/usr/lib/w32api/libazroles.a differ diff --git a/usr/lib/w32api/libbasesrv.a b/usr/lib/w32api/libbasesrv.a index 4fde72f480e..bb320a8badd 100644 Binary files a/usr/lib/w32api/libbasesrv.a and b/usr/lib/w32api/libbasesrv.a differ diff --git a/usr/lib/w32api/libbatmeter.a b/usr/lib/w32api/libbatmeter.a index 1e65e291ef8..a8b58dcf530 100644 Binary files a/usr/lib/w32api/libbatmeter.a and b/usr/lib/w32api/libbatmeter.a differ diff --git a/usr/lib/w32api/libbatt.a b/usr/lib/w32api/libbatt.a index a27e2a61fcd..d1d3cc0bf15 100644 Binary files a/usr/lib/w32api/libbatt.a and b/usr/lib/w32api/libbatt.a differ diff --git a/usr/lib/w32api/libbcrypt.a b/usr/lib/w32api/libbcrypt.a index 5e527a0f826..ff542e44f8c 100644 Binary files a/usr/lib/w32api/libbcrypt.a and b/usr/lib/w32api/libbcrypt.a differ diff --git a/usr/lib/w32api/libbits.a b/usr/lib/w32api/libbits.a index c17585beb62..e62ad9a0157 100644 Binary files a/usr/lib/w32api/libbits.a and b/usr/lib/w32api/libbits.a differ diff --git a/usr/lib/w32api/libbluetoothapis.a b/usr/lib/w32api/libbluetoothapis.a index 0b956d0a0b6..b650532ddc1 100644 Binary files a/usr/lib/w32api/libbluetoothapis.a and b/usr/lib/w32api/libbluetoothapis.a differ diff --git a/usr/lib/w32api/libbootvid.a b/usr/lib/w32api/libbootvid.a index 51c6a56676c..d8e169f5466 100644 Binary files a/usr/lib/w32api/libbootvid.a and b/usr/lib/w32api/libbootvid.a differ diff --git a/usr/lib/w32api/libbrowser.a b/usr/lib/w32api/libbrowser.a index cc39955ca61..d6b4db9d6cf 100644 Binary files a/usr/lib/w32api/libbrowser.a and b/usr/lib/w32api/libbrowser.a differ diff --git a/usr/lib/w32api/libbthci.a b/usr/lib/w32api/libbthci.a index 0bc2d59a9f7..7c202a17821 100644 Binary files a/usr/lib/w32api/libbthci.a and b/usr/lib/w32api/libbthci.a differ diff --git a/usr/lib/w32api/libbthprops.a b/usr/lib/w32api/libbthprops.a index b0d2201103b..ad11ed3ab0d 100644 Binary files a/usr/lib/w32api/libbthprops.a and b/usr/lib/w32api/libbthprops.a differ diff --git a/usr/lib/w32api/libcabinet.a b/usr/lib/w32api/libcabinet.a index 9477920a90f..2d15cec989d 100644 Binary files a/usr/lib/w32api/libcabinet.a and b/usr/lib/w32api/libcabinet.a differ diff --git a/usr/lib/w32api/libcabview.a b/usr/lib/w32api/libcabview.a index 9c89811cdc0..3ea671a07e7 100644 Binary files a/usr/lib/w32api/libcabview.a and b/usr/lib/w32api/libcabview.a differ diff --git a/usr/lib/w32api/libcards.a b/usr/lib/w32api/libcards.a index 86dcb2dcd84..408f991037b 100644 Binary files a/usr/lib/w32api/libcards.a and b/usr/lib/w32api/libcards.a differ diff --git a/usr/lib/w32api/libcatsrv.a b/usr/lib/w32api/libcatsrv.a index dcda872f810..e49e386dc43 100644 Binary files a/usr/lib/w32api/libcatsrv.a and b/usr/lib/w32api/libcatsrv.a differ diff --git a/usr/lib/w32api/libcatsrvut.a b/usr/lib/w32api/libcatsrvut.a index 4167aafd733..c55892ef5b1 100644 Binary files a/usr/lib/w32api/libcatsrvut.a and b/usr/lib/w32api/libcatsrvut.a differ diff --git a/usr/lib/w32api/libccfgnt.a b/usr/lib/w32api/libccfgnt.a index b951264e1c0..efe370ab9aa 100644 Binary files a/usr/lib/w32api/libccfgnt.a and b/usr/lib/w32api/libccfgnt.a differ diff --git a/usr/lib/w32api/libcdfview.a b/usr/lib/w32api/libcdfview.a index 3ac61361a4d..b07e7a77916 100644 Binary files a/usr/lib/w32api/libcdfview.a and b/usr/lib/w32api/libcdfview.a differ diff --git a/usr/lib/w32api/libcdm.a b/usr/lib/w32api/libcdm.a index c11411e6c89..36e4e61d4d1 100644 Binary files a/usr/lib/w32api/libcdm.a and b/usr/lib/w32api/libcdm.a differ diff --git a/usr/lib/w32api/libcertcli.a b/usr/lib/w32api/libcertcli.a index 425374b826c..c8f2ae337a1 100644 Binary files a/usr/lib/w32api/libcertcli.a and b/usr/lib/w32api/libcertcli.a differ diff --git a/usr/lib/w32api/libcfgbkend.a b/usr/lib/w32api/libcfgbkend.a index 377efff7ee5..f81dd65447e 100644 Binary files a/usr/lib/w32api/libcfgbkend.a and b/usr/lib/w32api/libcfgbkend.a differ diff --git a/usr/lib/w32api/libcfgmgr32.a b/usr/lib/w32api/libcfgmgr32.a index a24e563f045..cbe7fc11be2 100644 Binary files a/usr/lib/w32api/libcfgmgr32.a and b/usr/lib/w32api/libcfgmgr32.a differ diff --git a/usr/lib/w32api/libchakrart.a b/usr/lib/w32api/libchakrart.a index bb973509780..1f36d1ff33f 100644 Binary files a/usr/lib/w32api/libchakrart.a and b/usr/lib/w32api/libchakrart.a differ diff --git a/usr/lib/w32api/libchtskdic.a b/usr/lib/w32api/libchtskdic.a index 04ad8dcc8e7..fe09b2e53b5 100644 Binary files a/usr/lib/w32api/libchtskdic.a and b/usr/lib/w32api/libchtskdic.a differ diff --git a/usr/lib/w32api/libcimwin32.a b/usr/lib/w32api/libcimwin32.a index d067d19c522..781d87e090e 100644 Binary files a/usr/lib/w32api/libcimwin32.a and b/usr/lib/w32api/libcimwin32.a differ diff --git a/usr/lib/w32api/libclasspnp.a b/usr/lib/w32api/libclasspnp.a index ccc8d1c44d6..b7527851178 100644 Binary files a/usr/lib/w32api/libclasspnp.a and b/usr/lib/w32api/libclasspnp.a differ diff --git a/usr/lib/w32api/libclb.a b/usr/lib/w32api/libclb.a index 1bcdf4dcaa4..d1cf4332ff7 100644 Binary files a/usr/lib/w32api/libclb.a and b/usr/lib/w32api/libclb.a differ diff --git a/usr/lib/w32api/libclbcatq.a b/usr/lib/w32api/libclbcatq.a index 505de5f0128..34e5bda9379 100644 Binary files a/usr/lib/w32api/libclbcatq.a and b/usr/lib/w32api/libclbcatq.a differ diff --git a/usr/lib/w32api/libclfsw32.a b/usr/lib/w32api/libclfsw32.a index 99049b91bde..85aad9f79a6 100644 Binary files a/usr/lib/w32api/libclfsw32.a and b/usr/lib/w32api/libclfsw32.a differ diff --git a/usr/lib/w32api/libcliconfg.a b/usr/lib/w32api/libcliconfg.a index 34b070a6280..33f0c1d6d47 100644 Binary files a/usr/lib/w32api/libcliconfg.a and b/usr/lib/w32api/libcliconfg.a differ diff --git a/usr/lib/w32api/libclusapi.a b/usr/lib/w32api/libclusapi.a index 4594a010eb5..69d26c56fa5 100644 Binary files a/usr/lib/w32api/libclusapi.a and b/usr/lib/w32api/libclusapi.a differ diff --git a/usr/lib/w32api/libcmcfg32.a b/usr/lib/w32api/libcmcfg32.a index 41395501359..fa40f20fc5c 100644 Binary files a/usr/lib/w32api/libcmcfg32.a and b/usr/lib/w32api/libcmcfg32.a differ diff --git a/usr/lib/w32api/libcmdial32.a b/usr/lib/w32api/libcmdial32.a index 76200fbb284..21bd90fb5a0 100644 Binary files a/usr/lib/w32api/libcmdial32.a and b/usr/lib/w32api/libcmdial32.a differ diff --git a/usr/lib/w32api/libcmpbk32.a b/usr/lib/w32api/libcmpbk32.a index bf02fa6e100..39929ffa1b8 100644 Binary files a/usr/lib/w32api/libcmpbk32.a and b/usr/lib/w32api/libcmpbk32.a differ diff --git a/usr/lib/w32api/libcmutil.a b/usr/lib/w32api/libcmutil.a index 224f5b1bae9..4ed4e78c071 100644 Binary files a/usr/lib/w32api/libcmutil.a and b/usr/lib/w32api/libcmutil.a differ diff --git a/usr/lib/w32api/libcnetcfg.a b/usr/lib/w32api/libcnetcfg.a index 5cc0e257e60..de4b3fe14f7 100644 Binary files a/usr/lib/w32api/libcnetcfg.a and b/usr/lib/w32api/libcnetcfg.a differ diff --git a/usr/lib/w32api/libcnvfat.a b/usr/lib/w32api/libcnvfat.a index 67df8381d9e..d36b5f83228 100644 Binary files a/usr/lib/w32api/libcnvfat.a and b/usr/lib/w32api/libcnvfat.a differ diff --git a/usr/lib/w32api/libcoadmin.a b/usr/lib/w32api/libcoadmin.a index bec1ede9a81..9de56395418 100644 Binary files a/usr/lib/w32api/libcoadmin.a and b/usr/lib/w32api/libcoadmin.a differ diff --git a/usr/lib/w32api/libcolbact.a b/usr/lib/w32api/libcolbact.a index f593c6887f7..1450d0b77a8 100644 Binary files a/usr/lib/w32api/libcolbact.a and b/usr/lib/w32api/libcolbact.a differ diff --git a/usr/lib/w32api/libcomctl32.a b/usr/lib/w32api/libcomctl32.a index 385a5bc7988..80b885515c2 100644 Binary files a/usr/lib/w32api/libcomctl32.a and b/usr/lib/w32api/libcomctl32.a differ diff --git a/usr/lib/w32api/libcomdlg32.a b/usr/lib/w32api/libcomdlg32.a index 2383c8dbe10..e3678f8c615 100644 Binary files a/usr/lib/w32api/libcomdlg32.a and b/usr/lib/w32api/libcomdlg32.a differ diff --git a/usr/lib/w32api/libcompstui.a b/usr/lib/w32api/libcompstui.a index a9d6d609cae..7db086783bf 100644 Binary files a/usr/lib/w32api/libcompstui.a and b/usr/lib/w32api/libcompstui.a differ diff --git a/usr/lib/w32api/libcomputecore.a b/usr/lib/w32api/libcomputecore.a index af2cacb2808..c9a56f694eb 100644 Binary files a/usr/lib/w32api/libcomputecore.a and b/usr/lib/w32api/libcomputecore.a differ diff --git a/usr/lib/w32api/libcomputenetwork.a b/usr/lib/w32api/libcomputenetwork.a index 6b59a089b95..3221f1230e1 100644 Binary files a/usr/lib/w32api/libcomputenetwork.a and b/usr/lib/w32api/libcomputenetwork.a differ diff --git a/usr/lib/w32api/libcomputestorage.a b/usr/lib/w32api/libcomputestorage.a index 1c000e1da82..a652b83b065 100644 Binary files a/usr/lib/w32api/libcomputestorage.a and b/usr/lib/w32api/libcomputestorage.a differ diff --git a/usr/lib/w32api/libcomres.a b/usr/lib/w32api/libcomres.a index 0433cce0101..dd0d2a2720f 100644 Binary files a/usr/lib/w32api/libcomres.a and b/usr/lib/w32api/libcomres.a differ diff --git a/usr/lib/w32api/libcomsetup.a b/usr/lib/w32api/libcomsetup.a index 1b751d26b77..2910644cec4 100644 Binary files a/usr/lib/w32api/libcomsetup.a and b/usr/lib/w32api/libcomsetup.a differ diff --git a/usr/lib/w32api/libcomsnap.a b/usr/lib/w32api/libcomsnap.a index f36840e7bbd..c989d76e2c2 100644 Binary files a/usr/lib/w32api/libcomsnap.a and b/usr/lib/w32api/libcomsnap.a differ diff --git a/usr/lib/w32api/libcomsvcs.a b/usr/lib/w32api/libcomsvcs.a index 95c73a6a460..e1127835e47 100644 Binary files a/usr/lib/w32api/libcomsvcs.a and b/usr/lib/w32api/libcomsvcs.a differ diff --git a/usr/lib/w32api/libcomuid.a b/usr/lib/w32api/libcomuid.a index d994e943284..8ab5f4c2357 100644 Binary files a/usr/lib/w32api/libcomuid.a and b/usr/lib/w32api/libcomuid.a differ diff --git a/usr/lib/w32api/libconnect.a b/usr/lib/w32api/libconnect.a index 8981f35f467..9f9662737c6 100644 Binary files a/usr/lib/w32api/libconnect.a and b/usr/lib/w32api/libconnect.a differ diff --git a/usr/lib/w32api/libconsole.a b/usr/lib/w32api/libconsole.a index f858a429bc4..2f139bd9bf8 100644 Binary files a/usr/lib/w32api/libconsole.a and b/usr/lib/w32api/libconsole.a differ diff --git a/usr/lib/w32api/libcoremessaging.a b/usr/lib/w32api/libcoremessaging.a index e600034f9f2..51593cc2270 100644 Binary files a/usr/lib/w32api/libcoremessaging.a and b/usr/lib/w32api/libcoremessaging.a differ diff --git a/usr/lib/w32api/libcorpol.a b/usr/lib/w32api/libcorpol.a index c4b4667e0c9..cdf5ae49627 100644 Binary files a/usr/lib/w32api/libcorpol.a and b/usr/lib/w32api/libcorpol.a differ diff --git a/usr/lib/w32api/libcredui.a b/usr/lib/w32api/libcredui.a index 5fb9041229e..7f3d97692ac 100644 Binary files a/usr/lib/w32api/libcredui.a and b/usr/lib/w32api/libcredui.a differ diff --git a/usr/lib/w32api/libcrypt32.a b/usr/lib/w32api/libcrypt32.a index 717c2815146..808e6791aca 100644 Binary files a/usr/lib/w32api/libcrypt32.a and b/usr/lib/w32api/libcrypt32.a differ diff --git a/usr/lib/w32api/libcryptbase.a b/usr/lib/w32api/libcryptbase.a index e896af8ad92..03390469cb1 100644 Binary files a/usr/lib/w32api/libcryptbase.a and b/usr/lib/w32api/libcryptbase.a differ diff --git a/usr/lib/w32api/libcryptdlg.a b/usr/lib/w32api/libcryptdlg.a index 6ecb9c1ff64..1c9de9da652 100644 Binary files a/usr/lib/w32api/libcryptdlg.a and b/usr/lib/w32api/libcryptdlg.a differ diff --git a/usr/lib/w32api/libcryptdll.a b/usr/lib/w32api/libcryptdll.a index 42b25507ea6..c0f42505fad 100644 Binary files a/usr/lib/w32api/libcryptdll.a and b/usr/lib/w32api/libcryptdll.a differ diff --git a/usr/lib/w32api/libcryptext.a b/usr/lib/w32api/libcryptext.a index 861500ac3bd..e03253510b2 100644 Binary files a/usr/lib/w32api/libcryptext.a and b/usr/lib/w32api/libcryptext.a differ diff --git a/usr/lib/w32api/libcryptnet.a b/usr/lib/w32api/libcryptnet.a index 5aa06870089..3b122128b77 100644 Binary files a/usr/lib/w32api/libcryptnet.a and b/usr/lib/w32api/libcryptnet.a differ diff --git a/usr/lib/w32api/libcryptsp.a b/usr/lib/w32api/libcryptsp.a index 062a79a0771..2ae43b7af31 100644 Binary files a/usr/lib/w32api/libcryptsp.a and b/usr/lib/w32api/libcryptsp.a differ diff --git a/usr/lib/w32api/libcryptsvc.a b/usr/lib/w32api/libcryptsvc.a index 1672dec286f..0f9bff53954 100644 Binary files a/usr/lib/w32api/libcryptsvc.a and b/usr/lib/w32api/libcryptsvc.a differ diff --git a/usr/lib/w32api/libcryptui.a b/usr/lib/w32api/libcryptui.a index 4cce4d610a0..f63e02b875e 100644 Binary files a/usr/lib/w32api/libcryptui.a and b/usr/lib/w32api/libcryptui.a differ diff --git a/usr/lib/w32api/libcryptxml.a b/usr/lib/w32api/libcryptxml.a index c62a2a6d0fc..2398197f13e 100644 Binary files a/usr/lib/w32api/libcryptxml.a and b/usr/lib/w32api/libcryptxml.a differ diff --git a/usr/lib/w32api/libcscapi.a b/usr/lib/w32api/libcscapi.a index b3d7cfb7cf6..6eb5c37efc7 100644 Binary files a/usr/lib/w32api/libcscapi.a and b/usr/lib/w32api/libcscapi.a differ diff --git a/usr/lib/w32api/libcscdll.a b/usr/lib/w32api/libcscdll.a index f9c06ab361e..2f40019d405 100644 Binary files a/usr/lib/w32api/libcscdll.a and b/usr/lib/w32api/libcscdll.a differ diff --git a/usr/lib/w32api/libcscui.a b/usr/lib/w32api/libcscui.a index fa79a9529d5..aed675712b4 100644 Binary files a/usr/lib/w32api/libcscui.a and b/usr/lib/w32api/libcscui.a differ diff --git a/usr/lib/w32api/libcsrsrv.a b/usr/lib/w32api/libcsrsrv.a index ffbf4a68df5..b2421ed6cf1 100644 Binary files a/usr/lib/w32api/libcsrsrv.a and b/usr/lib/w32api/libcsrsrv.a differ diff --git a/usr/lib/w32api/libd2d1.a b/usr/lib/w32api/libd2d1.a index bed1fb48a0e..b82251d81bb 100644 Binary files a/usr/lib/w32api/libd2d1.a and b/usr/lib/w32api/libd2d1.a differ diff --git a/usr/lib/w32api/libd3d10.a b/usr/lib/w32api/libd3d10.a index 727f91466ff..1eeabe38b72 100644 Binary files a/usr/lib/w32api/libd3d10.a and b/usr/lib/w32api/libd3d10.a differ diff --git a/usr/lib/w32api/libd3d11.a b/usr/lib/w32api/libd3d11.a index d202bc754e1..ea502c6e915 100644 Binary files a/usr/lib/w32api/libd3d11.a and b/usr/lib/w32api/libd3d11.a differ diff --git a/usr/lib/w32api/libd3d12.a b/usr/lib/w32api/libd3d12.a index f7759fc386d..85ed97f2f9d 100644 Binary files a/usr/lib/w32api/libd3d12.a and b/usr/lib/w32api/libd3d12.a differ diff --git a/usr/lib/w32api/libd3d8thk.a b/usr/lib/w32api/libd3d8thk.a index 7ac325da701..387ca0fc912 100644 Binary files a/usr/lib/w32api/libd3d8thk.a and b/usr/lib/w32api/libd3d8thk.a differ diff --git a/usr/lib/w32api/libd3d9.a b/usr/lib/w32api/libd3d9.a index 8f4b7419ac2..e6975816580 100644 Binary files a/usr/lib/w32api/libd3d9.a and b/usr/lib/w32api/libd3d9.a differ diff --git a/usr/lib/w32api/libd3dcompiler.a b/usr/lib/w32api/libd3dcompiler.a index 820d936b7d1..98fe262a435 100644 Binary files a/usr/lib/w32api/libd3dcompiler.a and b/usr/lib/w32api/libd3dcompiler.a differ diff --git a/usr/lib/w32api/libd3dcompiler_33.a b/usr/lib/w32api/libd3dcompiler_33.a index 5440079d7dc..fbd22a623c8 100644 Binary files a/usr/lib/w32api/libd3dcompiler_33.a and b/usr/lib/w32api/libd3dcompiler_33.a differ diff --git a/usr/lib/w32api/libd3dcompiler_34.a b/usr/lib/w32api/libd3dcompiler_34.a index 2f0c24919b7..a3b1cb7bbf6 100644 Binary files a/usr/lib/w32api/libd3dcompiler_34.a and b/usr/lib/w32api/libd3dcompiler_34.a differ diff --git a/usr/lib/w32api/libd3dcompiler_35.a b/usr/lib/w32api/libd3dcompiler_35.a index b55a29ca932..67763dc7cab 100644 Binary files a/usr/lib/w32api/libd3dcompiler_35.a and b/usr/lib/w32api/libd3dcompiler_35.a differ diff --git a/usr/lib/w32api/libd3dcompiler_36.a b/usr/lib/w32api/libd3dcompiler_36.a index 7c9ff2bd5c5..d0acf5d12d8 100644 Binary files a/usr/lib/w32api/libd3dcompiler_36.a and b/usr/lib/w32api/libd3dcompiler_36.a differ diff --git a/usr/lib/w32api/libd3dcompiler_37.a b/usr/lib/w32api/libd3dcompiler_37.a index f718a0b7d60..8361ff5a56e 100644 Binary files a/usr/lib/w32api/libd3dcompiler_37.a and b/usr/lib/w32api/libd3dcompiler_37.a differ diff --git a/usr/lib/w32api/libd3dcompiler_38.a b/usr/lib/w32api/libd3dcompiler_38.a index e35515a5c9e..9852faa874c 100644 Binary files a/usr/lib/w32api/libd3dcompiler_38.a and b/usr/lib/w32api/libd3dcompiler_38.a differ diff --git a/usr/lib/w32api/libd3dcompiler_39.a b/usr/lib/w32api/libd3dcompiler_39.a index 1910ebb3291..768d1acef38 100644 Binary files a/usr/lib/w32api/libd3dcompiler_39.a and b/usr/lib/w32api/libd3dcompiler_39.a differ diff --git a/usr/lib/w32api/libd3dcompiler_40.a b/usr/lib/w32api/libd3dcompiler_40.a index ae1ba3505e8..cec49212900 100644 Binary files a/usr/lib/w32api/libd3dcompiler_40.a and b/usr/lib/w32api/libd3dcompiler_40.a differ diff --git a/usr/lib/w32api/libd3dcompiler_41.a b/usr/lib/w32api/libd3dcompiler_41.a index 8955253067d..99aa123a416 100644 Binary files a/usr/lib/w32api/libd3dcompiler_41.a and b/usr/lib/w32api/libd3dcompiler_41.a differ diff --git a/usr/lib/w32api/libd3dcompiler_42.a b/usr/lib/w32api/libd3dcompiler_42.a index 26a808794bf..824f2f760c8 100644 Binary files a/usr/lib/w32api/libd3dcompiler_42.a and b/usr/lib/w32api/libd3dcompiler_42.a differ diff --git a/usr/lib/w32api/libd3dcompiler_43.a b/usr/lib/w32api/libd3dcompiler_43.a index 41b1b375157..5ca5d5a7515 100644 Binary files a/usr/lib/w32api/libd3dcompiler_43.a and b/usr/lib/w32api/libd3dcompiler_43.a differ diff --git a/usr/lib/w32api/libd3dcompiler_46.a b/usr/lib/w32api/libd3dcompiler_46.a index d74af299e2d..82a67eb8fee 100644 Binary files a/usr/lib/w32api/libd3dcompiler_46.a and b/usr/lib/w32api/libd3dcompiler_46.a differ diff --git a/usr/lib/w32api/libd3dcompiler_47.a b/usr/lib/w32api/libd3dcompiler_47.a index 9b32c025f08..28aa9a17520 100644 Binary files a/usr/lib/w32api/libd3dcompiler_47.a and b/usr/lib/w32api/libd3dcompiler_47.a differ diff --git a/usr/lib/w32api/libd3dcsx_46.a b/usr/lib/w32api/libd3dcsx_46.a index 1609e07286f..e6ae7fcecb8 100644 Binary files a/usr/lib/w32api/libd3dcsx_46.a and b/usr/lib/w32api/libd3dcsx_46.a differ diff --git a/usr/lib/w32api/libd3dcsxd.a b/usr/lib/w32api/libd3dcsxd.a index 987ef75b1f3..7ec1a9ca1a0 100644 Binary files a/usr/lib/w32api/libd3dcsxd.a and b/usr/lib/w32api/libd3dcsxd.a differ diff --git a/usr/lib/w32api/libd3dcsxd_43.a b/usr/lib/w32api/libd3dcsxd_43.a index d928cdae998..fa08785870e 100644 Binary files a/usr/lib/w32api/libd3dcsxd_43.a and b/usr/lib/w32api/libd3dcsxd_43.a differ diff --git a/usr/lib/w32api/libd3dx10.a b/usr/lib/w32api/libd3dx10.a index d468cf596f7..207ac1aaf55 100644 Binary files a/usr/lib/w32api/libd3dx10.a and b/usr/lib/w32api/libd3dx10.a differ diff --git a/usr/lib/w32api/libd3dx10_33.a b/usr/lib/w32api/libd3dx10_33.a index c0019a47b47..7a7df8067d3 100644 Binary files a/usr/lib/w32api/libd3dx10_33.a and b/usr/lib/w32api/libd3dx10_33.a differ diff --git a/usr/lib/w32api/libd3dx10_34.a b/usr/lib/w32api/libd3dx10_34.a index 2cf3232e3e1..f607d816f7d 100644 Binary files a/usr/lib/w32api/libd3dx10_34.a and b/usr/lib/w32api/libd3dx10_34.a differ diff --git a/usr/lib/w32api/libd3dx10_35.a b/usr/lib/w32api/libd3dx10_35.a index 8c138904063..da3b06653b4 100644 Binary files a/usr/lib/w32api/libd3dx10_35.a and b/usr/lib/w32api/libd3dx10_35.a differ diff --git a/usr/lib/w32api/libd3dx10_36.a b/usr/lib/w32api/libd3dx10_36.a index c0c2e2a7559..d978776e9f2 100644 Binary files a/usr/lib/w32api/libd3dx10_36.a and b/usr/lib/w32api/libd3dx10_36.a differ diff --git a/usr/lib/w32api/libd3dx10_37.a b/usr/lib/w32api/libd3dx10_37.a index b5c71a7dac4..9b5d5f952e0 100644 Binary files a/usr/lib/w32api/libd3dx10_37.a and b/usr/lib/w32api/libd3dx10_37.a differ diff --git a/usr/lib/w32api/libd3dx10_38.a b/usr/lib/w32api/libd3dx10_38.a index ec8ac2ae412..13506d32ffc 100644 Binary files a/usr/lib/w32api/libd3dx10_38.a and b/usr/lib/w32api/libd3dx10_38.a differ diff --git a/usr/lib/w32api/libd3dx10_39.a b/usr/lib/w32api/libd3dx10_39.a index 0b0ec485210..495f31d3c16 100644 Binary files a/usr/lib/w32api/libd3dx10_39.a and b/usr/lib/w32api/libd3dx10_39.a differ diff --git a/usr/lib/w32api/libd3dx10_40.a b/usr/lib/w32api/libd3dx10_40.a index 53a2e8a4616..7c324f26564 100644 Binary files a/usr/lib/w32api/libd3dx10_40.a and b/usr/lib/w32api/libd3dx10_40.a differ diff --git a/usr/lib/w32api/libd3dx10_41.a b/usr/lib/w32api/libd3dx10_41.a index a744e0609f8..03eec8bfcb8 100644 Binary files a/usr/lib/w32api/libd3dx10_41.a and b/usr/lib/w32api/libd3dx10_41.a differ diff --git a/usr/lib/w32api/libd3dx10_42.a b/usr/lib/w32api/libd3dx10_42.a index 0ab696a642b..0942599ef09 100644 Binary files a/usr/lib/w32api/libd3dx10_42.a and b/usr/lib/w32api/libd3dx10_42.a differ diff --git a/usr/lib/w32api/libd3dx10_43.a b/usr/lib/w32api/libd3dx10_43.a index 60c72fd0c22..86f70cb8b75 100644 Binary files a/usr/lib/w32api/libd3dx10_43.a and b/usr/lib/w32api/libd3dx10_43.a differ diff --git a/usr/lib/w32api/libd3dx11.a b/usr/lib/w32api/libd3dx11.a index a9817998689..d7496a30ca5 100644 Binary files a/usr/lib/w32api/libd3dx11.a and b/usr/lib/w32api/libd3dx11.a differ diff --git a/usr/lib/w32api/libd3dx11_42.a b/usr/lib/w32api/libd3dx11_42.a index ef758e8aed4..1880dc22647 100644 Binary files a/usr/lib/w32api/libd3dx11_42.a and b/usr/lib/w32api/libd3dx11_42.a differ diff --git a/usr/lib/w32api/libd3dx11_43.a b/usr/lib/w32api/libd3dx11_43.a index 54b6db69d73..0f9135db9c5 100644 Binary files a/usr/lib/w32api/libd3dx11_43.a and b/usr/lib/w32api/libd3dx11_43.a differ diff --git a/usr/lib/w32api/libd3dx9.a b/usr/lib/w32api/libd3dx9.a index 6c252b8ffdd..dd4f7f95d0e 100644 Binary files a/usr/lib/w32api/libd3dx9.a and b/usr/lib/w32api/libd3dx9.a differ diff --git a/usr/lib/w32api/libd3dx9_24.a b/usr/lib/w32api/libd3dx9_24.a index ed78c45cf2b..58d42570ec3 100644 Binary files a/usr/lib/w32api/libd3dx9_24.a and b/usr/lib/w32api/libd3dx9_24.a differ diff --git a/usr/lib/w32api/libd3dx9_25.a b/usr/lib/w32api/libd3dx9_25.a index ae53685f0a7..f58f22351cd 100644 Binary files a/usr/lib/w32api/libd3dx9_25.a and b/usr/lib/w32api/libd3dx9_25.a differ diff --git a/usr/lib/w32api/libd3dx9_26.a b/usr/lib/w32api/libd3dx9_26.a index ea851a270e4..cf2f93fcfa5 100644 Binary files a/usr/lib/w32api/libd3dx9_26.a and b/usr/lib/w32api/libd3dx9_26.a differ diff --git a/usr/lib/w32api/libd3dx9_27.a b/usr/lib/w32api/libd3dx9_27.a index 3995d0a6b64..49fbc4f6127 100644 Binary files a/usr/lib/w32api/libd3dx9_27.a and b/usr/lib/w32api/libd3dx9_27.a differ diff --git a/usr/lib/w32api/libd3dx9_28.a b/usr/lib/w32api/libd3dx9_28.a index 205f709cfd5..3a8868979a9 100644 Binary files a/usr/lib/w32api/libd3dx9_28.a and b/usr/lib/w32api/libd3dx9_28.a differ diff --git a/usr/lib/w32api/libd3dx9_29.a b/usr/lib/w32api/libd3dx9_29.a index b30eae4f7e7..0594f0df944 100644 Binary files a/usr/lib/w32api/libd3dx9_29.a and b/usr/lib/w32api/libd3dx9_29.a differ diff --git a/usr/lib/w32api/libd3dx9_30.a b/usr/lib/w32api/libd3dx9_30.a index 844e205877d..9b9c6704e32 100644 Binary files a/usr/lib/w32api/libd3dx9_30.a and b/usr/lib/w32api/libd3dx9_30.a differ diff --git a/usr/lib/w32api/libd3dx9_31.a b/usr/lib/w32api/libd3dx9_31.a index d3df074137e..2930e9ac236 100644 Binary files a/usr/lib/w32api/libd3dx9_31.a and b/usr/lib/w32api/libd3dx9_31.a differ diff --git a/usr/lib/w32api/libd3dx9_32.a b/usr/lib/w32api/libd3dx9_32.a index 737457124d8..15851aa6d59 100644 Binary files a/usr/lib/w32api/libd3dx9_32.a and b/usr/lib/w32api/libd3dx9_32.a differ diff --git a/usr/lib/w32api/libd3dx9_33.a b/usr/lib/w32api/libd3dx9_33.a index b7449ef01d4..ca095d19cc1 100644 Binary files a/usr/lib/w32api/libd3dx9_33.a and b/usr/lib/w32api/libd3dx9_33.a differ diff --git a/usr/lib/w32api/libd3dx9_34.a b/usr/lib/w32api/libd3dx9_34.a index bfe35ffc383..07b416e1c6c 100644 Binary files a/usr/lib/w32api/libd3dx9_34.a and b/usr/lib/w32api/libd3dx9_34.a differ diff --git a/usr/lib/w32api/libd3dx9_35.a b/usr/lib/w32api/libd3dx9_35.a index b1d5295b659..51bf41f20ca 100644 Binary files a/usr/lib/w32api/libd3dx9_35.a and b/usr/lib/w32api/libd3dx9_35.a differ diff --git a/usr/lib/w32api/libd3dx9_36.a b/usr/lib/w32api/libd3dx9_36.a index 6990f9580d6..e75e65acc12 100644 Binary files a/usr/lib/w32api/libd3dx9_36.a and b/usr/lib/w32api/libd3dx9_36.a differ diff --git a/usr/lib/w32api/libd3dx9_37.a b/usr/lib/w32api/libd3dx9_37.a index 4b7dd489dcd..d10f313e697 100644 Binary files a/usr/lib/w32api/libd3dx9_37.a and b/usr/lib/w32api/libd3dx9_37.a differ diff --git a/usr/lib/w32api/libd3dx9_38.a b/usr/lib/w32api/libd3dx9_38.a index 5230f209d40..0bc80809538 100644 Binary files a/usr/lib/w32api/libd3dx9_38.a and b/usr/lib/w32api/libd3dx9_38.a differ diff --git a/usr/lib/w32api/libd3dx9_39.a b/usr/lib/w32api/libd3dx9_39.a index 027e11d7cac..d56ae4a37f4 100644 Binary files a/usr/lib/w32api/libd3dx9_39.a and b/usr/lib/w32api/libd3dx9_39.a differ diff --git a/usr/lib/w32api/libd3dx9_40.a b/usr/lib/w32api/libd3dx9_40.a index 386047e5c47..b6cb4666621 100644 Binary files a/usr/lib/w32api/libd3dx9_40.a and b/usr/lib/w32api/libd3dx9_40.a differ diff --git a/usr/lib/w32api/libd3dx9_41.a b/usr/lib/w32api/libd3dx9_41.a index 3a52ccef176..8d262c67978 100644 Binary files a/usr/lib/w32api/libd3dx9_41.a and b/usr/lib/w32api/libd3dx9_41.a differ diff --git a/usr/lib/w32api/libd3dx9_42.a b/usr/lib/w32api/libd3dx9_42.a index 79dd9488991..24a09818f41 100644 Binary files a/usr/lib/w32api/libd3dx9_42.a and b/usr/lib/w32api/libd3dx9_42.a differ diff --git a/usr/lib/w32api/libd3dx9_43.a b/usr/lib/w32api/libd3dx9_43.a index ef5b7378339..4589a4b099d 100644 Binary files a/usr/lib/w32api/libd3dx9_43.a and b/usr/lib/w32api/libd3dx9_43.a differ diff --git a/usr/lib/w32api/libd3dxof.a b/usr/lib/w32api/libd3dxof.a index 69e437e419b..06034b20d6c 100644 Binary files a/usr/lib/w32api/libd3dxof.a and b/usr/lib/w32api/libd3dxof.a differ diff --git a/usr/lib/w32api/libdavclnt.a b/usr/lib/w32api/libdavclnt.a index a8eaa957dbe..d03323b88e4 100644 Binary files a/usr/lib/w32api/libdavclnt.a and b/usr/lib/w32api/libdavclnt.a differ diff --git a/usr/lib/w32api/libdbgeng.a b/usr/lib/w32api/libdbgeng.a index 95027c2c25d..f2f7cbea1cd 100644 Binary files a/usr/lib/w32api/libdbgeng.a and b/usr/lib/w32api/libdbgeng.a differ diff --git a/usr/lib/w32api/libdbghelp.a b/usr/lib/w32api/libdbghelp.a index e5031184c08..7a63e8306c3 100644 Binary files a/usr/lib/w32api/libdbghelp.a and b/usr/lib/w32api/libdbghelp.a differ diff --git a/usr/lib/w32api/libdbnetlib.a b/usr/lib/w32api/libdbnetlib.a index b93da465476..83606109d26 100644 Binary files a/usr/lib/w32api/libdbnetlib.a and b/usr/lib/w32api/libdbnetlib.a differ diff --git a/usr/lib/w32api/libdbnmpntw.a b/usr/lib/w32api/libdbnmpntw.a index 55c1d59db93..f9bcd48b56d 100644 Binary files a/usr/lib/w32api/libdbnmpntw.a and b/usr/lib/w32api/libdbnmpntw.a differ diff --git a/usr/lib/w32api/libdciman32.a b/usr/lib/w32api/libdciman32.a index 94bfbcf9e36..8cc9bbb9ea5 100644 Binary files a/usr/lib/w32api/libdciman32.a and b/usr/lib/w32api/libdciman32.a differ diff --git a/usr/lib/w32api/libdcomp.a b/usr/lib/w32api/libdcomp.a index 0ec0b5e1e61..100e0a476b7 100644 Binary files a/usr/lib/w32api/libdcomp.a and b/usr/lib/w32api/libdcomp.a differ diff --git a/usr/lib/w32api/libddraw.a b/usr/lib/w32api/libddraw.a index 0b982dcd99f..134c920855d 100644 Binary files a/usr/lib/w32api/libddraw.a and b/usr/lib/w32api/libddraw.a differ diff --git a/usr/lib/w32api/libdevmgr.a b/usr/lib/w32api/libdevmgr.a index 23add7311a5..ec869308d3c 100644 Binary files a/usr/lib/w32api/libdevmgr.a and b/usr/lib/w32api/libdevmgr.a differ diff --git a/usr/lib/w32api/libdevobj.a b/usr/lib/w32api/libdevobj.a index 590e2fbbab7..c561faf87cc 100644 Binary files a/usr/lib/w32api/libdevobj.a and b/usr/lib/w32api/libdevobj.a differ diff --git a/usr/lib/w32api/libdevrtl.a b/usr/lib/w32api/libdevrtl.a index d6074e3d81a..97626618a13 100644 Binary files a/usr/lib/w32api/libdevrtl.a and b/usr/lib/w32api/libdevrtl.a differ diff --git a/usr/lib/w32api/libdhcpcsvc.a b/usr/lib/w32api/libdhcpcsvc.a index 387605aea40..9c5b17372ff 100644 Binary files a/usr/lib/w32api/libdhcpcsvc.a and b/usr/lib/w32api/libdhcpcsvc.a differ diff --git a/usr/lib/w32api/libdhcpcsvc6.a b/usr/lib/w32api/libdhcpcsvc6.a index 8549663df49..31d5c084fb9 100644 Binary files a/usr/lib/w32api/libdhcpcsvc6.a and b/usr/lib/w32api/libdhcpcsvc6.a differ diff --git a/usr/lib/w32api/libdhcpsapi.a b/usr/lib/w32api/libdhcpsapi.a index f4154c804ff..6ca75fc1078 100644 Binary files a/usr/lib/w32api/libdhcpsapi.a and b/usr/lib/w32api/libdhcpsapi.a differ diff --git a/usr/lib/w32api/libdiagnosticdataquery.a b/usr/lib/w32api/libdiagnosticdataquery.a index fc49f9e5ba8..1713142b7a9 100644 Binary files a/usr/lib/w32api/libdiagnosticdataquery.a and b/usr/lib/w32api/libdiagnosticdataquery.a differ diff --git a/usr/lib/w32api/libdigest.a b/usr/lib/w32api/libdigest.a index 6eff07bec92..c6d089b2a24 100644 Binary files a/usr/lib/w32api/libdigest.a and b/usr/lib/w32api/libdigest.a differ diff --git a/usr/lib/w32api/libdimsntfy.a b/usr/lib/w32api/libdimsntfy.a index 59808a92ded..39bc61a91ab 100644 Binary files a/usr/lib/w32api/libdimsntfy.a and b/usr/lib/w32api/libdimsntfy.a differ diff --git a/usr/lib/w32api/libdimsroam.a b/usr/lib/w32api/libdimsroam.a index c6c90ea43fe..5ee8f6c107d 100644 Binary files a/usr/lib/w32api/libdimsroam.a and b/usr/lib/w32api/libdimsroam.a differ diff --git a/usr/lib/w32api/libdinput.a b/usr/lib/w32api/libdinput.a index e4050b397bf..06c27af7439 100644 Binary files a/usr/lib/w32api/libdinput.a and b/usr/lib/w32api/libdinput.a differ diff --git a/usr/lib/w32api/libdinput8.a b/usr/lib/w32api/libdinput8.a index c298c1adff4..5229f9aa8b7 100644 Binary files a/usr/lib/w32api/libdinput8.a and b/usr/lib/w32api/libdinput8.a differ diff --git a/usr/lib/w32api/libdirectml.a b/usr/lib/w32api/libdirectml.a index 653533cf527..1085b559e49 100644 Binary files a/usr/lib/w32api/libdirectml.a and b/usr/lib/w32api/libdirectml.a differ diff --git a/usr/lib/w32api/libdiskcopy.a b/usr/lib/w32api/libdiskcopy.a index 8fc9b3d1763..bbb546d6bb6 100644 Binary files a/usr/lib/w32api/libdiskcopy.a and b/usr/lib/w32api/libdiskcopy.a differ diff --git a/usr/lib/w32api/libdismapi.a b/usr/lib/w32api/libdismapi.a index 06f6c1119cf..ebadb985305 100644 Binary files a/usr/lib/w32api/libdismapi.a and b/usr/lib/w32api/libdismapi.a differ diff --git a/usr/lib/w32api/libdloadhelper.a b/usr/lib/w32api/libdloadhelper.a index fd95843743d..abedaf1044c 100644 Binary files a/usr/lib/w32api/libdloadhelper.a and b/usr/lib/w32api/libdloadhelper.a differ diff --git a/usr/lib/w32api/libdmconfig.a b/usr/lib/w32api/libdmconfig.a index 14de5cfac68..be7490313cf 100644 Binary files a/usr/lib/w32api/libdmconfig.a and b/usr/lib/w32api/libdmconfig.a differ diff --git a/usr/lib/w32api/libdmdskmgr.a b/usr/lib/w32api/libdmdskmgr.a index 479538c046b..aeed5feee8b 100644 Binary files a/usr/lib/w32api/libdmdskmgr.a and b/usr/lib/w32api/libdmdskmgr.a differ diff --git a/usr/lib/w32api/libdmivcitf.a b/usr/lib/w32api/libdmivcitf.a index e436bb1c9b9..866f3bf5269 100644 Binary files a/usr/lib/w32api/libdmivcitf.a and b/usr/lib/w32api/libdmivcitf.a differ diff --git a/usr/lib/w32api/libdmoguids.a b/usr/lib/w32api/libdmoguids.a index 2daa5006b10..326229764db 100644 Binary files a/usr/lib/w32api/libdmoguids.a and b/usr/lib/w32api/libdmoguids.a differ diff --git a/usr/lib/w32api/libdmutil.a b/usr/lib/w32api/libdmutil.a index 803042818c4..828461a8f49 100644 Binary files a/usr/lib/w32api/libdmutil.a and b/usr/lib/w32api/libdmutil.a differ diff --git a/usr/lib/w32api/libdmvdsitf.a b/usr/lib/w32api/libdmvdsitf.a index 0a1a6e7f5fa..50ced6ec4ba 100644 Binary files a/usr/lib/w32api/libdmvdsitf.a and b/usr/lib/w32api/libdmvdsitf.a differ diff --git a/usr/lib/w32api/libdnsapi.a b/usr/lib/w32api/libdnsapi.a index f92d3fbccea..e6f77d2c8dd 100644 Binary files a/usr/lib/w32api/libdnsapi.a and b/usr/lib/w32api/libdnsapi.a differ diff --git a/usr/lib/w32api/libdnsperf.a b/usr/lib/w32api/libdnsperf.a index dd307d3b646..b804c0da5bd 100644 Binary files a/usr/lib/w32api/libdnsperf.a and b/usr/lib/w32api/libdnsperf.a differ diff --git a/usr/lib/w32api/libdnsrslvr.a b/usr/lib/w32api/libdnsrslvr.a index af2703d6c7c..d31840dd094 100644 Binary files a/usr/lib/w32api/libdnsrslvr.a and b/usr/lib/w32api/libdnsrslvr.a differ diff --git a/usr/lib/w32api/libdpapi.a b/usr/lib/w32api/libdpapi.a index d9b55253a6b..b98e29e830a 100644 Binary files a/usr/lib/w32api/libdpapi.a and b/usr/lib/w32api/libdpapi.a differ diff --git a/usr/lib/w32api/libdpnaddr.a b/usr/lib/w32api/libdpnaddr.a index 71c860348ea..ae824f8a809 100644 Binary files a/usr/lib/w32api/libdpnaddr.a and b/usr/lib/w32api/libdpnaddr.a differ diff --git a/usr/lib/w32api/libdpnet.a b/usr/lib/w32api/libdpnet.a index da168505416..5137015329c 100644 Binary files a/usr/lib/w32api/libdpnet.a and b/usr/lib/w32api/libdpnet.a differ diff --git a/usr/lib/w32api/libdpnhupnp.a b/usr/lib/w32api/libdpnhupnp.a index 9198ac755f4..628eecabcc4 100644 Binary files a/usr/lib/w32api/libdpnhupnp.a and b/usr/lib/w32api/libdpnhupnp.a differ diff --git a/usr/lib/w32api/libdpnlobby.a b/usr/lib/w32api/libdpnlobby.a index 9fb0389c956..95aec6d9ac2 100644 Binary files a/usr/lib/w32api/libdpnlobby.a and b/usr/lib/w32api/libdpnlobby.a differ diff --git a/usr/lib/w32api/libdpvoice.a b/usr/lib/w32api/libdpvoice.a index a5a0338f56e..395e901f7c1 100644 Binary files a/usr/lib/w32api/libdpvoice.a and b/usr/lib/w32api/libdpvoice.a differ diff --git a/usr/lib/w32api/libdrprov.a b/usr/lib/w32api/libdrprov.a index ae72ea79feb..eb3ab25ef57 100644 Binary files a/usr/lib/w32api/libdrprov.a and b/usr/lib/w32api/libdrprov.a differ diff --git a/usr/lib/w32api/libds32gt.a b/usr/lib/w32api/libds32gt.a index 767b3b32bb2..aa92bb6134b 100644 Binary files a/usr/lib/w32api/libds32gt.a and b/usr/lib/w32api/libds32gt.a differ diff --git a/usr/lib/w32api/libdsauth.a b/usr/lib/w32api/libdsauth.a index 01c61e11df3..9f64632d51c 100644 Binary files a/usr/lib/w32api/libdsauth.a and b/usr/lib/w32api/libdsauth.a differ diff --git a/usr/lib/w32api/libdskquota.a b/usr/lib/w32api/libdskquota.a index 86379ce84f7..ed9b671b4a7 100644 Binary files a/usr/lib/w32api/libdskquota.a and b/usr/lib/w32api/libdskquota.a differ diff --git a/usr/lib/w32api/libdsound.a b/usr/lib/w32api/libdsound.a index 4864ea33c30..ab6c95164ca 100644 Binary files a/usr/lib/w32api/libdsound.a and b/usr/lib/w32api/libdsound.a differ diff --git a/usr/lib/w32api/libdsound3d.a b/usr/lib/w32api/libdsound3d.a index 6f4c51cd5b2..05eea50d4f9 100644 Binary files a/usr/lib/w32api/libdsound3d.a and b/usr/lib/w32api/libdsound3d.a differ diff --git a/usr/lib/w32api/libdsprop.a b/usr/lib/w32api/libdsprop.a index 8f26f876965..6d3e4ca7c20 100644 Binary files a/usr/lib/w32api/libdsprop.a and b/usr/lib/w32api/libdsprop.a differ diff --git a/usr/lib/w32api/libdsquery.a b/usr/lib/w32api/libdsquery.a index f2121e93850..de8b526bdd4 100644 Binary files a/usr/lib/w32api/libdsquery.a and b/usr/lib/w32api/libdsquery.a differ diff --git a/usr/lib/w32api/libdssec.a b/usr/lib/w32api/libdssec.a index 38781f7bc15..4e4230a95d6 100644 Binary files a/usr/lib/w32api/libdssec.a and b/usr/lib/w32api/libdssec.a differ diff --git a/usr/lib/w32api/libdssenh.a b/usr/lib/w32api/libdssenh.a index dadee0d9c8f..6ecabb0aafd 100644 Binary files a/usr/lib/w32api/libdssenh.a and b/usr/lib/w32api/libdssenh.a differ diff --git a/usr/lib/w32api/libdsuiext.a b/usr/lib/w32api/libdsuiext.a index e48aae381f1..17325f28e31 100644 Binary files a/usr/lib/w32api/libdsuiext.a and b/usr/lib/w32api/libdsuiext.a differ diff --git a/usr/lib/w32api/libduser.a b/usr/lib/w32api/libduser.a index 9017214ad73..6632ae32198 100644 Binary files a/usr/lib/w32api/libduser.a and b/usr/lib/w32api/libduser.a differ diff --git a/usr/lib/w32api/libdwmapi.a b/usr/lib/w32api/libdwmapi.a index eb5c8778c84..3dda987e7a6 100644 Binary files a/usr/lib/w32api/libdwmapi.a and b/usr/lib/w32api/libdwmapi.a differ diff --git a/usr/lib/w32api/libdwrite.a b/usr/lib/w32api/libdwrite.a index 606834af65a..d439cedc0e4 100644 Binary files a/usr/lib/w32api/libdwrite.a and b/usr/lib/w32api/libdwrite.a differ diff --git a/usr/lib/w32api/libdxcore.a b/usr/lib/w32api/libdxcore.a index 119dcc833c2..38bdd8b8e5e 100644 Binary files a/usr/lib/w32api/libdxcore.a and b/usr/lib/w32api/libdxcore.a differ diff --git a/usr/lib/w32api/libdxerr8.a b/usr/lib/w32api/libdxerr8.a index 2528f03ad6f..dfe322afcce 100644 Binary files a/usr/lib/w32api/libdxerr8.a and b/usr/lib/w32api/libdxerr8.a differ diff --git a/usr/lib/w32api/libdxerr9.a b/usr/lib/w32api/libdxerr9.a index 54d474706a8..62225c0a59c 100644 Binary files a/usr/lib/w32api/libdxerr9.a and b/usr/lib/w32api/libdxerr9.a differ diff --git a/usr/lib/w32api/libdxgi.a b/usr/lib/w32api/libdxgi.a index 7f30a7823c5..faa567e2189 100644 Binary files a/usr/lib/w32api/libdxgi.a and b/usr/lib/w32api/libdxgi.a differ diff --git a/usr/lib/w32api/libdxguid.a b/usr/lib/w32api/libdxguid.a index 529918f81dd..4393d1c0b1a 100644 Binary files a/usr/lib/w32api/libdxguid.a and b/usr/lib/w32api/libdxguid.a differ diff --git a/usr/lib/w32api/libdxva2.a b/usr/lib/w32api/libdxva2.a index 2a18e035b9a..9d6087a1751 100644 Binary files a/usr/lib/w32api/libdxva2.a and b/usr/lib/w32api/libdxva2.a differ diff --git a/usr/lib/w32api/libeappcfg.a b/usr/lib/w32api/libeappcfg.a index 63db58d2b70..6e16f9c23cb 100644 Binary files a/usr/lib/w32api/libeappcfg.a and b/usr/lib/w32api/libeappcfg.a differ diff --git a/usr/lib/w32api/libeappgnui.a b/usr/lib/w32api/libeappgnui.a index a60d81931d2..4b29ca9bc99 100644 Binary files a/usr/lib/w32api/libeappgnui.a and b/usr/lib/w32api/libeappgnui.a differ diff --git a/usr/lib/w32api/libeapphost.a b/usr/lib/w32api/libeapphost.a index a096fb31726..3f9cfb10cdc 100644 Binary files a/usr/lib/w32api/libeapphost.a and b/usr/lib/w32api/libeapphost.a differ diff --git a/usr/lib/w32api/libeappprxy.a b/usr/lib/w32api/libeappprxy.a index a1ed4ad21a3..5cdd2c726cd 100644 Binary files a/usr/lib/w32api/libeappprxy.a and b/usr/lib/w32api/libeappprxy.a differ diff --git a/usr/lib/w32api/libefsadu.a b/usr/lib/w32api/libefsadu.a index 8d96ec9161f..1e1efb2ff5e 100644 Binary files a/usr/lib/w32api/libefsadu.a and b/usr/lib/w32api/libefsadu.a differ diff --git a/usr/lib/w32api/libes.a b/usr/lib/w32api/libes.a index e6ff03193c7..40e420889a3 100644 Binary files a/usr/lib/w32api/libes.a and b/usr/lib/w32api/libes.a differ diff --git a/usr/lib/w32api/libesent.a b/usr/lib/w32api/libesent.a index 3b2df6bbf94..8e59b4a355a 100644 Binary files a/usr/lib/w32api/libesent.a and b/usr/lib/w32api/libesent.a differ diff --git a/usr/lib/w32api/libesentprf.a b/usr/lib/w32api/libesentprf.a index 19c660ca9cc..0172c2ada95 100644 Binary files a/usr/lib/w32api/libesentprf.a and b/usr/lib/w32api/libesentprf.a differ diff --git a/usr/lib/w32api/libeventlog.a b/usr/lib/w32api/libeventlog.a index b9182e9c047..9848de43b4c 100644 Binary files a/usr/lib/w32api/libeventlog.a and b/usr/lib/w32api/libeventlog.a differ diff --git a/usr/lib/w32api/libevntagnt.a b/usr/lib/w32api/libevntagnt.a index 6fab4f851f7..3a97ce63d9a 100644 Binary files a/usr/lib/w32api/libevntagnt.a and b/usr/lib/w32api/libevntagnt.a differ diff --git a/usr/lib/w32api/libevr.a b/usr/lib/w32api/libevr.a index 5a015740ed9..74ccfccfc1d 100644 Binary files a/usr/lib/w32api/libevr.a and b/usr/lib/w32api/libevr.a differ diff --git a/usr/lib/w32api/libexstrace.a b/usr/lib/w32api/libexstrace.a index 1a6a4f3437d..ee7f63b6425 100644 Binary files a/usr/lib/w32api/libexstrace.a and b/usr/lib/w32api/libexstrace.a differ diff --git a/usr/lib/w32api/libfastprox.a b/usr/lib/w32api/libfastprox.a index 042944a42f9..f1337794e18 100644 Binary files a/usr/lib/w32api/libfastprox.a and b/usr/lib/w32api/libfastprox.a differ diff --git a/usr/lib/w32api/libfaultrep.a b/usr/lib/w32api/libfaultrep.a index 35016ee9edd..195aa1ee727 100644 Binary files a/usr/lib/w32api/libfaultrep.a and b/usr/lib/w32api/libfaultrep.a differ diff --git a/usr/lib/w32api/libfcachdll.a b/usr/lib/w32api/libfcachdll.a index 744b00577af..d8b1c94fafe 100644 Binary files a/usr/lib/w32api/libfcachdll.a and b/usr/lib/w32api/libfcachdll.a differ diff --git a/usr/lib/w32api/libfdeploy.a b/usr/lib/w32api/libfdeploy.a index 153475b20f4..067d78c9c06 100644 Binary files a/usr/lib/w32api/libfdeploy.a and b/usr/lib/w32api/libfdeploy.a differ diff --git a/usr/lib/w32api/libfeclient.a b/usr/lib/w32api/libfeclient.a index 9031feaa768..a13966bcbfd 100644 Binary files a/usr/lib/w32api/libfeclient.a and b/usr/lib/w32api/libfeclient.a differ diff --git a/usr/lib/w32api/libfilemgmt.a b/usr/lib/w32api/libfilemgmt.a index e6539a2e65f..9dd022ad21e 100644 Binary files a/usr/lib/w32api/libfilemgmt.a and b/usr/lib/w32api/libfilemgmt.a differ diff --git a/usr/lib/w32api/libfldrclnr.a b/usr/lib/w32api/libfldrclnr.a index b6e72f1f1d4..532d2ba6985 100644 Binary files a/usr/lib/w32api/libfldrclnr.a and b/usr/lib/w32api/libfldrclnr.a differ diff --git a/usr/lib/w32api/libfltlib.a b/usr/lib/w32api/libfltlib.a index 31c911f218a..2d53fd20f74 100644 Binary files a/usr/lib/w32api/libfltlib.a and b/usr/lib/w32api/libfltlib.a differ diff --git a/usr/lib/w32api/libfmifs.a b/usr/lib/w32api/libfmifs.a index 5f2ff2dea5e..8066724b983 100644 Binary files a/usr/lib/w32api/libfmifs.a and b/usr/lib/w32api/libfmifs.a differ diff --git a/usr/lib/w32api/libfontsub.a b/usr/lib/w32api/libfontsub.a index a005fb27162..22069a66a1d 100644 Binary files a/usr/lib/w32api/libfontsub.a and b/usr/lib/w32api/libfontsub.a differ diff --git a/usr/lib/w32api/libframedyn.a b/usr/lib/w32api/libframedyn.a index bbf0f9e565f..1fabd5b7286 100644 Binary files a/usr/lib/w32api/libframedyn.a and b/usr/lib/w32api/libframedyn.a differ diff --git a/usr/lib/w32api/libftpctrs2.a b/usr/lib/w32api/libftpctrs2.a index 45cfcf43824..6715c845aa4 100644 Binary files a/usr/lib/w32api/libftpctrs2.a and b/usr/lib/w32api/libftpctrs2.a differ diff --git a/usr/lib/w32api/libftpmib.a b/usr/lib/w32api/libftpmib.a index 74e62033d28..e1ea42d1dc8 100644 Binary files a/usr/lib/w32api/libftpmib.a and b/usr/lib/w32api/libftpmib.a differ diff --git a/usr/lib/w32api/libfwpuclnt.a b/usr/lib/w32api/libfwpuclnt.a index f2a84619152..d7de45d708e 100644 Binary files a/usr/lib/w32api/libfwpuclnt.a and b/usr/lib/w32api/libfwpuclnt.a differ diff --git a/usr/lib/w32api/libfxsapi.a b/usr/lib/w32api/libfxsapi.a index 05b71ccf427..e40059d8a24 100644 Binary files a/usr/lib/w32api/libfxsapi.a and b/usr/lib/w32api/libfxsapi.a differ diff --git a/usr/lib/w32api/libfxscfgwz.a b/usr/lib/w32api/libfxscfgwz.a index 6d11262f5eb..0e358294878 100644 Binary files a/usr/lib/w32api/libfxscfgwz.a and b/usr/lib/w32api/libfxscfgwz.a differ diff --git a/usr/lib/w32api/libfxsdrv.a b/usr/lib/w32api/libfxsdrv.a index 36ec2617498..95a73a11e01 100644 Binary files a/usr/lib/w32api/libfxsdrv.a and b/usr/lib/w32api/libfxsdrv.a differ diff --git a/usr/lib/w32api/libfxsocm.a b/usr/lib/w32api/libfxsocm.a index b3723fa41b4..9b16cee16c7 100644 Binary files a/usr/lib/w32api/libfxsocm.a and b/usr/lib/w32api/libfxsocm.a differ diff --git a/usr/lib/w32api/libfxsperf.a b/usr/lib/w32api/libfxsperf.a index 3d1c3edb77f..c1e0bacc859 100644 Binary files a/usr/lib/w32api/libfxsperf.a and b/usr/lib/w32api/libfxsperf.a differ diff --git a/usr/lib/w32api/libfxsroute.a b/usr/lib/w32api/libfxsroute.a index 313a8c6f0ac..3a900ab6cc2 100644 Binary files a/usr/lib/w32api/libfxsroute.a and b/usr/lib/w32api/libfxsroute.a differ diff --git a/usr/lib/w32api/libfxsst.a b/usr/lib/w32api/libfxsst.a index 2c3bbb09f56..91e645ce1dc 100644 Binary files a/usr/lib/w32api/libfxsst.a and b/usr/lib/w32api/libfxsst.a differ diff --git a/usr/lib/w32api/libfxst30.a b/usr/lib/w32api/libfxst30.a index be6877e71fb..8284ddd4601 100644 Binary files a/usr/lib/w32api/libfxst30.a and b/usr/lib/w32api/libfxst30.a differ diff --git a/usr/lib/w32api/libfxstiff.a b/usr/lib/w32api/libfxstiff.a index b87e16b9af2..fe24e93de14 100644 Binary files a/usr/lib/w32api/libfxstiff.a and b/usr/lib/w32api/libfxstiff.a differ diff --git a/usr/lib/w32api/libfxsui.a b/usr/lib/w32api/libfxsui.a index 2e853f8ed0c..d8d4b3d13f0 100644 Binary files a/usr/lib/w32api/libfxsui.a and b/usr/lib/w32api/libfxsui.a differ diff --git a/usr/lib/w32api/libfxswzrd.a b/usr/lib/w32api/libfxswzrd.a index 0e678f53ac5..bf975f4bcb1 100644 Binary files a/usr/lib/w32api/libfxswzrd.a and b/usr/lib/w32api/libfxswzrd.a differ diff --git a/usr/lib/w32api/libgdi32.a b/usr/lib/w32api/libgdi32.a index cb4696cf503..6a3b57928ab 100644 Binary files a/usr/lib/w32api/libgdi32.a and b/usr/lib/w32api/libgdi32.a differ diff --git a/usr/lib/w32api/libgdiplus.a b/usr/lib/w32api/libgdiplus.a index f407e6e0ffa..ff4dbd03539 100644 Binary files a/usr/lib/w32api/libgdiplus.a and b/usr/lib/w32api/libgdiplus.a differ diff --git a/usr/lib/w32api/libgetuname.a b/usr/lib/w32api/libgetuname.a index 66725800cb0..1393dfba9c1 100644 Binary files a/usr/lib/w32api/libgetuname.a and b/usr/lib/w32api/libgetuname.a differ diff --git a/usr/lib/w32api/libglmf32.a b/usr/lib/w32api/libglmf32.a index 305e844ee90..901c05c933e 100644 Binary files a/usr/lib/w32api/libglmf32.a and b/usr/lib/w32api/libglmf32.a differ diff --git a/usr/lib/w32api/libglu32.a b/usr/lib/w32api/libglu32.a index d4bf3335e5a..b42d7277565 100644 Binary files a/usr/lib/w32api/libglu32.a and b/usr/lib/w32api/libglu32.a differ diff --git a/usr/lib/w32api/libgpedit.a b/usr/lib/w32api/libgpedit.a index bdc6eee8cdd..eab12338bb3 100644 Binary files a/usr/lib/w32api/libgpedit.a and b/usr/lib/w32api/libgpedit.a differ diff --git a/usr/lib/w32api/libgpkcsp.a b/usr/lib/w32api/libgpkcsp.a index 8df39a8469b..acaaaaf95f1 100644 Binary files a/usr/lib/w32api/libgpkcsp.a and b/usr/lib/w32api/libgpkcsp.a differ diff --git a/usr/lib/w32api/libgptext.a b/usr/lib/w32api/libgptext.a index 01573136478..eb13666ba7d 100644 Binary files a/usr/lib/w32api/libgptext.a and b/usr/lib/w32api/libgptext.a differ diff --git a/usr/lib/w32api/libguitrn.a b/usr/lib/w32api/libguitrn.a index 03bc00ff32b..18d585c1f7b 100644 Binary files a/usr/lib/w32api/libguitrn.a and b/usr/lib/w32api/libguitrn.a differ diff --git a/usr/lib/w32api/libhal.a b/usr/lib/w32api/libhal.a index 619acd95202..48349e29f0b 100644 Binary files a/usr/lib/w32api/libhal.a and b/usr/lib/w32api/libhal.a differ diff --git a/usr/lib/w32api/libhbaapi.a b/usr/lib/w32api/libhbaapi.a index 818928b593c..7f86e3cb477 100644 Binary files a/usr/lib/w32api/libhbaapi.a and b/usr/lib/w32api/libhbaapi.a differ diff --git a/usr/lib/w32api/libhgfs.a b/usr/lib/w32api/libhgfs.a index d936b23dcea..575b8b7253a 100644 Binary files a/usr/lib/w32api/libhgfs.a and b/usr/lib/w32api/libhgfs.a differ diff --git a/usr/lib/w32api/libhid.a b/usr/lib/w32api/libhid.a index bcec75eb0c5..ae24a95a9d9 100644 Binary files a/usr/lib/w32api/libhid.a and b/usr/lib/w32api/libhid.a differ diff --git a/usr/lib/w32api/libhidclass.a b/usr/lib/w32api/libhidclass.a index a2888c35f15..7ecdb9022ec 100644 Binary files a/usr/lib/w32api/libhidclass.a and b/usr/lib/w32api/libhidclass.a differ diff --git a/usr/lib/w32api/libhidparse.a b/usr/lib/w32api/libhidparse.a index b8e39b4c519..3e799bf3355 100644 Binary files a/usr/lib/w32api/libhidparse.a and b/usr/lib/w32api/libhidparse.a differ diff --git a/usr/lib/w32api/libhlink.a b/usr/lib/w32api/libhlink.a index 7910fee97be..5bf9418150c 100644 Binary files a/usr/lib/w32api/libhlink.a and b/usr/lib/w32api/libhlink.a differ diff --git a/usr/lib/w32api/libhmmapi.a b/usr/lib/w32api/libhmmapi.a index 037a51a9518..ac4ffa7c895 100644 Binary files a/usr/lib/w32api/libhmmapi.a and b/usr/lib/w32api/libhmmapi.a differ diff --git a/usr/lib/w32api/libhnetcfg.a b/usr/lib/w32api/libhnetcfg.a index 4b4855fb70a..f3168b7cb8b 100644 Binary files a/usr/lib/w32api/libhnetcfg.a and b/usr/lib/w32api/libhnetcfg.a differ diff --git a/usr/lib/w32api/libhnetwiz.a b/usr/lib/w32api/libhnetwiz.a index 0bd12b8a0ad..b78c544cbb9 100644 Binary files a/usr/lib/w32api/libhnetwiz.a and b/usr/lib/w32api/libhnetwiz.a differ diff --git a/usr/lib/w32api/libhostmib.a b/usr/lib/w32api/libhostmib.a index 2cd12372359..7d8da56c114 100644 Binary files a/usr/lib/w32api/libhostmib.a and b/usr/lib/w32api/libhostmib.a differ diff --git a/usr/lib/w32api/libhotplug.a b/usr/lib/w32api/libhotplug.a index 16b4c5e1fa3..2b73215710e 100644 Binary files a/usr/lib/w32api/libhotplug.a and b/usr/lib/w32api/libhotplug.a differ diff --git a/usr/lib/w32api/libhrtfapo.a b/usr/lib/w32api/libhrtfapo.a index a785450af1a..c83f3d0f5b0 100644 Binary files a/usr/lib/w32api/libhrtfapo.a and b/usr/lib/w32api/libhrtfapo.a differ diff --git a/usr/lib/w32api/libhtmlhelp.a b/usr/lib/w32api/libhtmlhelp.a index ec3e9136982..44069957a62 100644 Binary files a/usr/lib/w32api/libhtmlhelp.a and b/usr/lib/w32api/libhtmlhelp.a differ diff --git a/usr/lib/w32api/libhtrn_jis.a b/usr/lib/w32api/libhtrn_jis.a index cc55c025cfb..3a5033a36a3 100644 Binary files a/usr/lib/w32api/libhtrn_jis.a and b/usr/lib/w32api/libhtrn_jis.a differ diff --git a/usr/lib/w32api/libhttpapi.a b/usr/lib/w32api/libhttpapi.a index 5a3f776a1d0..1d5e6c9c88c 100644 Binary files a/usr/lib/w32api/libhttpapi.a and b/usr/lib/w32api/libhttpapi.a differ diff --git a/usr/lib/w32api/libhttpext.a b/usr/lib/w32api/libhttpext.a index 2bfac43660d..51ca8bc27fe 100644 Binary files a/usr/lib/w32api/libhttpext.a and b/usr/lib/w32api/libhttpext.a differ diff --git a/usr/lib/w32api/libhttpmib.a b/usr/lib/w32api/libhttpmib.a index 02a6d8750c7..a59243d0544 100644 Binary files a/usr/lib/w32api/libhttpmib.a and b/usr/lib/w32api/libhttpmib.a differ diff --git a/usr/lib/w32api/libhttpodbc.a b/usr/lib/w32api/libhttpodbc.a index 9906bd1ce48..b21b3103485 100644 Binary files a/usr/lib/w32api/libhttpodbc.a and b/usr/lib/w32api/libhttpodbc.a differ diff --git a/usr/lib/w32api/libhtui.a b/usr/lib/w32api/libhtui.a index 6b460bede42..1e751036890 100644 Binary files a/usr/lib/w32api/libhtui.a and b/usr/lib/w32api/libhtui.a differ diff --git a/usr/lib/w32api/libhypertrm.a b/usr/lib/w32api/libhypertrm.a index b6e26472ac5..9d3b8264e37 100644 Binary files a/usr/lib/w32api/libhypertrm.a and b/usr/lib/w32api/libhypertrm.a differ diff --git a/usr/lib/w32api/libiashlpr.a b/usr/lib/w32api/libiashlpr.a index b521d1dd7b7..0794604d885 100644 Binary files a/usr/lib/w32api/libiashlpr.a and b/usr/lib/w32api/libiashlpr.a differ diff --git a/usr/lib/w32api/libiaspolcy.a b/usr/lib/w32api/libiaspolcy.a index 1b34fca24e4..083ed86dc66 100644 Binary files a/usr/lib/w32api/libiaspolcy.a and b/usr/lib/w32api/libiaspolcy.a differ diff --git a/usr/lib/w32api/libiassam.a b/usr/lib/w32api/libiassam.a index 067cf48cd31..67e666e4067 100644 Binary files a/usr/lib/w32api/libiassam.a and b/usr/lib/w32api/libiassam.a differ diff --git a/usr/lib/w32api/libiassvcs.a b/usr/lib/w32api/libiassvcs.a index dc9d37bb560..9ff1f5311c6 100644 Binary files a/usr/lib/w32api/libiassvcs.a and b/usr/lib/w32api/libiassvcs.a differ diff --git a/usr/lib/w32api/libicaapi.a b/usr/lib/w32api/libicaapi.a index eb32edba747..64d420562be 100644 Binary files a/usr/lib/w32api/libicaapi.a and b/usr/lib/w32api/libicaapi.a differ diff --git a/usr/lib/w32api/libicfgnt5.a b/usr/lib/w32api/libicfgnt5.a index ee97602b9be..ccbf90e8fb9 100644 Binary files a/usr/lib/w32api/libicfgnt5.a and b/usr/lib/w32api/libicfgnt5.a differ diff --git a/usr/lib/w32api/libicm32.a b/usr/lib/w32api/libicm32.a index 6bad0678562..05bc8aa6744 100644 Binary files a/usr/lib/w32api/libicm32.a and b/usr/lib/w32api/libicm32.a differ diff --git a/usr/lib/w32api/libicmp.a b/usr/lib/w32api/libicmp.a index e1d01a33467..f9a8b23cf3d 100644 Binary files a/usr/lib/w32api/libicmp.a and b/usr/lib/w32api/libicmp.a differ diff --git a/usr/lib/w32api/libicmui.a b/usr/lib/w32api/libicmui.a index d9d06c934d6..8305c32167e 100644 Binary files a/usr/lib/w32api/libicmui.a and b/usr/lib/w32api/libicmui.a differ diff --git a/usr/lib/w32api/libicu.a b/usr/lib/w32api/libicu.a index 0e3d6eaa50d..99b8c69105c 100644 Binary files a/usr/lib/w32api/libicu.a and b/usr/lib/w32api/libicu.a differ diff --git a/usr/lib/w32api/libicwconn.a b/usr/lib/w32api/libicwconn.a index a851f0d0a0a..b9b45395e83 100644 Binary files a/usr/lib/w32api/libicwconn.a and b/usr/lib/w32api/libicwconn.a differ diff --git a/usr/lib/w32api/libicwdial.a b/usr/lib/w32api/libicwdial.a index 4fcca9731ce..4913d3a6438 100644 Binary files a/usr/lib/w32api/libicwdial.a and b/usr/lib/w32api/libicwdial.a differ diff --git a/usr/lib/w32api/libicwdl.a b/usr/lib/w32api/libicwdl.a index d76a8f71c2b..86a5cf73c02 100644 Binary files a/usr/lib/w32api/libicwdl.a and b/usr/lib/w32api/libicwdl.a differ diff --git a/usr/lib/w32api/libicwphbk.a b/usr/lib/w32api/libicwphbk.a index 435fe705bb4..405c2ca7d3d 100644 Binary files a/usr/lib/w32api/libicwphbk.a and b/usr/lib/w32api/libicwphbk.a differ diff --git a/usr/lib/w32api/libicwutil.a b/usr/lib/w32api/libicwutil.a index 08db6063413..8230872707c 100644 Binary files a/usr/lib/w32api/libicwutil.a and b/usr/lib/w32api/libicwutil.a differ diff --git a/usr/lib/w32api/libidq.a b/usr/lib/w32api/libidq.a index 2170a2391b5..19ed661b08f 100644 Binary files a/usr/lib/w32api/libidq.a and b/usr/lib/w32api/libidq.a differ diff --git a/usr/lib/w32api/libieakeng.a b/usr/lib/w32api/libieakeng.a index 025b9d6f9b0..0ace6eac707 100644 Binary files a/usr/lib/w32api/libieakeng.a and b/usr/lib/w32api/libieakeng.a differ diff --git a/usr/lib/w32api/libiedkcs32.a b/usr/lib/w32api/libiedkcs32.a index a36000936ec..b4f520ef6b9 100644 Binary files a/usr/lib/w32api/libiedkcs32.a and b/usr/lib/w32api/libiedkcs32.a differ diff --git a/usr/lib/w32api/libieencode.a b/usr/lib/w32api/libieencode.a index f8c6ca58ef1..d37761e12e0 100644 Binary files a/usr/lib/w32api/libieencode.a and b/usr/lib/w32api/libieencode.a differ diff --git a/usr/lib/w32api/libiernonce.a b/usr/lib/w32api/libiernonce.a index 188f354b61d..dec2a09dd80 100644 Binary files a/usr/lib/w32api/libiernonce.a and b/usr/lib/w32api/libiernonce.a differ diff --git a/usr/lib/w32api/libiesetup.a b/usr/lib/w32api/libiesetup.a index 66941ec0897..6c21068c3f1 100644 Binary files a/usr/lib/w32api/libiesetup.a and b/usr/lib/w32api/libiesetup.a differ diff --git a/usr/lib/w32api/libigmpagnt.a b/usr/lib/w32api/libigmpagnt.a index e5a442c7022..7bc734934c7 100644 Binary files a/usr/lib/w32api/libigmpagnt.a and b/usr/lib/w32api/libigmpagnt.a differ diff --git a/usr/lib/w32api/libiis.a b/usr/lib/w32api/libiis.a index 07dafddd1fc..7d59340189a 100644 Binary files a/usr/lib/w32api/libiis.a and b/usr/lib/w32api/libiis.a differ diff --git a/usr/lib/w32api/libiisadmin.a b/usr/lib/w32api/libiisadmin.a index fbd21fff59b..04a1e98268f 100644 Binary files a/usr/lib/w32api/libiisadmin.a and b/usr/lib/w32api/libiisadmin.a differ diff --git a/usr/lib/w32api/libiiscfg.a b/usr/lib/w32api/libiiscfg.a index ff9f89ea915..052ce42284a 100644 Binary files a/usr/lib/w32api/libiiscfg.a and b/usr/lib/w32api/libiiscfg.a differ diff --git a/usr/lib/w32api/libiisrtl.a b/usr/lib/w32api/libiisrtl.a index 77671695f0e..3b87e3f4643 100644 Binary files a/usr/lib/w32api/libiisrtl.a and b/usr/lib/w32api/libiisrtl.a differ diff --git a/usr/lib/w32api/libiissuba.a b/usr/lib/w32api/libiissuba.a index 66039bbf8fc..0a7128349e1 100644 Binary files a/usr/lib/w32api/libiissuba.a and b/usr/lib/w32api/libiissuba.a differ diff --git a/usr/lib/w32api/libiisui.a b/usr/lib/w32api/libiisui.a index 0879aadbcb2..b9aca52448b 100644 Binary files a/usr/lib/w32api/libiisui.a and b/usr/lib/w32api/libiisui.a differ diff --git a/usr/lib/w32api/libiisutil.a b/usr/lib/w32api/libiisutil.a index 6c9a87de719..7375e27a933 100644 Binary files a/usr/lib/w32api/libiisutil.a and b/usr/lib/w32api/libiisutil.a differ diff --git a/usr/lib/w32api/libiiswmi.a b/usr/lib/w32api/libiiswmi.a index 449177ff975..92cb3582b3a 100644 Binary files a/usr/lib/w32api/libiiswmi.a and b/usr/lib/w32api/libiiswmi.a differ diff --git a/usr/lib/w32api/libimagehlp.a b/usr/lib/w32api/libimagehlp.a index a8b5d2b2bb5..1e0ba694778 100644 Binary files a/usr/lib/w32api/libimagehlp.a and b/usr/lib/w32api/libimagehlp.a differ diff --git a/usr/lib/w32api/libimeshare.a b/usr/lib/w32api/libimeshare.a index 0fd25e0261a..4ffc33252d9 100644 Binary files a/usr/lib/w32api/libimeshare.a and b/usr/lib/w32api/libimeshare.a differ diff --git a/usr/lib/w32api/libimgutil.a b/usr/lib/w32api/libimgutil.a index fc813ebec85..886cbd96376 100644 Binary files a/usr/lib/w32api/libimgutil.a and b/usr/lib/w32api/libimgutil.a differ diff --git a/usr/lib/w32api/libimjp81k.a b/usr/lib/w32api/libimjp81k.a index c64adef3010..334afe4e917 100644 Binary files a/usr/lib/w32api/libimjp81k.a and b/usr/lib/w32api/libimjp81k.a differ diff --git a/usr/lib/w32api/libimjpcus.a b/usr/lib/w32api/libimjpcus.a index 9f359a0383b..ad5fcffa1ba 100644 Binary files a/usr/lib/w32api/libimjpcus.a and b/usr/lib/w32api/libimjpcus.a differ diff --git a/usr/lib/w32api/libimjpdct.a b/usr/lib/w32api/libimjpdct.a index d299dd02ec9..35b13a47902 100644 Binary files a/usr/lib/w32api/libimjpdct.a and b/usr/lib/w32api/libimjpdct.a differ diff --git a/usr/lib/w32api/libimjputyc.a b/usr/lib/w32api/libimjputyc.a index 54fe94e8e06..184a79b9d3b 100644 Binary files a/usr/lib/w32api/libimjputyc.a and b/usr/lib/w32api/libimjputyc.a differ diff --git a/usr/lib/w32api/libimm32.a b/usr/lib/w32api/libimm32.a index ce3976587f0..2f564c9a69b 100644 Binary files a/usr/lib/w32api/libimm32.a and b/usr/lib/w32api/libimm32.a differ diff --git a/usr/lib/w32api/libimsinsnt.a b/usr/lib/w32api/libimsinsnt.a index 665a24e9528..7f2e38ef1c4 100644 Binary files a/usr/lib/w32api/libimsinsnt.a and b/usr/lib/w32api/libimsinsnt.a differ diff --git a/usr/lib/w32api/libimskdic.a b/usr/lib/w32api/libimskdic.a index 410d5fefb1a..a8b8cd868aa 100644 Binary files a/usr/lib/w32api/libimskdic.a and b/usr/lib/w32api/libimskdic.a differ diff --git a/usr/lib/w32api/libinetcfg.a b/usr/lib/w32api/libinetcfg.a index b2f2d26ad8f..eb2fa7fbc6e 100644 Binary files a/usr/lib/w32api/libinetcfg.a and b/usr/lib/w32api/libinetcfg.a differ diff --git a/usr/lib/w32api/libinetcomm.a b/usr/lib/w32api/libinetcomm.a index 3f9bf243ad0..6e709a156e8 100644 Binary files a/usr/lib/w32api/libinetcomm.a and b/usr/lib/w32api/libinetcomm.a differ diff --git a/usr/lib/w32api/libinetmib1.a b/usr/lib/w32api/libinetmib1.a index 386944cd4ac..c6672dc8091 100644 Binary files a/usr/lib/w32api/libinetmib1.a and b/usr/lib/w32api/libinetmib1.a differ diff --git a/usr/lib/w32api/libinfoadmn.a b/usr/lib/w32api/libinfoadmn.a index 073c9886c0d..71d3cf88899 100644 Binary files a/usr/lib/w32api/libinfoadmn.a and b/usr/lib/w32api/libinfoadmn.a differ diff --git a/usr/lib/w32api/libinfocomm.a b/usr/lib/w32api/libinfocomm.a index fcac54c26f6..2f7bb8e18ac 100644 Binary files a/usr/lib/w32api/libinfocomm.a and b/usr/lib/w32api/libinfocomm.a differ diff --git a/usr/lib/w32api/libinfoctrs.a b/usr/lib/w32api/libinfoctrs.a index b4b445c1fcf..e10c35c0b81 100644 Binary files a/usr/lib/w32api/libinfoctrs.a and b/usr/lib/w32api/libinfoctrs.a differ diff --git a/usr/lib/w32api/libinfosoft.a b/usr/lib/w32api/libinfosoft.a index 1545cea5554..f69439653cf 100644 Binary files a/usr/lib/w32api/libinfosoft.a and b/usr/lib/w32api/libinfosoft.a differ diff --git a/usr/lib/w32api/libinitpki.a b/usr/lib/w32api/libinitpki.a index 0f0e18e29ef..0a1c6a5a49d 100644 Binary files a/usr/lib/w32api/libinitpki.a and b/usr/lib/w32api/libinitpki.a differ diff --git a/usr/lib/w32api/libinkobjcore.a b/usr/lib/w32api/libinkobjcore.a index a85a1b6273e..b8b8363b7d4 100644 Binary files a/usr/lib/w32api/libinkobjcore.a and b/usr/lib/w32api/libinkobjcore.a differ diff --git a/usr/lib/w32api/libinput.a b/usr/lib/w32api/libinput.a index 00fdb23f12a..9cd7ed6bd4f 100644 Binary files a/usr/lib/w32api/libinput.a and b/usr/lib/w32api/libinput.a differ diff --git a/usr/lib/w32api/libinseng.a b/usr/lib/w32api/libinseng.a index 5ce7c577f3b..dd3dbbe0fa5 100644 Binary files a/usr/lib/w32api/libinseng.a and b/usr/lib/w32api/libinseng.a differ diff --git a/usr/lib/w32api/libiphlpapi.a b/usr/lib/w32api/libiphlpapi.a index f0d61f41588..1b3a7577dc4 100644 Binary files a/usr/lib/w32api/libiphlpapi.a and b/usr/lib/w32api/libiphlpapi.a differ diff --git a/usr/lib/w32api/libipmontr.a b/usr/lib/w32api/libipmontr.a index 17dc96fec75..29dd501c331 100644 Binary files a/usr/lib/w32api/libipmontr.a and b/usr/lib/w32api/libipmontr.a differ diff --git a/usr/lib/w32api/libipnathlp.a b/usr/lib/w32api/libipnathlp.a index 7f57abc624f..c77b6f5ab0b 100644 Binary files a/usr/lib/w32api/libipnathlp.a and b/usr/lib/w32api/libipnathlp.a differ diff --git a/usr/lib/w32api/libiprop.a b/usr/lib/w32api/libiprop.a index 264f4ddc4b6..47b5cd10681 100644 Binary files a/usr/lib/w32api/libiprop.a and b/usr/lib/w32api/libiprop.a differ diff --git a/usr/lib/w32api/libiprtprio.a b/usr/lib/w32api/libiprtprio.a index b8a75db870e..3e55f575eb5 100644 Binary files a/usr/lib/w32api/libiprtprio.a and b/usr/lib/w32api/libiprtprio.a differ diff --git a/usr/lib/w32api/libiprtrmgr.a b/usr/lib/w32api/libiprtrmgr.a index c4c94be300a..92eea2ae15e 100644 Binary files a/usr/lib/w32api/libiprtrmgr.a and b/usr/lib/w32api/libiprtrmgr.a differ diff --git a/usr/lib/w32api/libipsecsvc.a b/usr/lib/w32api/libipsecsvc.a index de0c8ba0e8c..ad076b34b98 100644 Binary files a/usr/lib/w32api/libipsecsvc.a and b/usr/lib/w32api/libipsecsvc.a differ diff --git a/usr/lib/w32api/libipxsap.a b/usr/lib/w32api/libipxsap.a index ddba2f80727..6cf32eab835 100644 Binary files a/usr/lib/w32api/libipxsap.a and b/usr/lib/w32api/libipxsap.a differ diff --git a/usr/lib/w32api/libirclass.a b/usr/lib/w32api/libirclass.a index 0ad26e69c88..727517151ba 100644 Binary files a/usr/lib/w32api/libirclass.a and b/usr/lib/w32api/libirclass.a differ diff --git a/usr/lib/w32api/libisatq.a b/usr/lib/w32api/libisatq.a index 20c08abf23f..ccf20bf74f9 100644 Binary files a/usr/lib/w32api/libisatq.a and b/usr/lib/w32api/libisatq.a differ diff --git a/usr/lib/w32api/libiscomlog.a b/usr/lib/w32api/libiscomlog.a index 9cac853573c..32e9464fcef 100644 Binary files a/usr/lib/w32api/libiscomlog.a and b/usr/lib/w32api/libiscomlog.a differ diff --git a/usr/lib/w32api/libiscsidsc.a b/usr/lib/w32api/libiscsidsc.a index 824180ea614..667394c3852 100644 Binary files a/usr/lib/w32api/libiscsidsc.a and b/usr/lib/w32api/libiscsidsc.a differ diff --git a/usr/lib/w32api/libisign32.a b/usr/lib/w32api/libisign32.a index 59ccd5f291b..07773c5a714 100644 Binary files a/usr/lib/w32api/libisign32.a and b/usr/lib/w32api/libisign32.a differ diff --git a/usr/lib/w32api/libiyuv_32.a b/usr/lib/w32api/libiyuv_32.a index 0e9beff3952..302e8ea947f 100644 Binary files a/usr/lib/w32api/libiyuv_32.a and b/usr/lib/w32api/libiyuv_32.a differ diff --git a/usr/lib/w32api/libjet500.a b/usr/lib/w32api/libjet500.a index 425d08d3ffc..f5d613057ac 100644 Binary files a/usr/lib/w32api/libjet500.a and b/usr/lib/w32api/libjet500.a differ diff --git a/usr/lib/w32api/libjsproxy.a b/usr/lib/w32api/libjsproxy.a index 36abe056918..7fb63ca5382 100644 Binary files a/usr/lib/w32api/libjsproxy.a and b/usr/lib/w32api/libjsproxy.a differ diff --git a/usr/lib/w32api/libkd1394.a b/usr/lib/w32api/libkd1394.a index e0883626b77..eadce768a0a 100644 Binary files a/usr/lib/w32api/libkd1394.a and b/usr/lib/w32api/libkd1394.a differ diff --git a/usr/lib/w32api/libkdcom.a b/usr/lib/w32api/libkdcom.a index 06ef22c8223..e5d9d140655 100644 Binary files a/usr/lib/w32api/libkdcom.a and b/usr/lib/w32api/libkdcom.a differ diff --git a/usr/lib/w32api/libkerberos.a b/usr/lib/w32api/libkerberos.a index 248a8438d64..56b84d8848e 100644 Binary files a/usr/lib/w32api/libkerberos.a and b/usr/lib/w32api/libkerberos.a differ diff --git a/usr/lib/w32api/libkernel32.a b/usr/lib/w32api/libkernel32.a index dedaa73aa5e..41297245267 100644 Binary files a/usr/lib/w32api/libkernel32.a and b/usr/lib/w32api/libkernel32.a differ diff --git a/usr/lib/w32api/libkeymgr.a b/usr/lib/w32api/libkeymgr.a index ff2842cd72e..1839f22ed6b 100644 Binary files a/usr/lib/w32api/libkeymgr.a and b/usr/lib/w32api/libkeymgr.a differ diff --git a/usr/lib/w32api/libks.a b/usr/lib/w32api/libks.a index 97995ff27da..5cf9569ad7f 100644 Binary files a/usr/lib/w32api/libks.a and b/usr/lib/w32api/libks.a differ diff --git a/usr/lib/w32api/libksecdd.a b/usr/lib/w32api/libksecdd.a index 88225d0bfd1..115b3bba9de 100644 Binary files a/usr/lib/w32api/libksecdd.a and b/usr/lib/w32api/libksecdd.a differ diff --git a/usr/lib/w32api/libksguid.a b/usr/lib/w32api/libksguid.a index c15401d6f8a..779b6033a02 100644 Binary files a/usr/lib/w32api/libksguid.a and b/usr/lib/w32api/libksguid.a differ diff --git a/usr/lib/w32api/libksuser.a b/usr/lib/w32api/libksuser.a index 6b23a298e8f..527de3ac1b3 100644 Binary files a/usr/lib/w32api/libksuser.a and b/usr/lib/w32api/libksuser.a differ diff --git a/usr/lib/w32api/libktmw32.a b/usr/lib/w32api/libktmw32.a index 3fb1f360814..ab4114e60d6 100644 Binary files a/usr/lib/w32api/libktmw32.a and b/usr/lib/w32api/libktmw32.a differ diff --git a/usr/lib/w32api/liblinkinfo.a b/usr/lib/w32api/liblinkinfo.a index 52e2fca1e85..bcb56da3339 100644 Binary files a/usr/lib/w32api/liblinkinfo.a and b/usr/lib/w32api/liblinkinfo.a differ diff --git a/usr/lib/w32api/liblmmib2.a b/usr/lib/w32api/liblmmib2.a index 9aa8ff0d84a..05b72a2e8f3 100644 Binary files a/usr/lib/w32api/liblmmib2.a and b/usr/lib/w32api/liblmmib2.a differ diff --git a/usr/lib/w32api/libloadperf.a b/usr/lib/w32api/libloadperf.a index fb88db99e02..55f6db066bc 100644 Binary files a/usr/lib/w32api/libloadperf.a and b/usr/lib/w32api/libloadperf.a differ diff --git a/usr/lib/w32api/liblocalspl.a b/usr/lib/w32api/liblocalspl.a index c5e374d7ffb..637eb459b5c 100644 Binary files a/usr/lib/w32api/liblocalspl.a and b/usr/lib/w32api/liblocalspl.a differ diff --git a/usr/lib/w32api/liblocationapi.a b/usr/lib/w32api/liblocationapi.a index 0cc4a3f0a30..c28f62790be 100644 Binary files a/usr/lib/w32api/liblocationapi.a and b/usr/lib/w32api/liblocationapi.a differ diff --git a/usr/lib/w32api/liblog.a b/usr/lib/w32api/liblog.a index 3e53ad41043..5e12744fba0 100644 Binary files a/usr/lib/w32api/liblog.a and b/usr/lib/w32api/liblog.a differ diff --git a/usr/lib/w32api/libloghours.a b/usr/lib/w32api/libloghours.a index fda1951db39..da1af9de5db 100644 Binary files a/usr/lib/w32api/libloghours.a and b/usr/lib/w32api/libloghours.a differ diff --git a/usr/lib/w32api/liblonsint.a b/usr/lib/w32api/liblonsint.a index c3a0c72cfc9..4d062d38910 100644 Binary files a/usr/lib/w32api/liblonsint.a and b/usr/lib/w32api/liblonsint.a differ diff --git a/usr/lib/w32api/liblpk.a b/usr/lib/w32api/liblpk.a index c80a70f1beb..8184078d722 100644 Binary files a/usr/lib/w32api/liblpk.a and b/usr/lib/w32api/liblpk.a differ diff --git a/usr/lib/w32api/liblprhelp.a b/usr/lib/w32api/liblprhelp.a index 31d2b422f1c..27ec967744e 100644 Binary files a/usr/lib/w32api/liblprhelp.a and b/usr/lib/w32api/liblprhelp.a differ diff --git a/usr/lib/w32api/liblsasrv.a b/usr/lib/w32api/liblsasrv.a index 8d3cdd022cf..a3d8fb786c0 100644 Binary files a/usr/lib/w32api/liblsasrv.a and b/usr/lib/w32api/liblsasrv.a differ diff --git a/usr/lib/w32api/liblz32.a b/usr/lib/w32api/liblz32.a index 928938597bb..7efbcaed441 100644 Binary files a/usr/lib/w32api/liblz32.a and b/usr/lib/w32api/liblz32.a differ diff --git a/usr/lib/w32api/libmag_hook.a b/usr/lib/w32api/libmag_hook.a index e26958c593a..c184bfcc064 100644 Binary files a/usr/lib/w32api/libmag_hook.a and b/usr/lib/w32api/libmag_hook.a differ diff --git a/usr/lib/w32api/libmapi32.a b/usr/lib/w32api/libmapi32.a index e10c4cc8bd4..888251b2b4a 100644 Binary files a/usr/lib/w32api/libmapi32.a and b/usr/lib/w32api/libmapi32.a differ diff --git a/usr/lib/w32api/libmapistub.a b/usr/lib/w32api/libmapistub.a index 931fe9354da..0169d7d4703 100644 Binary files a/usr/lib/w32api/libmapistub.a and b/usr/lib/w32api/libmapistub.a differ diff --git a/usr/lib/w32api/libmcastmib.a b/usr/lib/w32api/libmcastmib.a index 1b10f8e8880..c4c473bac4d 100644 Binary files a/usr/lib/w32api/libmcastmib.a and b/usr/lib/w32api/libmcastmib.a differ diff --git a/usr/lib/w32api/libmcd32.a b/usr/lib/w32api/libmcd32.a index 2319b90bf80..5931f08bdaf 100644 Binary files a/usr/lib/w32api/libmcd32.a and b/usr/lib/w32api/libmcd32.a differ diff --git a/usr/lib/w32api/libmcdsrv32.a b/usr/lib/w32api/libmcdsrv32.a index fe9a9c70981..536223dd0bd 100644 Binary files a/usr/lib/w32api/libmcdsrv32.a and b/usr/lib/w32api/libmcdsrv32.a differ diff --git a/usr/lib/w32api/libmchgrcoi.a b/usr/lib/w32api/libmchgrcoi.a index c3a2e25ad42..ab9e06c8a49 100644 Binary files a/usr/lib/w32api/libmchgrcoi.a and b/usr/lib/w32api/libmchgrcoi.a differ diff --git a/usr/lib/w32api/libmciavi32.a b/usr/lib/w32api/libmciavi32.a index f6bf03fe779..89da926e6a2 100644 Binary files a/usr/lib/w32api/libmciavi32.a and b/usr/lib/w32api/libmciavi32.a differ diff --git a/usr/lib/w32api/libmcicda.a b/usr/lib/w32api/libmcicda.a index 16655f158ad..04cffe61bab 100644 Binary files a/usr/lib/w32api/libmcicda.a and b/usr/lib/w32api/libmcicda.a differ diff --git a/usr/lib/w32api/libmciole32.a b/usr/lib/w32api/libmciole32.a index fb0745af967..4fdcd638274 100644 Binary files a/usr/lib/w32api/libmciole32.a and b/usr/lib/w32api/libmciole32.a differ diff --git a/usr/lib/w32api/libmciqtz32.a b/usr/lib/w32api/libmciqtz32.a index d8bc50b88e8..42c369ad665 100644 Binary files a/usr/lib/w32api/libmciqtz32.a and b/usr/lib/w32api/libmciqtz32.a differ diff --git a/usr/lib/w32api/libmciseq.a b/usr/lib/w32api/libmciseq.a index e381e7d9313..924cb7e9f1d 100644 Binary files a/usr/lib/w32api/libmciseq.a and b/usr/lib/w32api/libmciseq.a differ diff --git a/usr/lib/w32api/libmciwave.a b/usr/lib/w32api/libmciwave.a index 613e11a3d30..a3b15a9eb9c 100644 Binary files a/usr/lib/w32api/libmciwave.a and b/usr/lib/w32api/libmciwave.a differ diff --git a/usr/lib/w32api/libmdminst.a b/usr/lib/w32api/libmdminst.a index a5317244f59..53ba8868c38 100644 Binary files a/usr/lib/w32api/libmdminst.a and b/usr/lib/w32api/libmdminst.a differ diff --git a/usr/lib/w32api/libmf.a b/usr/lib/w32api/libmf.a index fd09a9fb1ed..705dc2d8cd5 100644 Binary files a/usr/lib/w32api/libmf.a and b/usr/lib/w32api/libmf.a differ diff --git a/usr/lib/w32api/libmf3216.a b/usr/lib/w32api/libmf3216.a index 8565dca6ce6..6bac33235c4 100644 Binary files a/usr/lib/w32api/libmf3216.a and b/usr/lib/w32api/libmf3216.a differ diff --git a/usr/lib/w32api/libmfc42.a b/usr/lib/w32api/libmfc42.a index 35646d34dbf..1c3bac4168b 100644 Binary files a/usr/lib/w32api/libmfc42.a and b/usr/lib/w32api/libmfc42.a differ diff --git a/usr/lib/w32api/libmfc42u.a b/usr/lib/w32api/libmfc42u.a index dec08144527..66ef4e16606 100644 Binary files a/usr/lib/w32api/libmfc42u.a and b/usr/lib/w32api/libmfc42u.a differ diff --git a/usr/lib/w32api/libmfcore.a b/usr/lib/w32api/libmfcore.a index 9e039ff5907..bef5570925b 100644 Binary files a/usr/lib/w32api/libmfcore.a and b/usr/lib/w32api/libmfcore.a differ diff --git a/usr/lib/w32api/libmfplat.a b/usr/lib/w32api/libmfplat.a index 19ba7452f49..892b897d121 100644 Binary files a/usr/lib/w32api/libmfplat.a and b/usr/lib/w32api/libmfplat.a differ diff --git a/usr/lib/w32api/libmfplay.a b/usr/lib/w32api/libmfplay.a index 23683f0c99c..a35178fd983 100644 Binary files a/usr/lib/w32api/libmfplay.a and b/usr/lib/w32api/libmfplay.a differ diff --git a/usr/lib/w32api/libmfreadwrite.a b/usr/lib/w32api/libmfreadwrite.a index af9949d3d49..2df2a1c69f5 100644 Binary files a/usr/lib/w32api/libmfreadwrite.a and b/usr/lib/w32api/libmfreadwrite.a differ diff --git a/usr/lib/w32api/libmfsensorgroup.a b/usr/lib/w32api/libmfsensorgroup.a index 9e617b7e1d0..cdf950477fb 100644 Binary files a/usr/lib/w32api/libmfsensorgroup.a and b/usr/lib/w32api/libmfsensorgroup.a differ diff --git a/usr/lib/w32api/libmfuuid.a b/usr/lib/w32api/libmfuuid.a index e6377462f36..a99766afeef 100644 Binary files a/usr/lib/w32api/libmfuuid.a and b/usr/lib/w32api/libmfuuid.a differ diff --git a/usr/lib/w32api/libmgmtapi.a b/usr/lib/w32api/libmgmtapi.a index 4051906dc81..5e493748d49 100644 Binary files a/usr/lib/w32api/libmgmtapi.a and b/usr/lib/w32api/libmgmtapi.a differ diff --git a/usr/lib/w32api/libmi.a b/usr/lib/w32api/libmi.a index 7fb3f4a93e0..aa0b931bbd9 100644 Binary files a/usr/lib/w32api/libmi.a and b/usr/lib/w32api/libmi.a differ diff --git a/usr/lib/w32api/libmidimap.a b/usr/lib/w32api/libmidimap.a index b720a297b64..fdba8cf81bf 100644 Binary files a/usr/lib/w32api/libmidimap.a and b/usr/lib/w32api/libmidimap.a differ diff --git a/usr/lib/w32api/libmigism.a b/usr/lib/w32api/libmigism.a index e133a8d7835..92dae72f988 100644 Binary files a/usr/lib/w32api/libmigism.a and b/usr/lib/w32api/libmigism.a differ diff --git a/usr/lib/w32api/libmiglibnt.a b/usr/lib/w32api/libmiglibnt.a index 0d0e73afa3f..30b0e86a393 100644 Binary files a/usr/lib/w32api/libmiglibnt.a and b/usr/lib/w32api/libmiglibnt.a differ diff --git a/usr/lib/w32api/libmincore.a b/usr/lib/w32api/libmincore.a index 8bd60bba1b4..cc07dab7446 100644 Binary files a/usr/lib/w32api/libmincore.a and b/usr/lib/w32api/libmincore.a differ diff --git a/usr/lib/w32api/libmincore_downlevel.a b/usr/lib/w32api/libmincore_downlevel.a index 5494da0fd2c..02c933ae321 100644 Binary files a/usr/lib/w32api/libmincore_downlevel.a and b/usr/lib/w32api/libmincore_downlevel.a differ diff --git a/usr/lib/w32api/libmlang.a b/usr/lib/w32api/libmlang.a index 8d343bc997b..4876a36c103 100644 Binary files a/usr/lib/w32api/libmlang.a and b/usr/lib/w32api/libmlang.a differ diff --git a/usr/lib/w32api/libmll_hp.a b/usr/lib/w32api/libmll_hp.a index 461deb4b0ed..ea05a7e8844 100644 Binary files a/usr/lib/w32api/libmll_hp.a and b/usr/lib/w32api/libmll_hp.a differ diff --git a/usr/lib/w32api/libmll_mtf.a b/usr/lib/w32api/libmll_mtf.a index d578bd44cc2..e00d3c0ef98 100644 Binary files a/usr/lib/w32api/libmll_mtf.a and b/usr/lib/w32api/libmll_mtf.a differ diff --git a/usr/lib/w32api/libmll_qic.a b/usr/lib/w32api/libmll_qic.a index 0e7c02017c4..4f70e1ee423 100644 Binary files a/usr/lib/w32api/libmll_qic.a and b/usr/lib/w32api/libmll_qic.a differ diff --git a/usr/lib/w32api/libmmdevapi.a b/usr/lib/w32api/libmmdevapi.a index 712bbfc9e17..91fc6b54688 100644 Binary files a/usr/lib/w32api/libmmdevapi.a and b/usr/lib/w32api/libmmdevapi.a differ diff --git a/usr/lib/w32api/libmmfutil.a b/usr/lib/w32api/libmmfutil.a index 504899de58e..b3a68f1e0f5 100644 Binary files a/usr/lib/w32api/libmmfutil.a and b/usr/lib/w32api/libmmfutil.a differ diff --git a/usr/lib/w32api/libmmutilse.a b/usr/lib/w32api/libmmutilse.a index ec6153c8b04..8451023b28a 100644 Binary files a/usr/lib/w32api/libmmutilse.a and b/usr/lib/w32api/libmmutilse.a differ diff --git a/usr/lib/w32api/libmobsync.a b/usr/lib/w32api/libmobsync.a index 3e42ea759c3..aaef2cfa646 100644 Binary files a/usr/lib/w32api/libmobsync.a and b/usr/lib/w32api/libmobsync.a differ diff --git a/usr/lib/w32api/libmodemui.a b/usr/lib/w32api/libmodemui.a index 56eee7b9bed..79eb1207a9a 100644 Binary files a/usr/lib/w32api/libmodemui.a and b/usr/lib/w32api/libmodemui.a differ diff --git a/usr/lib/w32api/libmofd.a b/usr/lib/w32api/libmofd.a index 4fd607e5136..3c47dcf2a1e 100644 Binary files a/usr/lib/w32api/libmofd.a and b/usr/lib/w32api/libmofd.a differ diff --git a/usr/lib/w32api/libmpr.a b/usr/lib/w32api/libmpr.a index 665120009b4..3577655f777 100644 Binary files a/usr/lib/w32api/libmpr.a and b/usr/lib/w32api/libmpr.a differ diff --git a/usr/lib/w32api/libmprapi.a b/usr/lib/w32api/libmprapi.a index 5efdd19991c..79c524d6e3b 100644 Binary files a/usr/lib/w32api/libmprapi.a and b/usr/lib/w32api/libmprapi.a differ diff --git a/usr/lib/w32api/libmprddm.a b/usr/lib/w32api/libmprddm.a index 3419f974404..f8f298bfb7f 100644 Binary files a/usr/lib/w32api/libmprddm.a and b/usr/lib/w32api/libmprddm.a differ diff --git a/usr/lib/w32api/libmprmsg.a b/usr/lib/w32api/libmprmsg.a index 1e10780181e..cbfb7c293ce 100644 Binary files a/usr/lib/w32api/libmprmsg.a and b/usr/lib/w32api/libmprmsg.a differ diff --git a/usr/lib/w32api/libmprui.a b/usr/lib/w32api/libmprui.a index b2d9205ffbf..52e8d13a5b5 100644 Binary files a/usr/lib/w32api/libmprui.a and b/usr/lib/w32api/libmprui.a differ diff --git a/usr/lib/w32api/libmqad.a b/usr/lib/w32api/libmqad.a index 3ca4ba80e21..e9e866f6ffa 100644 Binary files a/usr/lib/w32api/libmqad.a and b/usr/lib/w32api/libmqad.a differ diff --git a/usr/lib/w32api/libmqcertui.a b/usr/lib/w32api/libmqcertui.a index 3a6c03452e2..0527f96d85e 100644 Binary files a/usr/lib/w32api/libmqcertui.a and b/usr/lib/w32api/libmqcertui.a differ diff --git a/usr/lib/w32api/libmqdscli.a b/usr/lib/w32api/libmqdscli.a index 8f1933450c0..c200eb8d97e 100644 Binary files a/usr/lib/w32api/libmqdscli.a and b/usr/lib/w32api/libmqdscli.a differ diff --git a/usr/lib/w32api/libmqise.a b/usr/lib/w32api/libmqise.a index 2fadf657e71..b6028bc81f2 100644 Binary files a/usr/lib/w32api/libmqise.a and b/usr/lib/w32api/libmqise.a differ diff --git a/usr/lib/w32api/libmqlogmgr.a b/usr/lib/w32api/libmqlogmgr.a index ba0305e4456..38679b18f45 100644 Binary files a/usr/lib/w32api/libmqlogmgr.a and b/usr/lib/w32api/libmqlogmgr.a differ diff --git a/usr/lib/w32api/libmqperf.a b/usr/lib/w32api/libmqperf.a index 9866b8acf0e..a014a484027 100644 Binary files a/usr/lib/w32api/libmqperf.a and b/usr/lib/w32api/libmqperf.a differ diff --git a/usr/lib/w32api/libmqrt.a b/usr/lib/w32api/libmqrt.a index de3125176ac..624e273e395 100644 Binary files a/usr/lib/w32api/libmqrt.a and b/usr/lib/w32api/libmqrt.a differ diff --git a/usr/lib/w32api/libmqrtdep.a b/usr/lib/w32api/libmqrtdep.a index da54c0a0c09..fa00e93db7b 100644 Binary files a/usr/lib/w32api/libmqrtdep.a and b/usr/lib/w32api/libmqrtdep.a differ diff --git a/usr/lib/w32api/libmqsec.a b/usr/lib/w32api/libmqsec.a index 74250636d20..bb7db52fa71 100644 Binary files a/usr/lib/w32api/libmqsec.a and b/usr/lib/w32api/libmqsec.a differ diff --git a/usr/lib/w32api/libmqupgrd.a b/usr/lib/w32api/libmqupgrd.a index 3be9ef64987..1dbb59be796 100644 Binary files a/usr/lib/w32api/libmqupgrd.a and b/usr/lib/w32api/libmqupgrd.a differ diff --git a/usr/lib/w32api/libmqutil.a b/usr/lib/w32api/libmqutil.a index 7da218bd928..d996d2d52a1 100644 Binary files a/usr/lib/w32api/libmqutil.a and b/usr/lib/w32api/libmqutil.a differ diff --git a/usr/lib/w32api/libmsacm32.a b/usr/lib/w32api/libmsacm32.a index 0bca2748883..972111a536b 100644 Binary files a/usr/lib/w32api/libmsacm32.a and b/usr/lib/w32api/libmsacm32.a differ diff --git a/usr/lib/w32api/libmsadcs.a b/usr/lib/w32api/libmsadcs.a index ebfea86a7d4..e5f16c5013d 100644 Binary files a/usr/lib/w32api/libmsadcs.a and b/usr/lib/w32api/libmsadcs.a differ diff --git a/usr/lib/w32api/libmsado15.a b/usr/lib/w32api/libmsado15.a index 262336c2456..2825d0f6ca4 100644 Binary files a/usr/lib/w32api/libmsado15.a and b/usr/lib/w32api/libmsado15.a differ diff --git a/usr/lib/w32api/libmsafd.a b/usr/lib/w32api/libmsafd.a index cf7122bdc4e..e2f3366bc9a 100644 Binary files a/usr/lib/w32api/libmsafd.a and b/usr/lib/w32api/libmsafd.a differ diff --git a/usr/lib/w32api/libmsajapi.a b/usr/lib/w32api/libmsajapi.a index a9c9487a9b5..c45f7741f1a 100644 Binary files a/usr/lib/w32api/libmsajapi.a and b/usr/lib/w32api/libmsajapi.a differ diff --git a/usr/lib/w32api/libmsasn1.a b/usr/lib/w32api/libmsasn1.a index 96ff8cddbc8..875833d9f2c 100644 Binary files a/usr/lib/w32api/libmsasn1.a and b/usr/lib/w32api/libmsasn1.a differ diff --git a/usr/lib/w32api/libmscat32.a b/usr/lib/w32api/libmscat32.a index 8dcaccab77e..591d83ed2cd 100644 Binary files a/usr/lib/w32api/libmscat32.a and b/usr/lib/w32api/libmscat32.a differ diff --git a/usr/lib/w32api/libmscms.a b/usr/lib/w32api/libmscms.a index 55ea696c717..74af40f884e 100644 Binary files a/usr/lib/w32api/libmscms.a and b/usr/lib/w32api/libmscms.a differ diff --git a/usr/lib/w32api/libmsctfmonitor.a b/usr/lib/w32api/libmsctfmonitor.a index 4406294d45a..905e0018053 100644 Binary files a/usr/lib/w32api/libmsctfmonitor.a and b/usr/lib/w32api/libmsctfmonitor.a differ diff --git a/usr/lib/w32api/libmsdadiag.a b/usr/lib/w32api/libmsdadiag.a index cbbdae4821b..6f6c4699424 100644 Binary files a/usr/lib/w32api/libmsdadiag.a and b/usr/lib/w32api/libmsdadiag.a differ diff --git a/usr/lib/w32api/libmsdart.a b/usr/lib/w32api/libmsdart.a index bef4729a677..e48dbf0f921 100644 Binary files a/usr/lib/w32api/libmsdart.a and b/usr/lib/w32api/libmsdart.a differ diff --git a/usr/lib/w32api/libmsdmo.a b/usr/lib/w32api/libmsdmo.a index 6cbab9b2919..aaf17f24ad5 100644 Binary files a/usr/lib/w32api/libmsdmo.a and b/usr/lib/w32api/libmsdmo.a differ diff --git a/usr/lib/w32api/libmsdrm.a b/usr/lib/w32api/libmsdrm.a index cbc16bea8ac..8a60c026979 100644 Binary files a/usr/lib/w32api/libmsdrm.a and b/usr/lib/w32api/libmsdrm.a differ diff --git a/usr/lib/w32api/libmsdtclog.a b/usr/lib/w32api/libmsdtclog.a index 7f6a9289c8f..3dbabb7351f 100644 Binary files a/usr/lib/w32api/libmsdtclog.a and b/usr/lib/w32api/libmsdtclog.a differ diff --git a/usr/lib/w32api/libmsdtcprx.a b/usr/lib/w32api/libmsdtcprx.a index 48308af8ca0..fb6917ab340 100644 Binary files a/usr/lib/w32api/libmsdtcprx.a and b/usr/lib/w32api/libmsdtcprx.a differ diff --git a/usr/lib/w32api/libmsdtcstp.a b/usr/lib/w32api/libmsdtcstp.a index b50a22ea8b1..9d7a0e230f5 100644 Binary files a/usr/lib/w32api/libmsdtcstp.a and b/usr/lib/w32api/libmsdtcstp.a differ diff --git a/usr/lib/w32api/libmsdtctm.a b/usr/lib/w32api/libmsdtctm.a index 3e1f6862807..5da1be142d5 100644 Binary files a/usr/lib/w32api/libmsdtctm.a and b/usr/lib/w32api/libmsdtctm.a differ diff --git a/usr/lib/w32api/libmsdtcuiu.a b/usr/lib/w32api/libmsdtcuiu.a index 55d50545543..8f1298d54d0 100644 Binary files a/usr/lib/w32api/libmsdtcuiu.a and b/usr/lib/w32api/libmsdtcuiu.a differ diff --git a/usr/lib/w32api/libmsftedit.a b/usr/lib/w32api/libmsftedit.a index 1eef365f3f3..9f1b111ccb4 100644 Binary files a/usr/lib/w32api/libmsftedit.a and b/usr/lib/w32api/libmsftedit.a differ diff --git a/usr/lib/w32api/libmsgina.a b/usr/lib/w32api/libmsgina.a index dbc4bc4ab18..06968157aec 100644 Binary files a/usr/lib/w32api/libmsgina.a and b/usr/lib/w32api/libmsgina.a differ diff --git a/usr/lib/w32api/libmsgr3en.a b/usr/lib/w32api/libmsgr3en.a index 6f384cd9e1c..79ba581b48b 100644 Binary files a/usr/lib/w32api/libmsgr3en.a and b/usr/lib/w32api/libmsgr3en.a differ diff --git a/usr/lib/w32api/libmsgrocm.a b/usr/lib/w32api/libmsgrocm.a index ed569bbbe02..32485e71e54 100644 Binary files a/usr/lib/w32api/libmsgrocm.a and b/usr/lib/w32api/libmsgrocm.a differ diff --git a/usr/lib/w32api/libmsgsvc.a b/usr/lib/w32api/libmsgsvc.a index d91a06dff58..3508b8e668a 100644 Binary files a/usr/lib/w32api/libmsgsvc.a and b/usr/lib/w32api/libmsgsvc.a differ diff --git a/usr/lib/w32api/libmshtml.a b/usr/lib/w32api/libmshtml.a index e9b44dd6f65..9993e35be93 100644 Binary files a/usr/lib/w32api/libmshtml.a and b/usr/lib/w32api/libmshtml.a differ diff --git a/usr/lib/w32api/libmsi.a b/usr/lib/w32api/libmsi.a index c0599d86bcb..842d90317a9 100644 Binary files a/usr/lib/w32api/libmsi.a and b/usr/lib/w32api/libmsi.a differ diff --git a/usr/lib/w32api/libmsimg32.a b/usr/lib/w32api/libmsimg32.a index bcb8efd2958..83d0c8e82e1 100644 Binary files a/usr/lib/w32api/libmsimg32.a and b/usr/lib/w32api/libmsimg32.a differ diff --git a/usr/lib/w32api/libmsimtf.a b/usr/lib/w32api/libmsimtf.a index df117c58f7c..a682f72b21c 100644 Binary files a/usr/lib/w32api/libmsimtf.a and b/usr/lib/w32api/libmsimtf.a differ diff --git a/usr/lib/w32api/libmsir3jp.a b/usr/lib/w32api/libmsir3jp.a index 3e51f677088..2c69714b146 100644 Binary files a/usr/lib/w32api/libmsir3jp.a and b/usr/lib/w32api/libmsir3jp.a differ diff --git a/usr/lib/w32api/libmsisip.a b/usr/lib/w32api/libmsisip.a index 769e3d2ad34..4ddc15e8bf4 100644 Binary files a/usr/lib/w32api/libmsisip.a and b/usr/lib/w32api/libmsisip.a differ diff --git a/usr/lib/w32api/libmslbui.a b/usr/lib/w32api/libmslbui.a index f4250d1a285..bf450810d46 100644 Binary files a/usr/lib/w32api/libmslbui.a and b/usr/lib/w32api/libmslbui.a differ diff --git a/usr/lib/w32api/libmsls31.a b/usr/lib/w32api/libmsls31.a index 89eac2183d0..338714ad493 100644 Binary files a/usr/lib/w32api/libmsls31.a and b/usr/lib/w32api/libmsls31.a differ diff --git a/usr/lib/w32api/libmsmqocm.a b/usr/lib/w32api/libmsmqocm.a index 596de38a114..2c6ffe76c9c 100644 Binary files a/usr/lib/w32api/libmsmqocm.a and b/usr/lib/w32api/libmsmqocm.a differ diff --git a/usr/lib/w32api/libmsobdl.a b/usr/lib/w32api/libmsobdl.a index c8064dda58c..b50568bd837 100644 Binary files a/usr/lib/w32api/libmsobdl.a and b/usr/lib/w32api/libmsobdl.a differ diff --git a/usr/lib/w32api/libmsobmain.a b/usr/lib/w32api/libmsobmain.a index c6980f47669..b7a647682a6 100644 Binary files a/usr/lib/w32api/libmsobmain.a and b/usr/lib/w32api/libmsobmain.a differ diff --git a/usr/lib/w32api/libmsoe.a b/usr/lib/w32api/libmsoe.a index 264297ec01e..46f6ec190dc 100644 Binary files a/usr/lib/w32api/libmsoe.a and b/usr/lib/w32api/libmsoe.a differ diff --git a/usr/lib/w32api/libmsoeacct.a b/usr/lib/w32api/libmsoeacct.a index 2bc1b03696b..d663c5e066c 100644 Binary files a/usr/lib/w32api/libmsoeacct.a and b/usr/lib/w32api/libmsoeacct.a differ diff --git a/usr/lib/w32api/libmsoert2.a b/usr/lib/w32api/libmsoert2.a index f849b364cf3..cbdbdca9034 100644 Binary files a/usr/lib/w32api/libmsoert2.a and b/usr/lib/w32api/libmsoert2.a differ diff --git a/usr/lib/w32api/libmsoledbsql.a b/usr/lib/w32api/libmsoledbsql.a index 8a42185a97d..5e0461cf33d 100644 Binary files a/usr/lib/w32api/libmsoledbsql.a and b/usr/lib/w32api/libmsoledbsql.a differ diff --git a/usr/lib/w32api/libmspatcha.a b/usr/lib/w32api/libmspatcha.a index e1b91c90b31..3ba84a8f3af 100644 Binary files a/usr/lib/w32api/libmspatcha.a and b/usr/lib/w32api/libmspatcha.a differ diff --git a/usr/lib/w32api/libmsports.a b/usr/lib/w32api/libmsports.a index b9ab10e53a8..1dcb173e02c 100644 Binary files a/usr/lib/w32api/libmsports.a and b/usr/lib/w32api/libmsports.a differ diff --git a/usr/lib/w32api/libmsrating.a b/usr/lib/w32api/libmsrating.a index 896bc63a346..e8bd6377b19 100644 Binary files a/usr/lib/w32api/libmsrating.a and b/usr/lib/w32api/libmsrating.a differ diff --git a/usr/lib/w32api/libmsrle32.a b/usr/lib/w32api/libmsrle32.a index c518b592f4c..7b2b9289def 100644 Binary files a/usr/lib/w32api/libmsrle32.a and b/usr/lib/w32api/libmsrle32.a differ diff --git a/usr/lib/w32api/libmssign32.a b/usr/lib/w32api/libmssign32.a index 0f0aa87fb83..d94030ef067 100644 Binary files a/usr/lib/w32api/libmssign32.a and b/usr/lib/w32api/libmssign32.a differ diff --git a/usr/lib/w32api/libmssip32.a b/usr/lib/w32api/libmssip32.a index dbe00479258..8e20e7cd2ea 100644 Binary files a/usr/lib/w32api/libmssip32.a and b/usr/lib/w32api/libmssip32.a differ diff --git a/usr/lib/w32api/libmstask.a b/usr/lib/w32api/libmstask.a index 4fad9ad00e5..cee8423c8e2 100644 Binary files a/usr/lib/w32api/libmstask.a and b/usr/lib/w32api/libmstask.a differ diff --git a/usr/lib/w32api/libmstlsapi.a b/usr/lib/w32api/libmstlsapi.a index da37770ae5e..c6b82fd65d4 100644 Binary files a/usr/lib/w32api/libmstlsapi.a and b/usr/lib/w32api/libmstlsapi.a differ diff --git a/usr/lib/w32api/libmsutb.a b/usr/lib/w32api/libmsutb.a index 716d012ba35..a7e34af85f3 100644 Binary files a/usr/lib/w32api/libmsutb.a and b/usr/lib/w32api/libmsutb.a differ diff --git a/usr/lib/w32api/libmsv1_0.a b/usr/lib/w32api/libmsv1_0.a index 3ccbe31dd7e..b3d4b3df472 100644 Binary files a/usr/lib/w32api/libmsv1_0.a and b/usr/lib/w32api/libmsv1_0.a differ diff --git a/usr/lib/w32api/libmsvcirt.a b/usr/lib/w32api/libmsvcirt.a index 20760ef9ac8..49cf0de89e6 100644 Binary files a/usr/lib/w32api/libmsvcirt.a and b/usr/lib/w32api/libmsvcirt.a differ diff --git a/usr/lib/w32api/libmsvfw32.a b/usr/lib/w32api/libmsvfw32.a index 3982c0278b3..677bab64d39 100644 Binary files a/usr/lib/w32api/libmsvfw32.a and b/usr/lib/w32api/libmsvfw32.a differ diff --git a/usr/lib/w32api/libmsvidc32.a b/usr/lib/w32api/libmsvidc32.a index d19a284355a..15a13272231 100644 Binary files a/usr/lib/w32api/libmsvidc32.a and b/usr/lib/w32api/libmsvidc32.a differ diff --git a/usr/lib/w32api/libmsw3prt.a b/usr/lib/w32api/libmsw3prt.a index c4b6bd866ab..644b022b4b2 100644 Binary files a/usr/lib/w32api/libmsw3prt.a and b/usr/lib/w32api/libmsw3prt.a differ diff --git a/usr/lib/w32api/libmswsock.a b/usr/lib/w32api/libmswsock.a index b96d5eb8679..087a1aece79 100644 Binary files a/usr/lib/w32api/libmswsock.a and b/usr/lib/w32api/libmswsock.a differ diff --git a/usr/lib/w32api/libmsxml2.a b/usr/lib/w32api/libmsxml2.a index d78b6dbfe1c..9803007e015 100644 Binary files a/usr/lib/w32api/libmsxml2.a and b/usr/lib/w32api/libmsxml2.a differ diff --git a/usr/lib/w32api/libmsxml6.a b/usr/lib/w32api/libmsxml6.a index 3a75fbe42bb..dce94b802ed 100644 Binary files a/usr/lib/w32api/libmsxml6.a and b/usr/lib/w32api/libmsxml6.a differ diff --git a/usr/lib/w32api/libmsyuv.a b/usr/lib/w32api/libmsyuv.a index 718b2ea6327..fd2aae4c8d2 100644 Binary files a/usr/lib/w32api/libmsyuv.a and b/usr/lib/w32api/libmsyuv.a differ diff --git a/usr/lib/w32api/libmtxclu.a b/usr/lib/w32api/libmtxclu.a index d7d7b29f5e6..8c8faa88a4b 100644 Binary files a/usr/lib/w32api/libmtxclu.a and b/usr/lib/w32api/libmtxclu.a differ diff --git a/usr/lib/w32api/libmtxdm.a b/usr/lib/w32api/libmtxdm.a index b10e7c61a97..b1fb911c2b5 100644 Binary files a/usr/lib/w32api/libmtxdm.a and b/usr/lib/w32api/libmtxdm.a differ diff --git a/usr/lib/w32api/libmtxex.a b/usr/lib/w32api/libmtxex.a index b59b105236c..a88feb25900 100644 Binary files a/usr/lib/w32api/libmtxex.a and b/usr/lib/w32api/libmtxex.a differ diff --git a/usr/lib/w32api/libmtxoci.a b/usr/lib/w32api/libmtxoci.a index 77fbcbd4ddd..c54176f7efa 100644 Binary files a/usr/lib/w32api/libmtxoci.a and b/usr/lib/w32api/libmtxoci.a differ diff --git a/usr/lib/w32api/libmydocs.a b/usr/lib/w32api/libmydocs.a index 3e3638e8f80..3952aa1623b 100644 Binary files a/usr/lib/w32api/libmydocs.a and b/usr/lib/w32api/libmydocs.a differ diff --git a/usr/lib/w32api/libnanosrv.a b/usr/lib/w32api/libnanosrv.a index 6645e1dc482..ac1dca616a7 100644 Binary files a/usr/lib/w32api/libnanosrv.a and b/usr/lib/w32api/libnanosrv.a differ diff --git a/usr/lib/w32api/libncobjapi.a b/usr/lib/w32api/libncobjapi.a index e35d266afe4..a8a33f87567 100644 Binary files a/usr/lib/w32api/libncobjapi.a and b/usr/lib/w32api/libncobjapi.a differ diff --git a/usr/lib/w32api/libncrypt.a b/usr/lib/w32api/libncrypt.a index 828c48ccce9..f9f0177d5b7 100644 Binary files a/usr/lib/w32api/libncrypt.a and b/usr/lib/w32api/libncrypt.a differ diff --git a/usr/lib/w32api/libncxpnt.a b/usr/lib/w32api/libncxpnt.a index f5674827b6b..92552ae36d7 100644 Binary files a/usr/lib/w32api/libncxpnt.a and b/usr/lib/w32api/libncxpnt.a differ diff --git a/usr/lib/w32api/libnddeapi.a b/usr/lib/w32api/libnddeapi.a index 35a7ee404aa..d94b7b04365 100644 Binary files a/usr/lib/w32api/libnddeapi.a and b/usr/lib/w32api/libnddeapi.a differ diff --git a/usr/lib/w32api/libnddenb32.a b/usr/lib/w32api/libnddenb32.a index 932b7c5e466..38545191b5d 100644 Binary files a/usr/lib/w32api/libnddenb32.a and b/usr/lib/w32api/libnddenb32.a differ diff --git a/usr/lib/w32api/libndfapi.a b/usr/lib/w32api/libndfapi.a index 57d1538585f..2dcb7e4a04b 100644 Binary files a/usr/lib/w32api/libndfapi.a and b/usr/lib/w32api/libndfapi.a differ diff --git a/usr/lib/w32api/libndis.a b/usr/lib/w32api/libndis.a index ec8f7f1159b..42f8b0262b4 100644 Binary files a/usr/lib/w32api/libndis.a and b/usr/lib/w32api/libndis.a differ diff --git a/usr/lib/w32api/libndisnpp.a b/usr/lib/w32api/libndisnpp.a index d90e98890b2..653bcbd415e 100644 Binary files a/usr/lib/w32api/libndisnpp.a and b/usr/lib/w32api/libndisnpp.a differ diff --git a/usr/lib/w32api/libnetapi32.a b/usr/lib/w32api/libnetapi32.a index d2d14641c16..4c57e33ce16 100644 Binary files a/usr/lib/w32api/libnetapi32.a and b/usr/lib/w32api/libnetapi32.a differ diff --git a/usr/lib/w32api/libnetcfgx.a b/usr/lib/w32api/libnetcfgx.a index e1593bd3adb..cf2d44ffd46 100644 Binary files a/usr/lib/w32api/libnetcfgx.a and b/usr/lib/w32api/libnetcfgx.a differ diff --git a/usr/lib/w32api/libnetid.a b/usr/lib/w32api/libnetid.a index 74f36201661..65cfd6c80f0 100644 Binary files a/usr/lib/w32api/libnetid.a and b/usr/lib/w32api/libnetid.a differ diff --git a/usr/lib/w32api/libnetio.a b/usr/lib/w32api/libnetio.a index bd69a6baf70..d1bf9397435 100644 Binary files a/usr/lib/w32api/libnetio.a and b/usr/lib/w32api/libnetio.a differ diff --git a/usr/lib/w32api/libnetlogon.a b/usr/lib/w32api/libnetlogon.a index cc5a1cf1ab2..98d8da6e874 100644 Binary files a/usr/lib/w32api/libnetlogon.a and b/usr/lib/w32api/libnetlogon.a differ diff --git a/usr/lib/w32api/libnetman.a b/usr/lib/w32api/libnetman.a index 72a8222aae4..cec126dd4b6 100644 Binary files a/usr/lib/w32api/libnetman.a and b/usr/lib/w32api/libnetman.a differ diff --git a/usr/lib/w32api/libnetoc.a b/usr/lib/w32api/libnetoc.a index affcecefe70..d86d517d8ca 100644 Binary files a/usr/lib/w32api/libnetoc.a and b/usr/lib/w32api/libnetoc.a differ diff --git a/usr/lib/w32api/libnetplwiz.a b/usr/lib/w32api/libnetplwiz.a index 1e95768c3a4..39b772a558b 100644 Binary files a/usr/lib/w32api/libnetplwiz.a and b/usr/lib/w32api/libnetplwiz.a differ diff --git a/usr/lib/w32api/libnetrap.a b/usr/lib/w32api/libnetrap.a index 60e2dd9621d..11498571ef1 100644 Binary files a/usr/lib/w32api/libnetrap.a and b/usr/lib/w32api/libnetrap.a differ diff --git a/usr/lib/w32api/libnetshell.a b/usr/lib/w32api/libnetshell.a index d7362394db1..1ef1c152f84 100644 Binary files a/usr/lib/w32api/libnetshell.a and b/usr/lib/w32api/libnetshell.a differ diff --git a/usr/lib/w32api/libnetui0.a b/usr/lib/w32api/libnetui0.a index 918c33d176c..89f0c808206 100644 Binary files a/usr/lib/w32api/libnetui0.a and b/usr/lib/w32api/libnetui0.a differ diff --git a/usr/lib/w32api/libnetui1.a b/usr/lib/w32api/libnetui1.a index 2c921eb0b28..26c40872587 100644 Binary files a/usr/lib/w32api/libnetui1.a and b/usr/lib/w32api/libnetui1.a differ diff --git a/usr/lib/w32api/libnetui2.a b/usr/lib/w32api/libnetui2.a index 1ea1ecc3d28..e2b21df3ff6 100644 Binary files a/usr/lib/w32api/libnetui2.a and b/usr/lib/w32api/libnetui2.a differ diff --git a/usr/lib/w32api/libnewdev.a b/usr/lib/w32api/libnewdev.a index 76874296dcc..5f293acca54 100644 Binary files a/usr/lib/w32api/libnewdev.a and b/usr/lib/w32api/libnewdev.a differ diff --git a/usr/lib/w32api/libnntpapi.a b/usr/lib/w32api/libnntpapi.a index 38af2bc3d5c..ac5e09108ab 100644 Binary files a/usr/lib/w32api/libnntpapi.a and b/usr/lib/w32api/libnntpapi.a differ diff --git a/usr/lib/w32api/libnormaliz.a b/usr/lib/w32api/libnormaliz.a index 41caa94863b..3cca0d287d9 100644 Binary files a/usr/lib/w32api/libnormaliz.a and b/usr/lib/w32api/libnormaliz.a differ diff --git a/usr/lib/w32api/libnpptools.a b/usr/lib/w32api/libnpptools.a index 2cde3bbc51d..57ed268d680 100644 Binary files a/usr/lib/w32api/libnpptools.a and b/usr/lib/w32api/libnpptools.a differ diff --git a/usr/lib/w32api/libnshipsec.a b/usr/lib/w32api/libnshipsec.a index acd00072e62..7354277da43 100644 Binary files a/usr/lib/w32api/libnshipsec.a and b/usr/lib/w32api/libnshipsec.a differ diff --git a/usr/lib/w32api/libntdll.a b/usr/lib/w32api/libntdll.a index 67baf732e5e..7b359344e35 100644 Binary files a/usr/lib/w32api/libntdll.a and b/usr/lib/w32api/libntdll.a differ diff --git a/usr/lib/w32api/libntdllcrt.a b/usr/lib/w32api/libntdllcrt.a index 741be481622..e4dce6b3ba8 100644 Binary files a/usr/lib/w32api/libntdllcrt.a and b/usr/lib/w32api/libntdllcrt.a differ diff --git a/usr/lib/w32api/libntdsapi.a b/usr/lib/w32api/libntdsapi.a index f210c5b5ac0..be775b9ee6e 100644 Binary files a/usr/lib/w32api/libntdsapi.a and b/usr/lib/w32api/libntdsapi.a differ diff --git a/usr/lib/w32api/libntdsbcli.a b/usr/lib/w32api/libntdsbcli.a index 37f7e3329ab..d7441ca766d 100644 Binary files a/usr/lib/w32api/libntdsbcli.a and b/usr/lib/w32api/libntdsbcli.a differ diff --git a/usr/lib/w32api/libntlanman.a b/usr/lib/w32api/libntlanman.a index 18a2bdc8f04..6f7357de61f 100644 Binary files a/usr/lib/w32api/libntlanman.a and b/usr/lib/w32api/libntlanman.a differ diff --git a/usr/lib/w32api/libntlanui.a b/usr/lib/w32api/libntlanui.a index b8362746bff..d8aea2b2e83 100644 Binary files a/usr/lib/w32api/libntlanui.a and b/usr/lib/w32api/libntlanui.a differ diff --git a/usr/lib/w32api/libntlsapi.a b/usr/lib/w32api/libntlsapi.a index c14e1c8f581..4c6cd693a56 100644 Binary files a/usr/lib/w32api/libntlsapi.a and b/usr/lib/w32api/libntlsapi.a differ diff --git a/usr/lib/w32api/libntmarta.a b/usr/lib/w32api/libntmarta.a index 5fadd8882ff..a619b23bcb6 100644 Binary files a/usr/lib/w32api/libntmarta.a and b/usr/lib/w32api/libntmarta.a differ diff --git a/usr/lib/w32api/libntmsapi.a b/usr/lib/w32api/libntmsapi.a index 5b77fd3d2b6..2c0396abc0d 100644 Binary files a/usr/lib/w32api/libntmsapi.a and b/usr/lib/w32api/libntmsapi.a differ diff --git a/usr/lib/w32api/libntoc.a b/usr/lib/w32api/libntoc.a index 3ed940d06fe..712a840c31d 100644 Binary files a/usr/lib/w32api/libntoc.a and b/usr/lib/w32api/libntoc.a differ diff --git a/usr/lib/w32api/libntoskrnl.a b/usr/lib/w32api/libntoskrnl.a index 4d9df0cf6d5..4eb2aca9b73 100644 Binary files a/usr/lib/w32api/libntoskrnl.a and b/usr/lib/w32api/libntoskrnl.a differ diff --git a/usr/lib/w32api/libntprint.a b/usr/lib/w32api/libntprint.a index 015d190a6cd..a36e435d862 100644 Binary files a/usr/lib/w32api/libntprint.a and b/usr/lib/w32api/libntprint.a differ diff --git a/usr/lib/w32api/libntquery.a b/usr/lib/w32api/libntquery.a index 98b34735c4c..168efd16dfd 100644 Binary files a/usr/lib/w32api/libntquery.a and b/usr/lib/w32api/libntquery.a differ diff --git a/usr/lib/w32api/libntshrui.a b/usr/lib/w32api/libntshrui.a index 490edbef215..8dc31097525 100644 Binary files a/usr/lib/w32api/libntshrui.a and b/usr/lib/w32api/libntshrui.a differ diff --git a/usr/lib/w32api/libntvdm64.a b/usr/lib/w32api/libntvdm64.a index f91901074c0..a3454a2ccd6 100644 Binary files a/usr/lib/w32api/libntvdm64.a and b/usr/lib/w32api/libntvdm64.a differ diff --git a/usr/lib/w32api/libnwprovau.a b/usr/lib/w32api/libnwprovau.a index daa0446dff7..6f591413b1b 100644 Binary files a/usr/lib/w32api/libnwprovau.a and b/usr/lib/w32api/libnwprovau.a differ diff --git a/usr/lib/w32api/liboakley.a b/usr/lib/w32api/liboakley.a index 56655e1c509..3f792d7c006 100644 Binary files a/usr/lib/w32api/liboakley.a and b/usr/lib/w32api/liboakley.a differ diff --git a/usr/lib/w32api/liboccache.a b/usr/lib/w32api/liboccache.a index 61da9d513c2..12116cb0aab 100644 Binary files a/usr/lib/w32api/liboccache.a and b/usr/lib/w32api/liboccache.a differ diff --git a/usr/lib/w32api/libocgen.a b/usr/lib/w32api/libocgen.a index f602d25c45c..59a01473f64 100644 Binary files a/usr/lib/w32api/libocgen.a and b/usr/lib/w32api/libocgen.a differ diff --git a/usr/lib/w32api/libocmanage.a b/usr/lib/w32api/libocmanage.a index 942de7c6141..cb95c5a1e58 100644 Binary files a/usr/lib/w32api/libocmanage.a and b/usr/lib/w32api/libocmanage.a differ diff --git a/usr/lib/w32api/libocmsn.a b/usr/lib/w32api/libocmsn.a index d34445c6b5d..ec320fa1adc 100644 Binary files a/usr/lib/w32api/libocmsn.a and b/usr/lib/w32api/libocmsn.a differ diff --git a/usr/lib/w32api/libodbc32.a b/usr/lib/w32api/libodbc32.a index b9d2fb88a4f..29f6987f380 100644 Binary files a/usr/lib/w32api/libodbc32.a and b/usr/lib/w32api/libodbc32.a differ diff --git a/usr/lib/w32api/libodbc32gt.a b/usr/lib/w32api/libodbc32gt.a index 2d25761e5d8..ed5ea728fb4 100644 Binary files a/usr/lib/w32api/libodbc32gt.a and b/usr/lib/w32api/libodbc32gt.a differ diff --git a/usr/lib/w32api/libodbcbcp.a b/usr/lib/w32api/libodbcbcp.a index d1d67d3ec62..e79af152ffd 100644 Binary files a/usr/lib/w32api/libodbcbcp.a and b/usr/lib/w32api/libodbcbcp.a differ diff --git a/usr/lib/w32api/libodbcconf.a b/usr/lib/w32api/libodbcconf.a index 8cd6924a9f2..03a7ac1a004 100644 Binary files a/usr/lib/w32api/libodbcconf.a and b/usr/lib/w32api/libodbcconf.a differ diff --git a/usr/lib/w32api/libodbccp32.a b/usr/lib/w32api/libodbccp32.a index b4fce26d1a8..e0b073ce1ce 100644 Binary files a/usr/lib/w32api/libodbccp32.a and b/usr/lib/w32api/libodbccp32.a differ diff --git a/usr/lib/w32api/libodbccr32.a b/usr/lib/w32api/libodbccr32.a index fe7d1149b07..f459e350ab5 100644 Binary files a/usr/lib/w32api/libodbccr32.a and b/usr/lib/w32api/libodbccr32.a differ diff --git a/usr/lib/w32api/libodbccu32.a b/usr/lib/w32api/libodbccu32.a index c0203dad796..fefcd14fbd0 100644 Binary files a/usr/lib/w32api/libodbccu32.a and b/usr/lib/w32api/libodbccu32.a differ diff --git a/usr/lib/w32api/libodbctrac.a b/usr/lib/w32api/libodbctrac.a index 9d53af5a357..f77bf1f0ff3 100644 Binary files a/usr/lib/w32api/libodbctrac.a and b/usr/lib/w32api/libodbctrac.a differ diff --git a/usr/lib/w32api/liboeimport.a b/usr/lib/w32api/liboeimport.a index 016841e2ca8..bd780b1440a 100644 Binary files a/usr/lib/w32api/liboeimport.a and b/usr/lib/w32api/liboeimport.a differ diff --git a/usr/lib/w32api/liboemiglib.a b/usr/lib/w32api/liboemiglib.a index a08f6cdfa30..5a3f1077f2d 100644 Binary files a/usr/lib/w32api/liboemiglib.a and b/usr/lib/w32api/liboemiglib.a differ diff --git a/usr/lib/w32api/libole32.a b/usr/lib/w32api/libole32.a index f3aae51955f..74f522b0ee8 100644 Binary files a/usr/lib/w32api/libole32.a and b/usr/lib/w32api/libole32.a differ diff --git a/usr/lib/w32api/liboleacc.a b/usr/lib/w32api/liboleacc.a index 5ea78b9cd3b..a792b837f00 100644 Binary files a/usr/lib/w32api/liboleacc.a and b/usr/lib/w32api/liboleacc.a differ diff --git a/usr/lib/w32api/liboleaut32.a b/usr/lib/w32api/liboleaut32.a index 301361fc5cf..0193ba49d25 100644 Binary files a/usr/lib/w32api/liboleaut32.a and b/usr/lib/w32api/liboleaut32.a differ diff --git a/usr/lib/w32api/libolecli32.a b/usr/lib/w32api/libolecli32.a index 5bcdaa1efe6..b05a17b77d4 100644 Binary files a/usr/lib/w32api/libolecli32.a and b/usr/lib/w32api/libolecli32.a differ diff --git a/usr/lib/w32api/libolecnv32.a b/usr/lib/w32api/libolecnv32.a index 7eb9ba134b9..e845855baba 100644 Binary files a/usr/lib/w32api/libolecnv32.a and b/usr/lib/w32api/libolecnv32.a differ diff --git a/usr/lib/w32api/liboledb32.a b/usr/lib/w32api/liboledb32.a index 24803676a84..1509af1a59e 100644 Binary files a/usr/lib/w32api/liboledb32.a and b/usr/lib/w32api/liboledb32.a differ diff --git a/usr/lib/w32api/liboledlg.a b/usr/lib/w32api/liboledlg.a index 5ab2a494f88..a1765e91fe8 100644 Binary files a/usr/lib/w32api/liboledlg.a and b/usr/lib/w32api/liboledlg.a differ diff --git a/usr/lib/w32api/libolesvr32.a b/usr/lib/w32api/libolesvr32.a index a6395e26cec..38cb3974289 100644 Binary files a/usr/lib/w32api/libolesvr32.a and b/usr/lib/w32api/libolesvr32.a differ diff --git a/usr/lib/w32api/libonecore.a b/usr/lib/w32api/libonecore.a index cbf30c17041..7661b9789ed 100644 Binary files a/usr/lib/w32api/libonecore.a and b/usr/lib/w32api/libonecore.a differ diff --git a/usr/lib/w32api/libonecore_apiset.a b/usr/lib/w32api/libonecore_apiset.a index 00abf4fba40..7696d135a6d 100644 Binary files a/usr/lib/w32api/libonecore_apiset.a and b/usr/lib/w32api/libonecore_apiset.a differ diff --git a/usr/lib/w32api/libonecoreuap_apiset.a b/usr/lib/w32api/libonecoreuap_apiset.a index c4d999b51ee..1ec472b4792 100644 Binary files a/usr/lib/w32api/libonecoreuap_apiset.a and b/usr/lib/w32api/libonecoreuap_apiset.a differ diff --git a/usr/lib/w32api/libopends60.a b/usr/lib/w32api/libopends60.a index 0c84dacfca8..dfdc16fe9f8 100644 Binary files a/usr/lib/w32api/libopends60.a and b/usr/lib/w32api/libopends60.a differ diff --git a/usr/lib/w32api/libopengl32.a b/usr/lib/w32api/libopengl32.a index a74e495e078..6cdb02a3ab1 100644 Binary files a/usr/lib/w32api/libopengl32.a and b/usr/lib/w32api/libopengl32.a differ diff --git a/usr/lib/w32api/libosuninst.a b/usr/lib/w32api/libosuninst.a index 7e453656c71..c0fec78b561 100644 Binary files a/usr/lib/w32api/libosuninst.a and b/usr/lib/w32api/libosuninst.a differ diff --git a/usr/lib/w32api/libp2p.a b/usr/lib/w32api/libp2p.a index 05ffc2e6488..5b87a2e246e 100644 Binary files a/usr/lib/w32api/libp2p.a and b/usr/lib/w32api/libp2p.a differ diff --git a/usr/lib/w32api/libp2pcollab.a b/usr/lib/w32api/libp2pcollab.a index 9d6c1729ddb..5c4d39d59d7 100644 Binary files a/usr/lib/w32api/libp2pcollab.a and b/usr/lib/w32api/libp2pcollab.a differ diff --git a/usr/lib/w32api/libp2pgraph.a b/usr/lib/w32api/libp2pgraph.a index 3603cad17c3..4bc03f782bb 100644 Binary files a/usr/lib/w32api/libp2pgraph.a and b/usr/lib/w32api/libp2pgraph.a differ diff --git a/usr/lib/w32api/libpathcch.a b/usr/lib/w32api/libpathcch.a index bffbabe048d..452befc47cd 100644 Binary files a/usr/lib/w32api/libpathcch.a and b/usr/lib/w32api/libpathcch.a differ diff --git a/usr/lib/w32api/libpautoenr.a b/usr/lib/w32api/libpautoenr.a index 72d80689931..3e2eb930e6e 100644 Binary files a/usr/lib/w32api/libpautoenr.a and b/usr/lib/w32api/libpautoenr.a differ diff --git a/usr/lib/w32api/libpcwum.a b/usr/lib/w32api/libpcwum.a index f67ab5f95fa..1f30b047ae7 100644 Binary files a/usr/lib/w32api/libpcwum.a and b/usr/lib/w32api/libpcwum.a differ diff --git a/usr/lib/w32api/libpdh.a b/usr/lib/w32api/libpdh.a index cefadfc39c4..677568e62f3 100644 Binary files a/usr/lib/w32api/libpdh.a and b/usr/lib/w32api/libpdh.a differ diff --git a/usr/lib/w32api/libperfctrs.a b/usr/lib/w32api/libperfctrs.a index 2713f3a2eab..ebc528e4d23 100644 Binary files a/usr/lib/w32api/libperfctrs.a and b/usr/lib/w32api/libperfctrs.a differ diff --git a/usr/lib/w32api/libperfdisk.a b/usr/lib/w32api/libperfdisk.a index e87bf73869c..b5e5c59611d 100644 Binary files a/usr/lib/w32api/libperfdisk.a and b/usr/lib/w32api/libperfdisk.a differ diff --git a/usr/lib/w32api/libperfnet.a b/usr/lib/w32api/libperfnet.a index e863d458196..554249ccc68 100644 Binary files a/usr/lib/w32api/libperfnet.a and b/usr/lib/w32api/libperfnet.a differ diff --git a/usr/lib/w32api/libperfos.a b/usr/lib/w32api/libperfos.a index 0a1ff66c984..cdcc7479954 100644 Binary files a/usr/lib/w32api/libperfos.a and b/usr/lib/w32api/libperfos.a differ diff --git a/usr/lib/w32api/libperfproc.a b/usr/lib/w32api/libperfproc.a index d3bf7a9977c..42b3cab0cff 100644 Binary files a/usr/lib/w32api/libperfproc.a and b/usr/lib/w32api/libperfproc.a differ diff --git a/usr/lib/w32api/libperfts.a b/usr/lib/w32api/libperfts.a index 8abc94f9f92..cd191bb9bbc 100644 Binary files a/usr/lib/w32api/libperfts.a and b/usr/lib/w32api/libperfts.a differ diff --git a/usr/lib/w32api/libphotowiz.a b/usr/lib/w32api/libphotowiz.a index e722fa1b5e3..47a4781f2f8 100644 Binary files a/usr/lib/w32api/libphotowiz.a and b/usr/lib/w32api/libphotowiz.a differ diff --git a/usr/lib/w32api/libpidgen.a b/usr/lib/w32api/libpidgen.a index 27645400546..20ad4042c38 100644 Binary files a/usr/lib/w32api/libpidgen.a and b/usr/lib/w32api/libpidgen.a differ diff --git a/usr/lib/w32api/libpintlcsd.a b/usr/lib/w32api/libpintlcsd.a index d0cd97d74de..b4871103472 100644 Binary files a/usr/lib/w32api/libpintlcsd.a and b/usr/lib/w32api/libpintlcsd.a differ diff --git a/usr/lib/w32api/libpolicman.a b/usr/lib/w32api/libpolicman.a index eb38c2d13f6..080ee6408c4 100644 Binary files a/usr/lib/w32api/libpolicman.a and b/usr/lib/w32api/libpolicman.a differ diff --git a/usr/lib/w32api/libpolstore.a b/usr/lib/w32api/libpolstore.a index 18540fdd7df..08a818f25e5 100644 Binary files a/usr/lib/w32api/libpolstore.a and b/usr/lib/w32api/libpolstore.a differ diff --git a/usr/lib/w32api/libportabledeviceguids.a b/usr/lib/w32api/libportabledeviceguids.a index 72cd758a4cd..9a357c12b56 100644 Binary files a/usr/lib/w32api/libportabledeviceguids.a and b/usr/lib/w32api/libportabledeviceguids.a differ diff --git a/usr/lib/w32api/libpowrprof.a b/usr/lib/w32api/libpowrprof.a index 9ce4a95585a..99747fd2e5e 100644 Binary files a/usr/lib/w32api/libpowrprof.a and b/usr/lib/w32api/libpowrprof.a differ diff --git a/usr/lib/w32api/libprintui.a b/usr/lib/w32api/libprintui.a index 412e7ba2314..39bbbf9adf2 100644 Binary files a/usr/lib/w32api/libprintui.a and b/usr/lib/w32api/libprintui.a differ diff --git a/usr/lib/w32api/libprntvpt.a b/usr/lib/w32api/libprntvpt.a index 7b426be7b32..51358fdccae 100644 Binary files a/usr/lib/w32api/libprntvpt.a and b/usr/lib/w32api/libprntvpt.a differ diff --git a/usr/lib/w32api/libprofmap.a b/usr/lib/w32api/libprofmap.a index 9d29cf47fc7..1015dda286c 100644 Binary files a/usr/lib/w32api/libprofmap.a and b/usr/lib/w32api/libprofmap.a differ diff --git a/usr/lib/w32api/libpropsys.a b/usr/lib/w32api/libpropsys.a index 5171ef0e95d..e3b5fe9cd35 100644 Binary files a/usr/lib/w32api/libpropsys.a and b/usr/lib/w32api/libpropsys.a differ diff --git a/usr/lib/w32api/libpsapi.a b/usr/lib/w32api/libpsapi.a index 479e471e425..af558d92256 100644 Binary files a/usr/lib/w32api/libpsapi.a and b/usr/lib/w32api/libpsapi.a differ diff --git a/usr/lib/w32api/libpsbase.a b/usr/lib/w32api/libpsbase.a index f7de3a1a3e9..023257c6d0c 100644 Binary files a/usr/lib/w32api/libpsbase.a and b/usr/lib/w32api/libpsbase.a differ diff --git a/usr/lib/w32api/libpschdprf.a b/usr/lib/w32api/libpschdprf.a index a13d14517d0..a1a7cf74b91 100644 Binary files a/usr/lib/w32api/libpschdprf.a and b/usr/lib/w32api/libpschdprf.a differ diff --git a/usr/lib/w32api/libpstorec.a b/usr/lib/w32api/libpstorec.a index 5c2b44a2011..2e1c48bcb23 100644 Binary files a/usr/lib/w32api/libpstorec.a and b/usr/lib/w32api/libpstorec.a differ diff --git a/usr/lib/w32api/libpstorsvc.a b/usr/lib/w32api/libpstorsvc.a index 051144771eb..9b3607f8188 100644 Binary files a/usr/lib/w32api/libpstorsvc.a and b/usr/lib/w32api/libpstorsvc.a differ diff --git a/usr/lib/w32api/libqmgr.a b/usr/lib/w32api/libqmgr.a index c188ef52a7f..dfc2cf2c238 100644 Binary files a/usr/lib/w32api/libqmgr.a and b/usr/lib/w32api/libqmgr.a differ diff --git a/usr/lib/w32api/libqosname.a b/usr/lib/w32api/libqosname.a index 1728dca1f4f..b3fc9741a09 100644 Binary files a/usr/lib/w32api/libqosname.a and b/usr/lib/w32api/libqosname.a differ diff --git a/usr/lib/w32api/libquartz.a b/usr/lib/w32api/libquartz.a index 6a9cf25e42d..3229b5bc867 100644 Binary files a/usr/lib/w32api/libquartz.a and b/usr/lib/w32api/libquartz.a differ diff --git a/usr/lib/w32api/libquery.a b/usr/lib/w32api/libquery.a index 60319b68151..af28cb8b0ac 100644 Binary files a/usr/lib/w32api/libquery.a and b/usr/lib/w32api/libquery.a differ diff --git a/usr/lib/w32api/libqutil.a b/usr/lib/w32api/libqutil.a index 2f598e1c1aa..af3eb0fcb85 100644 Binary files a/usr/lib/w32api/libqutil.a and b/usr/lib/w32api/libqutil.a differ diff --git a/usr/lib/w32api/libqwave.a b/usr/lib/w32api/libqwave.a index 52293dedd62..51a03789c76 100644 Binary files a/usr/lib/w32api/libqwave.a and b/usr/lib/w32api/libqwave.a differ diff --git a/usr/lib/w32api/librasadhlp.a b/usr/lib/w32api/librasadhlp.a index 3c7385e68a0..35f788da5b8 100644 Binary files a/usr/lib/w32api/librasadhlp.a and b/usr/lib/w32api/librasadhlp.a differ diff --git a/usr/lib/w32api/librasapi32.a b/usr/lib/w32api/librasapi32.a index 229a2f9e82b..4c35ec75bbf 100644 Binary files a/usr/lib/w32api/librasapi32.a and b/usr/lib/w32api/librasapi32.a differ diff --git a/usr/lib/w32api/librasauto.a b/usr/lib/w32api/librasauto.a index a8cfe4eeaca..a788d7d6fd0 100644 Binary files a/usr/lib/w32api/librasauto.a and b/usr/lib/w32api/librasauto.a differ diff --git a/usr/lib/w32api/libraschap.a b/usr/lib/w32api/libraschap.a index 77b655138b9..1fb066bc2e2 100644 Binary files a/usr/lib/w32api/libraschap.a and b/usr/lib/w32api/libraschap.a differ diff --git a/usr/lib/w32api/librasctrs.a b/usr/lib/w32api/librasctrs.a index d9fae3fe410..858713f9d01 100644 Binary files a/usr/lib/w32api/librasctrs.a and b/usr/lib/w32api/librasctrs.a differ diff --git a/usr/lib/w32api/librasdlg.a b/usr/lib/w32api/librasdlg.a index d45a319089c..099939d8714 100644 Binary files a/usr/lib/w32api/librasdlg.a and b/usr/lib/w32api/librasdlg.a differ diff --git a/usr/lib/w32api/librasman.a b/usr/lib/w32api/librasman.a index 01ef13a12d6..4da9843ecc2 100644 Binary files a/usr/lib/w32api/librasman.a and b/usr/lib/w32api/librasman.a differ diff --git a/usr/lib/w32api/librasmans.a b/usr/lib/w32api/librasmans.a index be872b76c8f..08793fafa73 100644 Binary files a/usr/lib/w32api/librasmans.a and b/usr/lib/w32api/librasmans.a differ diff --git a/usr/lib/w32api/librasmontr.a b/usr/lib/w32api/librasmontr.a index 121d309da3a..4e4af518e35 100644 Binary files a/usr/lib/w32api/librasmontr.a and b/usr/lib/w32api/librasmontr.a differ diff --git a/usr/lib/w32api/librasmxs.a b/usr/lib/w32api/librasmxs.a index e6db89758b2..c62f486f58a 100644 Binary files a/usr/lib/w32api/librasmxs.a and b/usr/lib/w32api/librasmxs.a differ diff --git a/usr/lib/w32api/librasppp.a b/usr/lib/w32api/librasppp.a index 5615c28addc..27edb5ae076 100644 Binary files a/usr/lib/w32api/librasppp.a and b/usr/lib/w32api/librasppp.a differ diff --git a/usr/lib/w32api/librasrad.a b/usr/lib/w32api/librasrad.a index 0ce376e1701..61681ece511 100644 Binary files a/usr/lib/w32api/librasrad.a and b/usr/lib/w32api/librasrad.a differ diff --git a/usr/lib/w32api/librassapi.a b/usr/lib/w32api/librassapi.a index 48bdba1db2e..fe046c7f27f 100644 Binary files a/usr/lib/w32api/librassapi.a and b/usr/lib/w32api/librassapi.a differ diff --git a/usr/lib/w32api/librasser.a b/usr/lib/w32api/librasser.a index 6c89bab482b..e10d75bab3c 100644 Binary files a/usr/lib/w32api/librasser.a and b/usr/lib/w32api/librasser.a differ diff --git a/usr/lib/w32api/librastapi.a b/usr/lib/w32api/librastapi.a index 9cba9e3dbf9..bdc55651da8 100644 Binary files a/usr/lib/w32api/librastapi.a and b/usr/lib/w32api/librastapi.a differ diff --git a/usr/lib/w32api/librastls.a b/usr/lib/w32api/librastls.a index 1f25b72164f..a0bdda3e7f8 100644 Binary files a/usr/lib/w32api/librastls.a and b/usr/lib/w32api/librastls.a differ diff --git a/usr/lib/w32api/librdpcfgex.a b/usr/lib/w32api/librdpcfgex.a index 6452d9a9f7a..e88a04b1659 100644 Binary files a/usr/lib/w32api/librdpcfgex.a and b/usr/lib/w32api/librdpcfgex.a differ diff --git a/usr/lib/w32api/librdpsnd.a b/usr/lib/w32api/librdpsnd.a index 6548b0a0e21..dc7ffed9a9d 100644 Binary files a/usr/lib/w32api/librdpsnd.a and b/usr/lib/w32api/librdpsnd.a differ diff --git a/usr/lib/w32api/librdpwsx.a b/usr/lib/w32api/librdpwsx.a index ba69b20b5bb..41b78aa5103 100644 Binary files a/usr/lib/w32api/librdpwsx.a and b/usr/lib/w32api/librdpwsx.a differ diff --git a/usr/lib/w32api/libregapi.a b/usr/lib/w32api/libregapi.a index b97c216d839..a6305a2b20a 100644 Binary files a/usr/lib/w32api/libregapi.a and b/usr/lib/w32api/libregapi.a differ diff --git a/usr/lib/w32api/libregsvc.a b/usr/lib/w32api/libregsvc.a index 2b37a21faa7..9745effb55d 100644 Binary files a/usr/lib/w32api/libregsvc.a and b/usr/lib/w32api/libregsvc.a differ diff --git a/usr/lib/w32api/libresutil.a b/usr/lib/w32api/libresutil.a index 10570279b9e..3faaa626920 100644 Binary files a/usr/lib/w32api/libresutil.a and b/usr/lib/w32api/libresutil.a differ diff --git a/usr/lib/w32api/libresutils.a b/usr/lib/w32api/libresutils.a index d5bb57e8d5d..8eb41c0bf2b 100644 Binary files a/usr/lib/w32api/libresutils.a and b/usr/lib/w32api/libresutils.a differ diff --git a/usr/lib/w32api/libriched20.a b/usr/lib/w32api/libriched20.a index e591f663ff2..815d9148184 100644 Binary files a/usr/lib/w32api/libriched20.a and b/usr/lib/w32api/libriched20.a differ diff --git a/usr/lib/w32api/librnr20.a b/usr/lib/w32api/librnr20.a index 58d209b5ef2..89135162e60 100644 Binary files a/usr/lib/w32api/librnr20.a and b/usr/lib/w32api/librnr20.a differ diff --git a/usr/lib/w32api/librometadata.a b/usr/lib/w32api/librometadata.a index 8763aa3fe21..cecbe40bfec 100644 Binary files a/usr/lib/w32api/librometadata.a and b/usr/lib/w32api/librometadata.a differ diff --git a/usr/lib/w32api/libroutetab.a b/usr/lib/w32api/libroutetab.a index 53b831f807c..cf3fc99ae9f 100644 Binary files a/usr/lib/w32api/libroutetab.a and b/usr/lib/w32api/libroutetab.a differ diff --git a/usr/lib/w32api/librpcdiag.a b/usr/lib/w32api/librpcdiag.a index ad527be1bf7..fa9cafa5f08 100644 Binary files a/usr/lib/w32api/librpcdiag.a and b/usr/lib/w32api/librpcdiag.a differ diff --git a/usr/lib/w32api/librpchttp.a b/usr/lib/w32api/librpchttp.a index 177522e5dc6..1d30932a65f 100644 Binary files a/usr/lib/w32api/librpchttp.a and b/usr/lib/w32api/librpchttp.a differ diff --git a/usr/lib/w32api/librpcns4.a b/usr/lib/w32api/librpcns4.a index 2c74b993315..7eb76890e87 100644 Binary files a/usr/lib/w32api/librpcns4.a and b/usr/lib/w32api/librpcns4.a differ diff --git a/usr/lib/w32api/librpcref.a b/usr/lib/w32api/librpcref.a index b9060d71013..57866524977 100644 Binary files a/usr/lib/w32api/librpcref.a and b/usr/lib/w32api/librpcref.a differ diff --git a/usr/lib/w32api/librpcrt4.a b/usr/lib/w32api/librpcrt4.a index a5ead330fcc..b59db313e76 100644 Binary files a/usr/lib/w32api/librpcrt4.a and b/usr/lib/w32api/librpcrt4.a differ diff --git a/usr/lib/w32api/librpcss.a b/usr/lib/w32api/librpcss.a index c54ca53fae9..2d680659223 100644 Binary files a/usr/lib/w32api/librpcss.a and b/usr/lib/w32api/librpcss.a differ diff --git a/usr/lib/w32api/librsaenh.a b/usr/lib/w32api/librsaenh.a index 4e9e78eabf3..f0e0866bb03 100644 Binary files a/usr/lib/w32api/librsaenh.a and b/usr/lib/w32api/librsaenh.a differ diff --git a/usr/lib/w32api/librstrtmgr.a b/usr/lib/w32api/librstrtmgr.a index a3a6eaaf77f..b39aae37135 100644 Binary files a/usr/lib/w32api/librstrtmgr.a and b/usr/lib/w32api/librstrtmgr.a differ diff --git a/usr/lib/w32api/librtm.a b/usr/lib/w32api/librtm.a index 9f0011baf59..92db19db053 100644 Binary files a/usr/lib/w32api/librtm.a and b/usr/lib/w32api/librtm.a differ diff --git a/usr/lib/w32api/librtutils.a b/usr/lib/w32api/librtutils.a index 5f32748fa7d..197d996fee7 100644 Binary files a/usr/lib/w32api/librtutils.a and b/usr/lib/w32api/librtutils.a differ diff --git a/usr/lib/w32api/libruntimeobject.a b/usr/lib/w32api/libruntimeobject.a index de9d5cbdd7c..a72df4d16b2 100644 Binary files a/usr/lib/w32api/libruntimeobject.a and b/usr/lib/w32api/libruntimeobject.a differ diff --git a/usr/lib/w32api/libsamlib.a b/usr/lib/w32api/libsamlib.a index 2d30f35becc..2dad758f700 100644 Binary files a/usr/lib/w32api/libsamlib.a and b/usr/lib/w32api/libsamlib.a differ diff --git a/usr/lib/w32api/libsamsrv.a b/usr/lib/w32api/libsamsrv.a index dd66c10aec5..ae38053ddda 100644 Binary files a/usr/lib/w32api/libsamsrv.a and b/usr/lib/w32api/libsamsrv.a differ diff --git a/usr/lib/w32api/libsapi.a b/usr/lib/w32api/libsapi.a index 3089aa1fa56..75068ca8ad3 100644 Binary files a/usr/lib/w32api/libsapi.a and b/usr/lib/w32api/libsapi.a differ diff --git a/usr/lib/w32api/libscarddlg.a b/usr/lib/w32api/libscarddlg.a index c1f771cd83a..1c4515077f6 100644 Binary files a/usr/lib/w32api/libscarddlg.a and b/usr/lib/w32api/libscarddlg.a differ diff --git a/usr/lib/w32api/libsccbase.a b/usr/lib/w32api/libsccbase.a index da6b3b22f7c..c643269bcd4 100644 Binary files a/usr/lib/w32api/libsccbase.a and b/usr/lib/w32api/libsccbase.a differ diff --git a/usr/lib/w32api/libscecli.a b/usr/lib/w32api/libscecli.a index 1f99457a99d..737c6621021 100644 Binary files a/usr/lib/w32api/libscecli.a and b/usr/lib/w32api/libscecli.a differ diff --git a/usr/lib/w32api/libscesrv.a b/usr/lib/w32api/libscesrv.a index e0709a4d805..b396a1bed0e 100644 Binary files a/usr/lib/w32api/libscesrv.a and b/usr/lib/w32api/libscesrv.a differ diff --git a/usr/lib/w32api/libschannel.a b/usr/lib/w32api/libschannel.a index b07a3d7c333..370a52783a6 100644 Binary files a/usr/lib/w32api/libschannel.a and b/usr/lib/w32api/libschannel.a differ diff --git a/usr/lib/w32api/libschedsvc.a b/usr/lib/w32api/libschedsvc.a index 40df7e8dd16..a151910c6fb 100644 Binary files a/usr/lib/w32api/libschedsvc.a and b/usr/lib/w32api/libschedsvc.a differ diff --git a/usr/lib/w32api/libsclgntfy.a b/usr/lib/w32api/libsclgntfy.a index 69d917bdec2..6537b1480e3 100644 Binary files a/usr/lib/w32api/libsclgntfy.a and b/usr/lib/w32api/libsclgntfy.a differ diff --git a/usr/lib/w32api/libscredir.a b/usr/lib/w32api/libscredir.a index 674fe626d4c..6471681f0b3 100644 Binary files a/usr/lib/w32api/libscredir.a and b/usr/lib/w32api/libscredir.a differ diff --git a/usr/lib/w32api/libscript.a b/usr/lib/w32api/libscript.a index 9e1b1dfcab8..ffde58c55f3 100644 Binary files a/usr/lib/w32api/libscript.a and b/usr/lib/w32api/libscript.a differ diff --git a/usr/lib/w32api/libscrnsave.a b/usr/lib/w32api/libscrnsave.a index 4091f84aa33..5277a2bae4b 100644 Binary files a/usr/lib/w32api/libscrnsave.a and b/usr/lib/w32api/libscrnsave.a differ diff --git a/usr/lib/w32api/libscrnsavw.a b/usr/lib/w32api/libscrnsavw.a index 0db266a8ee2..96bfdb5dd2c 100644 Binary files a/usr/lib/w32api/libscrnsavw.a and b/usr/lib/w32api/libscrnsavw.a differ diff --git a/usr/lib/w32api/libscrobj.a b/usr/lib/w32api/libscrobj.a index ddda75925c1..3c01d39731e 100644 Binary files a/usr/lib/w32api/libscrobj.a and b/usr/lib/w32api/libscrobj.a differ diff --git a/usr/lib/w32api/libscrrun.a b/usr/lib/w32api/libscrrun.a index e288cfa759b..1525c509ed3 100644 Binary files a/usr/lib/w32api/libscrrun.a and b/usr/lib/w32api/libscrrun.a differ diff --git a/usr/lib/w32api/libsdhcinst.a b/usr/lib/w32api/libsdhcinst.a index 9df754212fa..96c385e4ac1 100644 Binary files a/usr/lib/w32api/libsdhcinst.a and b/usr/lib/w32api/libsdhcinst.a differ diff --git a/usr/lib/w32api/libseclogon.a b/usr/lib/w32api/libseclogon.a index 43d9b9ca0e5..2122dd5862e 100644 Binary files a/usr/lib/w32api/libseclogon.a and b/usr/lib/w32api/libseclogon.a differ diff --git a/usr/lib/w32api/libsecur32.a b/usr/lib/w32api/libsecur32.a index 81b9eba4a63..44170e49c10 100644 Binary files a/usr/lib/w32api/libsecur32.a and b/usr/lib/w32api/libsecur32.a differ diff --git a/usr/lib/w32api/libsecurity.a b/usr/lib/w32api/libsecurity.a index 9e5a013a167..6e540fe1a53 100644 Binary files a/usr/lib/w32api/libsecurity.a and b/usr/lib/w32api/libsecurity.a differ diff --git a/usr/lib/w32api/libsens.a b/usr/lib/w32api/libsens.a index b56983b94cd..767e8fa4472 100644 Binary files a/usr/lib/w32api/libsens.a and b/usr/lib/w32api/libsens.a differ diff --git a/usr/lib/w32api/libsensapi.a b/usr/lib/w32api/libsensapi.a index f06b66415a9..0ba9ecc0742 100644 Binary files a/usr/lib/w32api/libsensapi.a and b/usr/lib/w32api/libsensapi.a differ diff --git a/usr/lib/w32api/libsenscfg.a b/usr/lib/w32api/libsenscfg.a index c8f4dadd539..2deac12b51d 100644 Binary files a/usr/lib/w32api/libsenscfg.a and b/usr/lib/w32api/libsenscfg.a differ diff --git a/usr/lib/w32api/libsensorsapi.a b/usr/lib/w32api/libsensorsapi.a index e9bc4ffd1b0..ba7fa62ff07 100644 Binary files a/usr/lib/w32api/libsensorsapi.a and b/usr/lib/w32api/libsensorsapi.a differ diff --git a/usr/lib/w32api/libseo.a b/usr/lib/w32api/libseo.a index edb50690542..9f8e6738d3e 100644 Binary files a/usr/lib/w32api/libseo.a and b/usr/lib/w32api/libseo.a differ diff --git a/usr/lib/w32api/libserialui.a b/usr/lib/w32api/libserialui.a index 3ad25bbd057..ddfa0a524eb 100644 Binary files a/usr/lib/w32api/libserialui.a and b/usr/lib/w32api/libserialui.a differ diff --git a/usr/lib/w32api/libserwvdrv.a b/usr/lib/w32api/libserwvdrv.a index aea474f9189..60637b56698 100644 Binary files a/usr/lib/w32api/libserwvdrv.a and b/usr/lib/w32api/libserwvdrv.a differ diff --git a/usr/lib/w32api/libsetupapi.a b/usr/lib/w32api/libsetupapi.a index c002f2b277b..b3e02b5d38c 100644 Binary files a/usr/lib/w32api/libsetupapi.a and b/usr/lib/w32api/libsetupapi.a differ diff --git a/usr/lib/w32api/libsetupqry.a b/usr/lib/w32api/libsetupqry.a index a32855218af..fe8da5dbf47 100644 Binary files a/usr/lib/w32api/libsetupqry.a and b/usr/lib/w32api/libsetupqry.a differ diff --git a/usr/lib/w32api/libsfc.a b/usr/lib/w32api/libsfc.a index 73732987b95..cbff7654644 100644 Binary files a/usr/lib/w32api/libsfc.a and b/usr/lib/w32api/libsfc.a differ diff --git a/usr/lib/w32api/libsfc_os.a b/usr/lib/w32api/libsfc_os.a index bc16160b021..2a50b5e0fd1 100644 Binary files a/usr/lib/w32api/libsfc_os.a and b/usr/lib/w32api/libsfc_os.a differ diff --git a/usr/lib/w32api/libsfcfiles.a b/usr/lib/w32api/libsfcfiles.a index 24a8d0cf946..e777345d2c9 100644 Binary files a/usr/lib/w32api/libsfcfiles.a and b/usr/lib/w32api/libsfcfiles.a differ diff --git a/usr/lib/w32api/libsfmapi.a b/usr/lib/w32api/libsfmapi.a index abb05f9e8b7..d06fc925152 100644 Binary files a/usr/lib/w32api/libsfmapi.a and b/usr/lib/w32api/libsfmapi.a differ diff --git a/usr/lib/w32api/libshcore.a b/usr/lib/w32api/libshcore.a index 529c9108bf4..c591052e5f8 100644 Binary files a/usr/lib/w32api/libshcore.a and b/usr/lib/w32api/libshcore.a differ diff --git a/usr/lib/w32api/libshdocvw.a b/usr/lib/w32api/libshdocvw.a index 5c95d8f408e..2f6d41716a7 100644 Binary files a/usr/lib/w32api/libshdocvw.a and b/usr/lib/w32api/libshdocvw.a differ diff --git a/usr/lib/w32api/libshell32.a b/usr/lib/w32api/libshell32.a index ca4e36009ad..7c5d806d014 100644 Binary files a/usr/lib/w32api/libshell32.a and b/usr/lib/w32api/libshell32.a differ diff --git a/usr/lib/w32api/libshfolder.a b/usr/lib/w32api/libshfolder.a index a2bebc1532d..c15c58c479f 100644 Binary files a/usr/lib/w32api/libshfolder.a and b/usr/lib/w32api/libshfolder.a differ diff --git a/usr/lib/w32api/libshimeng.a b/usr/lib/w32api/libshimeng.a index 6d5c8e25b09..f147a6cdcd2 100644 Binary files a/usr/lib/w32api/libshimeng.a and b/usr/lib/w32api/libshimeng.a differ diff --git a/usr/lib/w32api/libshimgvw.a b/usr/lib/w32api/libshimgvw.a index 25d3366e7fe..03ffbf4630f 100644 Binary files a/usr/lib/w32api/libshimgvw.a and b/usr/lib/w32api/libshimgvw.a differ diff --git a/usr/lib/w32api/libshlwapi.a b/usr/lib/w32api/libshlwapi.a index d2a37694372..62773ecb97a 100644 Binary files a/usr/lib/w32api/libshlwapi.a and b/usr/lib/w32api/libshlwapi.a differ diff --git a/usr/lib/w32api/libshscrap.a b/usr/lib/w32api/libshscrap.a index f278cfe3499..024cd953614 100644 Binary files a/usr/lib/w32api/libshscrap.a and b/usr/lib/w32api/libshscrap.a differ diff --git a/usr/lib/w32api/libshsvcs.a b/usr/lib/w32api/libshsvcs.a index 17634695722..ca287566b12 100644 Binary files a/usr/lib/w32api/libshsvcs.a and b/usr/lib/w32api/libshsvcs.a differ diff --git a/usr/lib/w32api/libsigtab.a b/usr/lib/w32api/libsigtab.a index 568d3708517..879105a5a85 100644 Binary files a/usr/lib/w32api/libsigtab.a and b/usr/lib/w32api/libsigtab.a differ diff --git a/usr/lib/w32api/libsisbkup.a b/usr/lib/w32api/libsisbkup.a index 638b05fe959..3d798e55fc3 100644 Binary files a/usr/lib/w32api/libsisbkup.a and b/usr/lib/w32api/libsisbkup.a differ diff --git a/usr/lib/w32api/libskdll.a b/usr/lib/w32api/libskdll.a index a5f54d00312..a772a2c0518 100644 Binary files a/usr/lib/w32api/libskdll.a and b/usr/lib/w32api/libskdll.a differ diff --git a/usr/lib/w32api/libslbcsp.a b/usr/lib/w32api/libslbcsp.a index 3df673087d6..fc2d614d3e5 100644 Binary files a/usr/lib/w32api/libslbcsp.a and b/usr/lib/w32api/libslbcsp.a differ diff --git a/usr/lib/w32api/libslc.a b/usr/lib/w32api/libslc.a index 2edd61f5be2..3abdf6cba0b 100644 Binary files a/usr/lib/w32api/libslc.a and b/usr/lib/w32api/libslc.a differ diff --git a/usr/lib/w32api/libslcext.a b/usr/lib/w32api/libslcext.a index b916364126f..ad774327f98 100644 Binary files a/usr/lib/w32api/libslcext.a and b/usr/lib/w32api/libslcext.a differ diff --git a/usr/lib/w32api/libslwga.a b/usr/lib/w32api/libslwga.a index a2c4c6cc2ad..0860ff70753 100644 Binary files a/usr/lib/w32api/libslwga.a and b/usr/lib/w32api/libslwga.a differ diff --git a/usr/lib/w32api/libsmtpapi.a b/usr/lib/w32api/libsmtpapi.a index ac77b756baf..b9d0683f0c5 100644 Binary files a/usr/lib/w32api/libsmtpapi.a and b/usr/lib/w32api/libsmtpapi.a differ diff --git a/usr/lib/w32api/libsmtpctrs.a b/usr/lib/w32api/libsmtpctrs.a index dcf5327e7a3..72422122118 100644 Binary files a/usr/lib/w32api/libsmtpctrs.a and b/usr/lib/w32api/libsmtpctrs.a differ diff --git a/usr/lib/w32api/libsnmpapi.a b/usr/lib/w32api/libsnmpapi.a index 84cbfe8c56e..6853c570648 100644 Binary files a/usr/lib/w32api/libsnmpapi.a and b/usr/lib/w32api/libsnmpapi.a differ diff --git a/usr/lib/w32api/libsnmpmib.a b/usr/lib/w32api/libsnmpmib.a index 2510a00ab45..a577501708c 100644 Binary files a/usr/lib/w32api/libsnmpmib.a and b/usr/lib/w32api/libsnmpmib.a differ diff --git a/usr/lib/w32api/libsnprfdll.a b/usr/lib/w32api/libsnprfdll.a index 6f3b42a46f0..12e346a979b 100644 Binary files a/usr/lib/w32api/libsnprfdll.a and b/usr/lib/w32api/libsnprfdll.a differ diff --git a/usr/lib/w32api/libsoftpub.a b/usr/lib/w32api/libsoftpub.a index 1b1f77cbd4f..3859095e14b 100644 Binary files a/usr/lib/w32api/libsoftpub.a and b/usr/lib/w32api/libsoftpub.a differ diff --git a/usr/lib/w32api/libspoolss.a b/usr/lib/w32api/libspoolss.a index 323d652001d..e3bc2e54234 100644 Binary files a/usr/lib/w32api/libspoolss.a and b/usr/lib/w32api/libspoolss.a differ diff --git a/usr/lib/w32api/libsqlsrv32.a b/usr/lib/w32api/libsqlsrv32.a index a24177585c6..9ff0039044f 100644 Binary files a/usr/lib/w32api/libsqlsrv32.a and b/usr/lib/w32api/libsqlsrv32.a differ diff --git a/usr/lib/w32api/libsqlxmlx.a b/usr/lib/w32api/libsqlxmlx.a index 0dc5eefeb8b..83a75646705 100644 Binary files a/usr/lib/w32api/libsqlxmlx.a and b/usr/lib/w32api/libsqlxmlx.a differ diff --git a/usr/lib/w32api/libsrchctls.a b/usr/lib/w32api/libsrchctls.a index 560e40e177b..cfe0ebf5163 100644 Binary files a/usr/lib/w32api/libsrchctls.a and b/usr/lib/w32api/libsrchctls.a differ diff --git a/usr/lib/w32api/libsrclient.a b/usr/lib/w32api/libsrclient.a index 80a9a105d5e..90279ea08d9 100644 Binary files a/usr/lib/w32api/libsrclient.a and b/usr/lib/w32api/libsrclient.a differ diff --git a/usr/lib/w32api/libsrrstr.a b/usr/lib/w32api/libsrrstr.a index 7dc89f4206b..68c94081005 100644 Binary files a/usr/lib/w32api/libsrrstr.a and b/usr/lib/w32api/libsrrstr.a differ diff --git a/usr/lib/w32api/libsrvsvc.a b/usr/lib/w32api/libsrvsvc.a index 2b7158e3d3c..9b47a20b2ba 100644 Binary files a/usr/lib/w32api/libsrvsvc.a and b/usr/lib/w32api/libsrvsvc.a differ diff --git a/usr/lib/w32api/libssdpapi.a b/usr/lib/w32api/libssdpapi.a index d6383b0d22c..73c0f35acc3 100644 Binary files a/usr/lib/w32api/libssdpapi.a and b/usr/lib/w32api/libssdpapi.a differ diff --git a/usr/lib/w32api/libssinc.a b/usr/lib/w32api/libssinc.a index 6ea7c5ffb4f..0f009f76e6f 100644 Binary files a/usr/lib/w32api/libssinc.a and b/usr/lib/w32api/libssinc.a differ diff --git a/usr/lib/w32api/libsspicli.a b/usr/lib/w32api/libsspicli.a index 0093b2a2c7a..baeae15ea2a 100644 Binary files a/usr/lib/w32api/libsspicli.a and b/usr/lib/w32api/libsspicli.a differ diff --git a/usr/lib/w32api/libstaxmem.a b/usr/lib/w32api/libstaxmem.a index 74a1eb39849..ac93d4d8a47 100644 Binary files a/usr/lib/w32api/libstaxmem.a and b/usr/lib/w32api/libstaxmem.a differ diff --git a/usr/lib/w32api/libsti.a b/usr/lib/w32api/libsti.a index 306d973b904..4f04e24797b 100644 Binary files a/usr/lib/w32api/libsti.a and b/usr/lib/w32api/libsti.a differ diff --git a/usr/lib/w32api/libsti_ci.a b/usr/lib/w32api/libsti_ci.a index 554e17094ed..075de2e2205 100644 Binary files a/usr/lib/w32api/libsti_ci.a and b/usr/lib/w32api/libsti_ci.a differ diff --git a/usr/lib/w32api/libstorprop.a b/usr/lib/w32api/libstorprop.a index cab8eab2e1a..acd49e0f9d7 100644 Binary files a/usr/lib/w32api/libstorprop.a and b/usr/lib/w32api/libstorprop.a differ diff --git a/usr/lib/w32api/libstreamci.a b/usr/lib/w32api/libstreamci.a index e0fcf5a9566..246c1bc51cb 100644 Binary files a/usr/lib/w32api/libstreamci.a and b/usr/lib/w32api/libstreamci.a differ diff --git a/usr/lib/w32api/libstrmfilt.a b/usr/lib/w32api/libstrmfilt.a index 147ca69ae98..cb61ec277b5 100644 Binary files a/usr/lib/w32api/libstrmfilt.a and b/usr/lib/w32api/libstrmfilt.a differ diff --git a/usr/lib/w32api/libstrmiids.a b/usr/lib/w32api/libstrmiids.a index 59d09db87c5..b732fa8debc 100644 Binary files a/usr/lib/w32api/libstrmiids.a and b/usr/lib/w32api/libstrmiids.a differ diff --git a/usr/lib/w32api/libsvcpack.a b/usr/lib/w32api/libsvcpack.a index 7beb56550a5..9555c06c978 100644 Binary files a/usr/lib/w32api/libsvcpack.a and b/usr/lib/w32api/libsvcpack.a differ diff --git a/usr/lib/w32api/libsxs.a b/usr/lib/w32api/libsxs.a index 1bea36d44a7..11d6eab205e 100644 Binary files a/usr/lib/w32api/libsxs.a and b/usr/lib/w32api/libsxs.a differ diff --git a/usr/lib/w32api/libsynceng.a b/usr/lib/w32api/libsynceng.a index 23c109e0d2d..f35f7a7f475 100644 Binary files a/usr/lib/w32api/libsynceng.a and b/usr/lib/w32api/libsynceng.a differ diff --git a/usr/lib/w32api/libsynchronization.a b/usr/lib/w32api/libsynchronization.a index 52bd25614f0..a196deebea2 100644 Binary files a/usr/lib/w32api/libsynchronization.a and b/usr/lib/w32api/libsynchronization.a differ diff --git a/usr/lib/w32api/libsyncui.a b/usr/lib/w32api/libsyncui.a index 9512de2fc13..311511f2cdc 100644 Binary files a/usr/lib/w32api/libsyncui.a and b/usr/lib/w32api/libsyncui.a differ diff --git a/usr/lib/w32api/libsysinv.a b/usr/lib/w32api/libsysinv.a index b91cb32b715..5dcd00dfca6 100644 Binary files a/usr/lib/w32api/libsysinv.a and b/usr/lib/w32api/libsysinv.a differ diff --git a/usr/lib/w32api/libsysmod.a b/usr/lib/w32api/libsysmod.a index c153eeca150..48922e0b9ff 100644 Binary files a/usr/lib/w32api/libsysmod.a and b/usr/lib/w32api/libsysmod.a differ diff --git a/usr/lib/w32api/libsyssetup.a b/usr/lib/w32api/libsyssetup.a index 33ec64c1e1e..b48f7cf5cad 100644 Binary files a/usr/lib/w32api/libsyssetup.a and b/usr/lib/w32api/libsyssetup.a differ diff --git a/usr/lib/w32api/libt2embed.a b/usr/lib/w32api/libt2embed.a index fc6da7de017..44900f72e21 100644 Binary files a/usr/lib/w32api/libt2embed.a and b/usr/lib/w32api/libt2embed.a differ diff --git a/usr/lib/w32api/libtapi32.a b/usr/lib/w32api/libtapi32.a index 086d2c78d22..651ca9c8b3e 100644 Binary files a/usr/lib/w32api/libtapi32.a and b/usr/lib/w32api/libtapi32.a differ diff --git a/usr/lib/w32api/libtapiperf.a b/usr/lib/w32api/libtapiperf.a index 7817baf9314..b88bb048758 100644 Binary files a/usr/lib/w32api/libtapiperf.a and b/usr/lib/w32api/libtapiperf.a differ diff --git a/usr/lib/w32api/libtaskschd.a b/usr/lib/w32api/libtaskschd.a index 268269f81b4..24544337388 100644 Binary files a/usr/lib/w32api/libtaskschd.a and b/usr/lib/w32api/libtaskschd.a differ diff --git a/usr/lib/w32api/libtbs.a b/usr/lib/w32api/libtbs.a index ba92a2424de..80afec8cf81 100644 Binary files a/usr/lib/w32api/libtbs.a and b/usr/lib/w32api/libtbs.a differ diff --git a/usr/lib/w32api/libtcpmib.a b/usr/lib/w32api/libtcpmib.a index d672b085a0a..1b7545bdd5a 100644 Binary files a/usr/lib/w32api/libtcpmib.a and b/usr/lib/w32api/libtcpmib.a differ diff --git a/usr/lib/w32api/libtdh.a b/usr/lib/w32api/libtdh.a index 8d033d2e56f..8b59cc60138 100644 Binary files a/usr/lib/w32api/libtdh.a and b/usr/lib/w32api/libtdh.a differ diff --git a/usr/lib/w32api/libtraffic.a b/usr/lib/w32api/libtraffic.a index cfc929822b1..c196f48b599 100644 Binary files a/usr/lib/w32api/libtraffic.a and b/usr/lib/w32api/libtraffic.a differ diff --git a/usr/lib/w32api/libtsappcmp.a b/usr/lib/w32api/libtsappcmp.a index f4b4a74aa08..5dc42739a35 100644 Binary files a/usr/lib/w32api/libtsappcmp.a and b/usr/lib/w32api/libtsappcmp.a differ diff --git a/usr/lib/w32api/libtsbyuv.a b/usr/lib/w32api/libtsbyuv.a index 2eff4d331f2..4a05b8d1953 100644 Binary files a/usr/lib/w32api/libtsbyuv.a and b/usr/lib/w32api/libtsbyuv.a differ diff --git a/usr/lib/w32api/libtsd32.a b/usr/lib/w32api/libtsd32.a index ddf687bbb5f..07fb4f63b12 100644 Binary files a/usr/lib/w32api/libtsd32.a and b/usr/lib/w32api/libtsd32.a differ diff --git a/usr/lib/w32api/libtsoc.a b/usr/lib/w32api/libtsoc.a index 2b93308c059..5ea878679f8 100644 Binary files a/usr/lib/w32api/libtsoc.a and b/usr/lib/w32api/libtsoc.a differ diff --git a/usr/lib/w32api/libtxfw32.a b/usr/lib/w32api/libtxfw32.a index 308b0b47bda..b4fb9a24864 100644 Binary files a/usr/lib/w32api/libtxfw32.a and b/usr/lib/w32api/libtxfw32.a differ diff --git a/usr/lib/w32api/libudhisapi.a b/usr/lib/w32api/libudhisapi.a index faefdd99df2..e4be7bf4789 100644 Binary files a/usr/lib/w32api/libudhisapi.a and b/usr/lib/w32api/libudhisapi.a differ diff --git a/usr/lib/w32api/libufat.a b/usr/lib/w32api/libufat.a index 32ec21f6418..f2881e3d3cd 100644 Binary files a/usr/lib/w32api/libufat.a and b/usr/lib/w32api/libufat.a differ diff --git a/usr/lib/w32api/libuiautomationcore.a b/usr/lib/w32api/libuiautomationcore.a index 08f38e6aa2e..8cb97cbcd2b 100644 Binary files a/usr/lib/w32api/libuiautomationcore.a and b/usr/lib/w32api/libuiautomationcore.a differ diff --git a/usr/lib/w32api/libumandlg.a b/usr/lib/w32api/libumandlg.a index ac74f2e91c4..71d844094f9 100644 Binary files a/usr/lib/w32api/libumandlg.a and b/usr/lib/w32api/libumandlg.a differ diff --git a/usr/lib/w32api/libumdmxfrm.a b/usr/lib/w32api/libumdmxfrm.a index 89a0a85dc9c..97fa67480bc 100644 Binary files a/usr/lib/w32api/libumdmxfrm.a and b/usr/lib/w32api/libumdmxfrm.a differ diff --git a/usr/lib/w32api/libumpnpmgr.a b/usr/lib/w32api/libumpnpmgr.a index 1b6e5f7bfe1..75a54012f52 100644 Binary files a/usr/lib/w32api/libumpnpmgr.a and b/usr/lib/w32api/libumpnpmgr.a differ diff --git a/usr/lib/w32api/libuniime.a b/usr/lib/w32api/libuniime.a index 9f58d14924b..2876ac9d8b2 100644 Binary files a/usr/lib/w32api/libuniime.a and b/usr/lib/w32api/libuniime.a differ diff --git a/usr/lib/w32api/libunimdmat.a b/usr/lib/w32api/libunimdmat.a index 9d9f0f1a076..a25f376afe9 100644 Binary files a/usr/lib/w32api/libunimdmat.a and b/usr/lib/w32api/libunimdmat.a differ diff --git a/usr/lib/w32api/libuniplat.a b/usr/lib/w32api/libuniplat.a index abfae5414cc..e0df02acd2a 100644 Binary files a/usr/lib/w32api/libuniplat.a and b/usr/lib/w32api/libuniplat.a differ diff --git a/usr/lib/w32api/libuntfs.a b/usr/lib/w32api/libuntfs.a index 6ef8fcaafc6..699e6d4b086 100644 Binary files a/usr/lib/w32api/libuntfs.a and b/usr/lib/w32api/libuntfs.a differ diff --git a/usr/lib/w32api/libupnp.a b/usr/lib/w32api/libupnp.a index c4e7ce2630b..f5a0baf8aae 100644 Binary files a/usr/lib/w32api/libupnp.a and b/usr/lib/w32api/libupnp.a differ diff --git a/usr/lib/w32api/libupnpui.a b/usr/lib/w32api/libupnpui.a index f16bc36ed08..b1e3e137654 100644 Binary files a/usr/lib/w32api/libupnpui.a and b/usr/lib/w32api/libupnpui.a differ diff --git a/usr/lib/w32api/liburl.a b/usr/lib/w32api/liburl.a index 852f556cdba..206297f8fdf 100644 Binary files a/usr/lib/w32api/liburl.a and b/usr/lib/w32api/liburl.a differ diff --git a/usr/lib/w32api/liburlauth.a b/usr/lib/w32api/liburlauth.a index ccf13e7b4cb..579ea6559e8 100644 Binary files a/usr/lib/w32api/liburlauth.a and b/usr/lib/w32api/liburlauth.a differ diff --git a/usr/lib/w32api/liburlmon.a b/usr/lib/w32api/liburlmon.a index a0843441b64..61a715d792e 100644 Binary files a/usr/lib/w32api/liburlmon.a and b/usr/lib/w32api/liburlmon.a differ diff --git a/usr/lib/w32api/libusbcamd2.a b/usr/lib/w32api/libusbcamd2.a index 199a03af7ab..fdf29da23ee 100644 Binary files a/usr/lib/w32api/libusbcamd2.a and b/usr/lib/w32api/libusbcamd2.a differ diff --git a/usr/lib/w32api/libusbd.a b/usr/lib/w32api/libusbd.a index 0c1d672efe9..b242391380a 100644 Binary files a/usr/lib/w32api/libusbd.a and b/usr/lib/w32api/libusbd.a differ diff --git a/usr/lib/w32api/libusbport.a b/usr/lib/w32api/libusbport.a index f7be6626cf0..0f982be3af0 100644 Binary files a/usr/lib/w32api/libusbport.a and b/usr/lib/w32api/libusbport.a differ diff --git a/usr/lib/w32api/libuser32.a b/usr/lib/w32api/libuser32.a index 5fdb9fb498f..04fe2265dd4 100644 Binary files a/usr/lib/w32api/libuser32.a and b/usr/lib/w32api/libuser32.a differ diff --git a/usr/lib/w32api/libuserenv.a b/usr/lib/w32api/libuserenv.a index de34b60512e..47c79ec3b66 100644 Binary files a/usr/lib/w32api/libuserenv.a and b/usr/lib/w32api/libuserenv.a differ diff --git a/usr/lib/w32api/libusp10.a b/usr/lib/w32api/libusp10.a index 2bddddf8198..e1b14fe0ac8 100644 Binary files a/usr/lib/w32api/libusp10.a and b/usr/lib/w32api/libusp10.a differ diff --git a/usr/lib/w32api/libutildll.a b/usr/lib/w32api/libutildll.a index 9a09175d2b2..a0c67ec3116 100644 Binary files a/usr/lib/w32api/libutildll.a and b/usr/lib/w32api/libutildll.a differ diff --git a/usr/lib/w32api/libuuid.a b/usr/lib/w32api/libuuid.a index d6aa4523f7d..07b547b95d1 100644 Binary files a/usr/lib/w32api/libuuid.a and b/usr/lib/w32api/libuuid.a differ diff --git a/usr/lib/w32api/libuxtheme.a b/usr/lib/w32api/libuxtheme.a index 3398e31ea8a..d09b6ae82ec 100644 Binary files a/usr/lib/w32api/libuxtheme.a and b/usr/lib/w32api/libuxtheme.a differ diff --git a/usr/lib/w32api/libvdsutil.a b/usr/lib/w32api/libvdsutil.a index 08348067ea2..20a41e703f8 100644 Binary files a/usr/lib/w32api/libvdsutil.a and b/usr/lib/w32api/libvdsutil.a differ diff --git a/usr/lib/w32api/libverifier.a b/usr/lib/w32api/libverifier.a index 4adc3acaf75..6c2a9c28082 100644 Binary files a/usr/lib/w32api/libverifier.a and b/usr/lib/w32api/libverifier.a differ diff --git a/usr/lib/w32api/libversion.a b/usr/lib/w32api/libversion.a index a31a27747ef..70a582b0c06 100644 Binary files a/usr/lib/w32api/libversion.a and b/usr/lib/w32api/libversion.a differ diff --git a/usr/lib/w32api/libvfw32.a b/usr/lib/w32api/libvfw32.a index 10cf3c32b67..8b471915197 100644 Binary files a/usr/lib/w32api/libvfw32.a and b/usr/lib/w32api/libvfw32.a differ diff --git a/usr/lib/w32api/libvgx.a b/usr/lib/w32api/libvgx.a index a0a501758d9..5ebd3d6213f 100644 Binary files a/usr/lib/w32api/libvgx.a and b/usr/lib/w32api/libvgx.a differ diff --git a/usr/lib/w32api/libvirtdisk.a b/usr/lib/w32api/libvirtdisk.a index 80303b80ebd..df85d625111 100644 Binary files a/usr/lib/w32api/libvirtdisk.a and b/usr/lib/w32api/libvirtdisk.a differ diff --git a/usr/lib/w32api/libvmx_mode.a b/usr/lib/w32api/libvmx_mode.a index eff4d368ca6..66d01edc500 100644 Binary files a/usr/lib/w32api/libvmx_mode.a and b/usr/lib/w32api/libvmx_mode.a differ diff --git a/usr/lib/w32api/libvssapi.a b/usr/lib/w32api/libvssapi.a index 58ea4987212..23e3059440f 100644 Binary files a/usr/lib/w32api/libvssapi.a and b/usr/lib/w32api/libvssapi.a differ diff --git a/usr/lib/w32api/libw32time.a b/usr/lib/w32api/libw32time.a index 0564be3b0d6..9a55e87c892 100644 Binary files a/usr/lib/w32api/libw32time.a and b/usr/lib/w32api/libw32time.a differ diff --git a/usr/lib/w32api/libw32topl.a b/usr/lib/w32api/libw32topl.a index 93563554d8a..cefe7f95bc4 100644 Binary files a/usr/lib/w32api/libw32topl.a and b/usr/lib/w32api/libw32topl.a differ diff --git a/usr/lib/w32api/libw3core.a b/usr/lib/w32api/libw3core.a index 830b49a5899..4a85a715a88 100644 Binary files a/usr/lib/w32api/libw3core.a and b/usr/lib/w32api/libw3core.a differ diff --git a/usr/lib/w32api/libw3ctrs.a b/usr/lib/w32api/libw3ctrs.a index def6c22cd7f..0d54994f8c9 100644 Binary files a/usr/lib/w32api/libw3ctrs.a and b/usr/lib/w32api/libw3ctrs.a differ diff --git a/usr/lib/w32api/libw3dt.a b/usr/lib/w32api/libw3dt.a index ffac77b68e4..2d7cce02067 100644 Binary files a/usr/lib/w32api/libw3dt.a and b/usr/lib/w32api/libw3dt.a differ diff --git a/usr/lib/w32api/libw3isapi.a b/usr/lib/w32api/libw3isapi.a index 57e4d86d3f0..97feae53768 100644 Binary files a/usr/lib/w32api/libw3isapi.a and b/usr/lib/w32api/libw3isapi.a differ diff --git a/usr/lib/w32api/libw3ssl.a b/usr/lib/w32api/libw3ssl.a index c8e83d7a390..0e7eaabf8d3 100644 Binary files a/usr/lib/w32api/libw3ssl.a and b/usr/lib/w32api/libw3ssl.a differ diff --git a/usr/lib/w32api/libw3tp.a b/usr/lib/w32api/libw3tp.a index 59c70be564d..3080cb7f032 100644 Binary files a/usr/lib/w32api/libw3tp.a and b/usr/lib/w32api/libw3tp.a differ diff --git a/usr/lib/w32api/libwab32.a b/usr/lib/w32api/libwab32.a index 25aa78c48cd..79fc4684ec3 100644 Binary files a/usr/lib/w32api/libwab32.a and b/usr/lib/w32api/libwab32.a differ diff --git a/usr/lib/w32api/libwabimp.a b/usr/lib/w32api/libwabimp.a index 923d5ee80b0..39dd1264a6a 100644 Binary files a/usr/lib/w32api/libwabimp.a and b/usr/lib/w32api/libwabimp.a differ diff --git a/usr/lib/w32api/libwamreg.a b/usr/lib/w32api/libwamreg.a index c8110d4506c..18d0378857d 100644 Binary files a/usr/lib/w32api/libwamreg.a and b/usr/lib/w32api/libwamreg.a differ diff --git a/usr/lib/w32api/libwbemcore.a b/usr/lib/w32api/libwbemcore.a index 6b0f6db0f15..8eeb4a6706a 100644 Binary files a/usr/lib/w32api/libwbemcore.a and b/usr/lib/w32api/libwbemcore.a differ diff --git a/usr/lib/w32api/libwbemupgd.a b/usr/lib/w32api/libwbemupgd.a index 98167516a4c..80dfcd56d85 100644 Binary files a/usr/lib/w32api/libwbemupgd.a and b/usr/lib/w32api/libwbemupgd.a differ diff --git a/usr/lib/w32api/libwbemuuid.a b/usr/lib/w32api/libwbemuuid.a index ffb8810a465..df46bc0644f 100644 Binary files a/usr/lib/w32api/libwbemuuid.a and b/usr/lib/w32api/libwbemuuid.a differ diff --git a/usr/lib/w32api/libwdigest.a b/usr/lib/w32api/libwdigest.a index e88333bc9e9..8a987ebdcf6 100644 Binary files a/usr/lib/w32api/libwdigest.a and b/usr/lib/w32api/libwdigest.a differ diff --git a/usr/lib/w32api/libwdmaud.a b/usr/lib/w32api/libwdmaud.a index 2103f5d5f05..46047d087fe 100644 Binary files a/usr/lib/w32api/libwdmaud.a and b/usr/lib/w32api/libwdmaud.a differ diff --git a/usr/lib/w32api/libwdsclient.a b/usr/lib/w32api/libwdsclient.a index 36b48b09ce1..d8967bcf332 100644 Binary files a/usr/lib/w32api/libwdsclient.a and b/usr/lib/w32api/libwdsclient.a differ diff --git a/usr/lib/w32api/libwdsclientapi.a b/usr/lib/w32api/libwdsclientapi.a index 5658439e10d..1929b873c29 100644 Binary files a/usr/lib/w32api/libwdsclientapi.a and b/usr/lib/w32api/libwdsclientapi.a differ diff --git a/usr/lib/w32api/libwdscore.a b/usr/lib/w32api/libwdscore.a index e8b155b006d..6a452cc84d0 100644 Binary files a/usr/lib/w32api/libwdscore.a and b/usr/lib/w32api/libwdscore.a differ diff --git a/usr/lib/w32api/libwdscsl.a b/usr/lib/w32api/libwdscsl.a index 77d17d4d6c4..5ee60b34567 100644 Binary files a/usr/lib/w32api/libwdscsl.a and b/usr/lib/w32api/libwdscsl.a differ diff --git a/usr/lib/w32api/libwdsimage.a b/usr/lib/w32api/libwdsimage.a index 6e0235edabd..c31f77ea6ac 100644 Binary files a/usr/lib/w32api/libwdsimage.a and b/usr/lib/w32api/libwdsimage.a differ diff --git a/usr/lib/w32api/libwdstptc.a b/usr/lib/w32api/libwdstptc.a index f3be84a74c5..c1546b3cb52 100644 Binary files a/usr/lib/w32api/libwdstptc.a and b/usr/lib/w32api/libwdstptc.a differ diff --git a/usr/lib/w32api/libwdsupgcompl.a b/usr/lib/w32api/libwdsupgcompl.a index 3b9099922fc..0407c08a9ef 100644 Binary files a/usr/lib/w32api/libwdsupgcompl.a and b/usr/lib/w32api/libwdsupgcompl.a differ diff --git a/usr/lib/w32api/libwdsutil.a b/usr/lib/w32api/libwdsutil.a index cbf53af5ee3..cd1448a3631 100644 Binary files a/usr/lib/w32api/libwdsutil.a and b/usr/lib/w32api/libwdsutil.a differ diff --git a/usr/lib/w32api/libwebauthn.a b/usr/lib/w32api/libwebauthn.a index 6b7a0738018..49047a45939 100644 Binary files a/usr/lib/w32api/libwebauthn.a and b/usr/lib/w32api/libwebauthn.a differ diff --git a/usr/lib/w32api/libwebcheck.a b/usr/lib/w32api/libwebcheck.a index b0f8e81d193..a47eb87eb90 100644 Binary files a/usr/lib/w32api/libwebcheck.a and b/usr/lib/w32api/libwebcheck.a differ diff --git a/usr/lib/w32api/libwebclnt.a b/usr/lib/w32api/libwebclnt.a index eeb119c145a..da75be2f63d 100644 Binary files a/usr/lib/w32api/libwebclnt.a and b/usr/lib/w32api/libwebclnt.a differ diff --git a/usr/lib/w32api/libwebhits.a b/usr/lib/w32api/libwebhits.a index 541f0760680..a61a1ac57d1 100644 Binary files a/usr/lib/w32api/libwebhits.a and b/usr/lib/w32api/libwebhits.a differ diff --git a/usr/lib/w32api/libwebservices.a b/usr/lib/w32api/libwebservices.a index ee6095beda1..f72cc229657 100644 Binary files a/usr/lib/w32api/libwebservices.a and b/usr/lib/w32api/libwebservices.a differ diff --git a/usr/lib/w32api/libwebsocket.a b/usr/lib/w32api/libwebsocket.a index de3de653326..e1691cf1e77 100644 Binary files a/usr/lib/w32api/libwebsocket.a and b/usr/lib/w32api/libwebsocket.a differ diff --git a/usr/lib/w32api/libwecapi.a b/usr/lib/w32api/libwecapi.a index d2c2e5c122c..c0f932d6bf3 100644 Binary files a/usr/lib/w32api/libwecapi.a and b/usr/lib/w32api/libwecapi.a differ diff --git a/usr/lib/w32api/libwer.a b/usr/lib/w32api/libwer.a index 95feb15fec9..26f3e2fef62 100644 Binary files a/usr/lib/w32api/libwer.a and b/usr/lib/w32api/libwer.a differ diff --git a/usr/lib/w32api/libwevtapi.a b/usr/lib/w32api/libwevtapi.a index d2fc32e504e..43bc469157a 100644 Binary files a/usr/lib/w32api/libwevtapi.a and b/usr/lib/w32api/libwevtapi.a differ diff --git a/usr/lib/w32api/libwevtfwd.a b/usr/lib/w32api/libwevtfwd.a index a0c9f731366..587edfc3579 100644 Binary files a/usr/lib/w32api/libwevtfwd.a and b/usr/lib/w32api/libwevtfwd.a differ diff --git a/usr/lib/w32api/libwiadss.a b/usr/lib/w32api/libwiadss.a index 050a11ba90e..d25e14b8dab 100644 Binary files a/usr/lib/w32api/libwiadss.a and b/usr/lib/w32api/libwiadss.a differ diff --git a/usr/lib/w32api/libwiarpc.a b/usr/lib/w32api/libwiarpc.a index db3bb871071..a3be81c746e 100644 Binary files a/usr/lib/w32api/libwiarpc.a and b/usr/lib/w32api/libwiarpc.a differ diff --git a/usr/lib/w32api/libwiaservc.a b/usr/lib/w32api/libwiaservc.a index e0c20e4bcb6..4e60a61d502 100644 Binary files a/usr/lib/w32api/libwiaservc.a and b/usr/lib/w32api/libwiaservc.a differ diff --git a/usr/lib/w32api/libwiashext.a b/usr/lib/w32api/libwiashext.a index 221f958e827..4f9811901d6 100644 Binary files a/usr/lib/w32api/libwiashext.a and b/usr/lib/w32api/libwiashext.a differ diff --git a/usr/lib/w32api/libwimgapi.a b/usr/lib/w32api/libwimgapi.a index 401fe62d2a0..66af947c414 100644 Binary files a/usr/lib/w32api/libwimgapi.a and b/usr/lib/w32api/libwimgapi.a differ diff --git a/usr/lib/w32api/libwindows.ai.machinelearning.a b/usr/lib/w32api/libwindows.ai.machinelearning.a index 0ed22140e71..60d1705d5fd 100644 Binary files a/usr/lib/w32api/libwindows.ai.machinelearning.a and b/usr/lib/w32api/libwindows.ai.machinelearning.a differ diff --git a/usr/lib/w32api/libwindows.data.pdf.a b/usr/lib/w32api/libwindows.data.pdf.a index 0e467ec2d98..871cfc24433 100644 Binary files a/usr/lib/w32api/libwindows.data.pdf.a and b/usr/lib/w32api/libwindows.data.pdf.a differ diff --git a/usr/lib/w32api/libwindows.networking.a b/usr/lib/w32api/libwindows.networking.a index a87503689dc..b376ee1e257 100644 Binary files a/usr/lib/w32api/libwindows.networking.a and b/usr/lib/w32api/libwindows.networking.a differ diff --git a/usr/lib/w32api/libwindowsapp.a b/usr/lib/w32api/libwindowsapp.a index aef787f0cba..b8ce5eb9013 100644 Binary files a/usr/lib/w32api/libwindowsapp.a and b/usr/lib/w32api/libwindowsapp.a differ diff --git a/usr/lib/w32api/libwindowscodecs.a b/usr/lib/w32api/libwindowscodecs.a index 98d84e2f6c4..e429cc5275c 100644 Binary files a/usr/lib/w32api/libwindowscodecs.a and b/usr/lib/w32api/libwindowscodecs.a differ diff --git a/usr/lib/w32api/libwindowscoreheadless_apiset.a b/usr/lib/w32api/libwindowscoreheadless_apiset.a index 5b33aa435da..83b7d20c35c 100644 Binary files a/usr/lib/w32api/libwindowscoreheadless_apiset.a and b/usr/lib/w32api/libwindowscoreheadless_apiset.a differ diff --git a/usr/lib/w32api/libwinfax.a b/usr/lib/w32api/libwinfax.a index 154822f95d7..0748b4724c3 100644 Binary files a/usr/lib/w32api/libwinfax.a and b/usr/lib/w32api/libwinfax.a differ diff --git a/usr/lib/w32api/libwinhttp.a b/usr/lib/w32api/libwinhttp.a index 7a4f773d7db..bd70c821571 100644 Binary files a/usr/lib/w32api/libwinhttp.a and b/usr/lib/w32api/libwinhttp.a differ diff --git a/usr/lib/w32api/libwinhvemulation.a b/usr/lib/w32api/libwinhvemulation.a index df2c257fcba..48976c82743 100644 Binary files a/usr/lib/w32api/libwinhvemulation.a and b/usr/lib/w32api/libwinhvemulation.a differ diff --git a/usr/lib/w32api/libwinhvplatform.a b/usr/lib/w32api/libwinhvplatform.a index 9776e4a394e..6643d277053 100644 Binary files a/usr/lib/w32api/libwinhvplatform.a and b/usr/lib/w32api/libwinhvplatform.a differ diff --git a/usr/lib/w32api/libwininet.a b/usr/lib/w32api/libwininet.a index 4be726a7876..2c97ab0f2c2 100644 Binary files a/usr/lib/w32api/libwininet.a and b/usr/lib/w32api/libwininet.a differ diff --git a/usr/lib/w32api/libwinipsec.a b/usr/lib/w32api/libwinipsec.a index b318c4a979c..fbd5fd6f4b1 100644 Binary files a/usr/lib/w32api/libwinipsec.a and b/usr/lib/w32api/libwinipsec.a differ diff --git a/usr/lib/w32api/libwinmm.a b/usr/lib/w32api/libwinmm.a index 7d3fd267e9b..5af0a0155d6 100644 Binary files a/usr/lib/w32api/libwinmm.a and b/usr/lib/w32api/libwinmm.a differ diff --git a/usr/lib/w32api/libwinrnr.a b/usr/lib/w32api/libwinrnr.a index 4f5edce2a82..8ce4b9bc1a0 100644 Binary files a/usr/lib/w32api/libwinrnr.a and b/usr/lib/w32api/libwinrnr.a differ diff --git a/usr/lib/w32api/libwinscard.a b/usr/lib/w32api/libwinscard.a index b31a900ac36..c599d6c00cb 100644 Binary files a/usr/lib/w32api/libwinscard.a and b/usr/lib/w32api/libwinscard.a differ diff --git a/usr/lib/w32api/libwinspool.a b/usr/lib/w32api/libwinspool.a index fdf4a654520..0d6c1a0968f 100644 Binary files a/usr/lib/w32api/libwinspool.a and b/usr/lib/w32api/libwinspool.a differ diff --git a/usr/lib/w32api/libwinsrv.a b/usr/lib/w32api/libwinsrv.a index 9f99386640e..e9278850963 100644 Binary files a/usr/lib/w32api/libwinsrv.a and b/usr/lib/w32api/libwinsrv.a differ diff --git a/usr/lib/w32api/libwinsta.a b/usr/lib/w32api/libwinsta.a index dd30e8c1411..e3ef0c19a68 100644 Binary files a/usr/lib/w32api/libwinsta.a and b/usr/lib/w32api/libwinsta.a differ diff --git a/usr/lib/w32api/libwintrust.a b/usr/lib/w32api/libwintrust.a index 85dfcec3396..1be7940b939 100644 Binary files a/usr/lib/w32api/libwintrust.a and b/usr/lib/w32api/libwintrust.a differ diff --git a/usr/lib/w32api/libwinusb.a b/usr/lib/w32api/libwinusb.a index 0ba823b71f9..d041f130152 100644 Binary files a/usr/lib/w32api/libwinusb.a and b/usr/lib/w32api/libwinusb.a differ diff --git a/usr/lib/w32api/libwkssvc.a b/usr/lib/w32api/libwkssvc.a index 35125c2dc5e..4cb09a67585 100644 Binary files a/usr/lib/w32api/libwkssvc.a and b/usr/lib/w32api/libwkssvc.a differ diff --git a/usr/lib/w32api/libwlanapi.a b/usr/lib/w32api/libwlanapi.a index 2203f06d2ee..568d687dde3 100644 Binary files a/usr/lib/w32api/libwlanapi.a and b/usr/lib/w32api/libwlanapi.a differ diff --git a/usr/lib/w32api/libwlanui.a b/usr/lib/w32api/libwlanui.a index 0a6ad64d986..fdcdd32d6cb 100644 Binary files a/usr/lib/w32api/libwlanui.a and b/usr/lib/w32api/libwlanui.a differ diff --git a/usr/lib/w32api/libwlanutil.a b/usr/lib/w32api/libwlanutil.a index 5487150add9..7d84d015217 100644 Binary files a/usr/lib/w32api/libwlanutil.a and b/usr/lib/w32api/libwlanutil.a differ diff --git a/usr/lib/w32api/libwldap32.a b/usr/lib/w32api/libwldap32.a index 31447e76b17..e03f864ef62 100644 Binary files a/usr/lib/w32api/libwldap32.a and b/usr/lib/w32api/libwldap32.a differ diff --git a/usr/lib/w32api/libwlnotify.a b/usr/lib/w32api/libwlnotify.a index 4b929d4fd7c..b9ac10a5bfd 100644 Binary files a/usr/lib/w32api/libwlnotify.a and b/usr/lib/w32api/libwlnotify.a differ diff --git a/usr/lib/w32api/libwlstore.a b/usr/lib/w32api/libwlstore.a index baa9b2d55f3..6fb14562565 100644 Binary files a/usr/lib/w32api/libwlstore.a and b/usr/lib/w32api/libwlstore.a differ diff --git a/usr/lib/w32api/libwmcodecdspuuid.a b/usr/lib/w32api/libwmcodecdspuuid.a index 6fe95421a72..3a465106ac8 100644 Binary files a/usr/lib/w32api/libwmcodecdspuuid.a and b/usr/lib/w32api/libwmcodecdspuuid.a differ diff --git a/usr/lib/w32api/libwmi.a b/usr/lib/w32api/libwmi.a index ea339e3d186..867b00241e4 100644 Binary files a/usr/lib/w32api/libwmi.a and b/usr/lib/w32api/libwmi.a differ diff --git a/usr/lib/w32api/libwmi2xml.a b/usr/lib/w32api/libwmi2xml.a index ac63b8c9733..23879bfdb5c 100644 Binary files a/usr/lib/w32api/libwmi2xml.a and b/usr/lib/w32api/libwmi2xml.a differ diff --git a/usr/lib/w32api/libwmiaprpl.a b/usr/lib/w32api/libwmiaprpl.a index b9d2e765ca3..f6be46735da 100644 Binary files a/usr/lib/w32api/libwmiaprpl.a and b/usr/lib/w32api/libwmiaprpl.a differ diff --git a/usr/lib/w32api/libwmilib.a b/usr/lib/w32api/libwmilib.a index ab5201eaab1..4242cd1914e 100644 Binary files a/usr/lib/w32api/libwmilib.a and b/usr/lib/w32api/libwmilib.a differ diff --git a/usr/lib/w32api/libwmiprop.a b/usr/lib/w32api/libwmiprop.a index 47dd94ba8b2..e1dfae60994 100644 Binary files a/usr/lib/w32api/libwmiprop.a and b/usr/lib/w32api/libwmiprop.a differ diff --git a/usr/lib/w32api/libwmisvc.a b/usr/lib/w32api/libwmisvc.a index 33916bd8735..06dd10f04c0 100644 Binary files a/usr/lib/w32api/libwmisvc.a and b/usr/lib/w32api/libwmisvc.a differ diff --git a/usr/lib/w32api/libwofutil.a b/usr/lib/w32api/libwofutil.a index d95db143af4..5131d0e7888 100644 Binary files a/usr/lib/w32api/libwofutil.a and b/usr/lib/w32api/libwofutil.a differ diff --git a/usr/lib/w32api/libwow64.a b/usr/lib/w32api/libwow64.a index fab9f80e943..8d109f3617a 100644 Binary files a/usr/lib/w32api/libwow64.a and b/usr/lib/w32api/libwow64.a differ diff --git a/usr/lib/w32api/libwow64cpu.a b/usr/lib/w32api/libwow64cpu.a index 0839326f31a..b1fea941cb1 100644 Binary files a/usr/lib/w32api/libwow64cpu.a and b/usr/lib/w32api/libwow64cpu.a differ diff --git a/usr/lib/w32api/libwow64mib.a b/usr/lib/w32api/libwow64mib.a index 9e1c3d474e1..822de89d954 100644 Binary files a/usr/lib/w32api/libwow64mib.a and b/usr/lib/w32api/libwow64mib.a differ diff --git a/usr/lib/w32api/libwow64win.a b/usr/lib/w32api/libwow64win.a index edae3e131ec..1788360490e 100644 Binary files a/usr/lib/w32api/libwow64win.a and b/usr/lib/w32api/libwow64win.a differ diff --git a/usr/lib/w32api/libwpd_ci.a b/usr/lib/w32api/libwpd_ci.a index 1a367425097..20fafc2e55b 100644 Binary files a/usr/lib/w32api/libwpd_ci.a and b/usr/lib/w32api/libwpd_ci.a differ diff --git a/usr/lib/w32api/libws2_32.a b/usr/lib/w32api/libws2_32.a index 4aa81fed0df..193219f58d1 100644 Binary files a/usr/lib/w32api/libws2_32.a and b/usr/lib/w32api/libws2_32.a differ diff --git a/usr/lib/w32api/libws2help.a b/usr/lib/w32api/libws2help.a index d9c83c6015b..2698f4b26c6 100644 Binary files a/usr/lib/w32api/libws2help.a and b/usr/lib/w32api/libws2help.a differ diff --git a/usr/lib/w32api/libwscapi.a b/usr/lib/w32api/libwscapi.a index ae8091b8116..fc75d206c56 100644 Binary files a/usr/lib/w32api/libwscapi.a and b/usr/lib/w32api/libwscapi.a differ diff --git a/usr/lib/w32api/libwscsvc.a b/usr/lib/w32api/libwscsvc.a index 53416403427..ce018777448 100644 Binary files a/usr/lib/w32api/libwscsvc.a and b/usr/lib/w32api/libwscsvc.a differ diff --git a/usr/lib/w32api/libwsdapi.a b/usr/lib/w32api/libwsdapi.a index 74ebec4c121..1231d709425 100644 Binary files a/usr/lib/w32api/libwsdapi.a and b/usr/lib/w32api/libwsdapi.a differ diff --git a/usr/lib/w32api/libwshatm.a b/usr/lib/w32api/libwshatm.a index 81388d65f03..09887dbd54b 100644 Binary files a/usr/lib/w32api/libwshatm.a and b/usr/lib/w32api/libwshatm.a differ diff --git a/usr/lib/w32api/libwshbth.a b/usr/lib/w32api/libwshbth.a index 414702d2614..687dfc61338 100644 Binary files a/usr/lib/w32api/libwshbth.a and b/usr/lib/w32api/libwshbth.a differ diff --git a/usr/lib/w32api/libwslapi.a b/usr/lib/w32api/libwslapi.a index d1e4046183a..6a60fa3c9f8 100644 Binary files a/usr/lib/w32api/libwslapi.a and b/usr/lib/w32api/libwslapi.a differ diff --git a/usr/lib/w32api/libwsmsvc.a b/usr/lib/w32api/libwsmsvc.a index 41d1505ad0c..f46b0b05a84 100644 Binary files a/usr/lib/w32api/libwsmsvc.a and b/usr/lib/w32api/libwsmsvc.a differ diff --git a/usr/lib/w32api/libwsock32.a b/usr/lib/w32api/libwsock32.a index 82d4fb4aeeb..17c556a7fb5 100644 Binary files a/usr/lib/w32api/libwsock32.a and b/usr/lib/w32api/libwsock32.a differ diff --git a/usr/lib/w32api/libwtsapi32.a b/usr/lib/w32api/libwtsapi32.a index 289fbc5244e..dac6d2f9d66 100644 Binary files a/usr/lib/w32api/libwtsapi32.a and b/usr/lib/w32api/libwtsapi32.a differ diff --git a/usr/lib/w32api/libx3daudio.a b/usr/lib/w32api/libx3daudio.a index 7e0f80733d2..d109a4a5e58 100644 Binary files a/usr/lib/w32api/libx3daudio.a and b/usr/lib/w32api/libx3daudio.a differ diff --git a/usr/lib/w32api/libx3daudio1_2.a b/usr/lib/w32api/libx3daudio1_2.a index 4b946378f00..60e0ab955d4 100644 Binary files a/usr/lib/w32api/libx3daudio1_2.a and b/usr/lib/w32api/libx3daudio1_2.a differ diff --git a/usr/lib/w32api/libx3daudio1_3.a b/usr/lib/w32api/libx3daudio1_3.a index 9cd742a03f9..3b104267c5d 100644 Binary files a/usr/lib/w32api/libx3daudio1_3.a and b/usr/lib/w32api/libx3daudio1_3.a differ diff --git a/usr/lib/w32api/libx3daudio1_4.a b/usr/lib/w32api/libx3daudio1_4.a index da5a0806322..1189ae856be 100644 Binary files a/usr/lib/w32api/libx3daudio1_4.a and b/usr/lib/w32api/libx3daudio1_4.a differ diff --git a/usr/lib/w32api/libx3daudio1_5.a b/usr/lib/w32api/libx3daudio1_5.a index 722c6dd877c..c3780485480 100644 Binary files a/usr/lib/w32api/libx3daudio1_5.a and b/usr/lib/w32api/libx3daudio1_5.a differ diff --git a/usr/lib/w32api/libx3daudio1_6.a b/usr/lib/w32api/libx3daudio1_6.a index 2d289385d5f..3593b102f83 100644 Binary files a/usr/lib/w32api/libx3daudio1_6.a and b/usr/lib/w32api/libx3daudio1_6.a differ diff --git a/usr/lib/w32api/libx3daudio1_7.a b/usr/lib/w32api/libx3daudio1_7.a index fdb3af02fc0..df791e21a1e 100644 Binary files a/usr/lib/w32api/libx3daudio1_7.a and b/usr/lib/w32api/libx3daudio1_7.a differ diff --git a/usr/lib/w32api/libx3daudiod1_7.a b/usr/lib/w32api/libx3daudiod1_7.a index 304e280cdbc..57308fca765 100644 Binary files a/usr/lib/w32api/libx3daudiod1_7.a and b/usr/lib/w32api/libx3daudiod1_7.a differ diff --git a/usr/lib/w32api/libxapofx.a b/usr/lib/w32api/libxapofx.a index d86100b0c66..bb30ec5c972 100644 Binary files a/usr/lib/w32api/libxapofx.a and b/usr/lib/w32api/libxapofx.a differ diff --git a/usr/lib/w32api/libxapofx1_0.a b/usr/lib/w32api/libxapofx1_0.a index f44d444d1bc..a2adaebe5ba 100644 Binary files a/usr/lib/w32api/libxapofx1_0.a and b/usr/lib/w32api/libxapofx1_0.a differ diff --git a/usr/lib/w32api/libxapofx1_1.a b/usr/lib/w32api/libxapofx1_1.a index 037e1d6df6b..56e763b496d 100644 Binary files a/usr/lib/w32api/libxapofx1_1.a and b/usr/lib/w32api/libxapofx1_1.a differ diff --git a/usr/lib/w32api/libxapofx1_2.a b/usr/lib/w32api/libxapofx1_2.a index 9d9122ce006..aab3fb48367 100644 Binary files a/usr/lib/w32api/libxapofx1_2.a and b/usr/lib/w32api/libxapofx1_2.a differ diff --git a/usr/lib/w32api/libxapofx1_3.a b/usr/lib/w32api/libxapofx1_3.a index b5ab77f4f68..8efc1a47ef9 100644 Binary files a/usr/lib/w32api/libxapofx1_3.a and b/usr/lib/w32api/libxapofx1_3.a differ diff --git a/usr/lib/w32api/libxapofx1_4.a b/usr/lib/w32api/libxapofx1_4.a index bf9a01805cf..ad81a90d132 100644 Binary files a/usr/lib/w32api/libxapofx1_4.a and b/usr/lib/w32api/libxapofx1_4.a differ diff --git a/usr/lib/w32api/libxapofx1_5.a b/usr/lib/w32api/libxapofx1_5.a index 9a1867f1cb4..025aaf0c562 100644 Binary files a/usr/lib/w32api/libxapofx1_5.a and b/usr/lib/w32api/libxapofx1_5.a differ diff --git a/usr/lib/w32api/libxapofxd1_5.a b/usr/lib/w32api/libxapofxd1_5.a index 44d21a0820a..508353514ce 100644 Binary files a/usr/lib/w32api/libxapofxd1_5.a and b/usr/lib/w32api/libxapofxd1_5.a differ diff --git a/usr/lib/w32api/libxaudio2_8.a b/usr/lib/w32api/libxaudio2_8.a index 908d68f000d..a8f9983d6db 100644 Binary files a/usr/lib/w32api/libxaudio2_8.a and b/usr/lib/w32api/libxaudio2_8.a differ diff --git a/usr/lib/w32api/libxaudio2_9.a b/usr/lib/w32api/libxaudio2_9.a index 5a2daf3c429..a233897c722 100644 Binary files a/usr/lib/w32api/libxaudio2_9.a and b/usr/lib/w32api/libxaudio2_9.a differ diff --git a/usr/lib/w32api/libxinput.a b/usr/lib/w32api/libxinput.a index bde807f6ade..c279b4ce84a 100644 Binary files a/usr/lib/w32api/libxinput.a and b/usr/lib/w32api/libxinput.a differ diff --git a/usr/lib/w32api/libxinput1_1.a b/usr/lib/w32api/libxinput1_1.a index db91f99a543..f5a096d1df5 100644 Binary files a/usr/lib/w32api/libxinput1_1.a and b/usr/lib/w32api/libxinput1_1.a differ diff --git a/usr/lib/w32api/libxinput1_2.a b/usr/lib/w32api/libxinput1_2.a index 80c2fa9a7da..17f0a174ae8 100644 Binary files a/usr/lib/w32api/libxinput1_2.a and b/usr/lib/w32api/libxinput1_2.a differ diff --git a/usr/lib/w32api/libxinput1_3.a b/usr/lib/w32api/libxinput1_3.a index b1598364d1e..1bc367c9cc8 100644 Binary files a/usr/lib/w32api/libxinput1_3.a and b/usr/lib/w32api/libxinput1_3.a differ diff --git a/usr/lib/w32api/libxinput1_4.a b/usr/lib/w32api/libxinput1_4.a index a0c3377077f..03e6df236d3 100644 Binary files a/usr/lib/w32api/libxinput1_4.a and b/usr/lib/w32api/libxinput1_4.a differ diff --git a/usr/lib/w32api/libxinput9_1_0.a b/usr/lib/w32api/libxinput9_1_0.a index 058008ef96b..c686be3d4a2 100644 Binary files a/usr/lib/w32api/libxinput9_1_0.a and b/usr/lib/w32api/libxinput9_1_0.a differ diff --git a/usr/lib/w32api/libxinputuap.a b/usr/lib/w32api/libxinputuap.a index ea81ee9688b..b8af75a690d 100644 Binary files a/usr/lib/w32api/libxinputuap.a and b/usr/lib/w32api/libxinputuap.a differ diff --git a/usr/lib/w32api/libxmllite.a b/usr/lib/w32api/libxmllite.a index e7f45db1251..7576eace9ca 100644 Binary files a/usr/lib/w32api/libxmllite.a and b/usr/lib/w32api/libxmllite.a differ diff --git a/usr/lib/w32api/libzoneoc.a b/usr/lib/w32api/libzoneoc.a index 9a3896a0432..1436bc28195 100644 Binary files a/usr/lib/w32api/libzoneoc.a and b/usr/lib/w32api/libzoneoc.a differ diff --git a/usr/share/bash-completion/bash_completion b/usr/share/bash-completion/bash_completion index 4022782d30a..2bc27cc5389 100644 --- a/usr/share/bash-completion/bash_completion +++ b/usr/share/bash-completion/bash_completion @@ -23,12 +23,16 @@ # # https://github.com/scop/bash-completion -BASH_COMPLETION_VERSINFO=(2 11) +BASH_COMPLETION_VERSINFO=( + 2 # x-release-please-major + 14 # x-release-please-minor + 0 # x-release-please-patch +) if [[ $- == *v* ]]; then - BASH_COMPLETION_ORIGINAL_V_VALUE="-v" + _comp__init_original_set_v="-v" else - BASH_COMPLETION_ORIGINAL_V_VALUE="+v" + _comp__init_original_set_v="+v" fi if [[ ${BASH_COMPLETION_DEBUG-} ]]; then @@ -37,13 +41,60 @@ else set +v fi -# Blacklisted completions, causing problems with our code. -# -_blacklist_glob='@(acroread.sh)' - # Turn on extended globbing and programmable completion shopt -s extglob progcomp +# Declare a compatibility function name +# @param $1 Version of bash-completion where the deprecation occurred +# @param $2 Old function name +# @param $3 New function name +# @since 2.12 +_comp_deprecate_func() +{ + if (($# != 3)); then + printf 'bash_completion: %s: usage: %s DEPRECATION_VERSION OLD_NAME NEW_NAME\n' "$FUNCNAME" "$FUNCNAME" + return 2 + fi + if [[ $2 != [a-zA-Z_]*([a-zA-Z_0-9]) ]]; then + printf 'bash_completion: %s: %s\n' "$FUNCNAME" "\$2: invalid function name '$1'" >&2 + return 2 + elif [[ $3 != [a-zA-Z_]*([a-zA-Z_0-9]) ]]; then + printf 'bash_completion: %s: %s\n' "$FUNCNAME" "\$3: invalid function name '$2'" >&2 + return 2 + fi + eval -- "$2() { $3 \"\$@\"; }" +} + +# Declare a compatibility variable name. +# For bash 4.3+, a real name alias is created, allowing value changes to +# "apply through" when the variables are set later. For bash versions earlier +# than that, the operation is once-only; the value of the new variable +# (if it's unset) is set to that of the old (if set) at call time. +# +# @param $1 Version of bash-completion where the deprecation occurred +# @param $2 Old variable name +# @param $3 New variable name +# @since 2.12 +_comp_deprecate_var() +{ + if (($# != 3)); then + printf 'bash_completion: %s: usage: %s DEPRECATION_VERSION OLD_NAME NEW_NAME\n' "$FUNCNAME" "$FUNCNAME" + return 2 + fi + if [[ $2 != [a-zA-Z_]*([a-zA-Z_0-9]) ]]; then + printf 'bash_completion: %s: %s\n' "$FUNCNAME" "\$2: invalid variable name '$1'" >&2 + return 2 + elif [[ $3 != [a-zA-Z_]*([a-zA-Z_0-9]) ]]; then + printf 'bash_completion: %s: %s\n' "$FUNCNAME" "\$3: invalid variable name '$2'" >&2 + return 2 + fi + if ((BASH_VERSINFO[0] >= 5 || BASH_VERSINFO[0] == 4 && BASH_VERSINFO[1] >= 3)); then + eval "declare -gn $2=$3" + elif [[ -v $2 && ! -v $3 ]]; then + printf -v "$3" %s "$2" + fi +} + # A lot of the following one-liners were taken directly from the # completion examples provided with the bash 2.04 source distribution @@ -67,9 +118,6 @@ complete -A setopt set # shopt completes with shopt options complete -A shopt shopt -# helptopics -complete -A helptopic help - # unalias completes with aliases complete -a unalias @@ -83,7 +131,8 @@ complete -b builtin # Check if we're running on the given userland # @param $1 userland to check for -_userland() +# @since 2.12 +_comp_userland() { local userland=$(uname -s) [[ $userland == @(Linux|GNU/*) ]] && userland=GNU @@ -92,94 +141,135 @@ _userland() # This function sets correct SysV init directories # -_sysvdirs() +# @since 2.12 +_comp_sysvdirs() { sysvdirs=() [[ -d /etc/rc.d/init.d ]] && sysvdirs+=(/etc/rc.d/init.d) [[ -d /etc/init.d ]] && sysvdirs+=(/etc/init.d) # Slackware uses /etc/rc.d [[ -f /etc/slackware-version ]] && sysvdirs=(/etc/rc.d) - return 0 + ((${#sysvdirs[@]})) } # This function checks whether we have a given program on the system. # -_have() +# @since 2.12 +_comp_have_command() { # Completions for system administrator commands are installed as well in # case completion is attempted via `sudo command ...'. - PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type $1 &>/dev/null -} - -# Backwards compatibility for compat completions that use have(). -# @deprecated should no longer be used; generally not needed with dynamically -# loaded completions, and _have is suitable for runtime use. -have() -{ - unset -v have - _have $1 && have=yes + PATH=$PATH:/usr/sbin:/sbin:/usr/local/sbin type "$1" &>/dev/null } # This function checks whether a given readline variable # is `on'. # -_rl_enabled() +# @since 2.12 +_comp_readline_variable_on() { - [[ "$(bind -v)" == *$1+([[:space:]])on* ]] + [[ $(bind -v) == *$1+([[:space:]])on* ]] } # This function shell-quotes the argument -quote() +# @param $1 String to be quoted +# @var[out] REPLY Resulting string +# @since 2.12 +_comp_quote() { - local quoted=${1//\'/\'\\\'\'} - printf "'%s'" "$quoted" + REPLY=\'${1//\'/\'\\\'\'}\' } -# @see _quote_readline_by_ref() -quote_readline() +# shellcheck disable=SC1003 +_comp_dequote__initialize() { - local ret - _quote_readline_by_ref "$1" ret - printf %s "$ret" -} # quote_readline() - -# This function shell-dequotes the argument -dequote() -{ - eval printf %s "$1" 2>/dev/null + unset -f "$FUNCNAME" + local regex_param='\$([_a-zA-Z][_a-zA-Z0-9]*|[-*@#?$!0-9_])|\$\{[!#]?([_a-zA-Z][_a-zA-Z0-9]*(\[([0-9]+|[*@])\])?|[-*@#?$!0-9_])\}' + local regex_quoted='\\.|'\''[^'\'']*'\''|\$?"([^\"$`!]|'$regex_param'|\\.)*"|\$'\''([^\'\'']|\\.)*'\''' + _comp_dequote__regex_safe_word='^([^\'\''"$`;&|<>()!]|'$regex_quoted'|'$regex_param')*$' +} +_comp_dequote__initialize + +# This function expands a word using `eval` in a safe way. This function can +# be typically used to get the expanded value of `${word[i]}` as +# `_comp_dequote "${word[i]}"`. When the word contains unquoted shell special +# characters, command substitutions, and other unsafe strings, the function +# call fails before applying `eval`. Otherwise, `eval` is applied to the +# string to generate the result. +# +# @param $1 String to be expanded. A safe word consists of the following +# sequence of substrings: +# +# - Shell non-special characters: [^\'"$`;&|<>()!]. +# - Parameter expansions of the forms $PARAM, ${!PARAM}, +# ${#PARAM}, ${NAME[INDEX]}, ${!NAME[INDEX]}, ${#NAME[INDEX]} +# where INDEX is an integer, `*` or `@`, NAME is a valid +# variable name [_a-zA-Z][_a-zA-Z0-9]*, and PARAM is NAME or a +# parameter [-*@#?$!0-9_]. +# - Quotes \?, '...', "...", $'...', and $"...". In the double +# quotations, parameter expansions are allowed. +# +# @var[out] REPLY Array that contains the expanded results. Multiple words or +# no words may be generated through pathname expansions. +# +# Note: This function allows parameter expansions as safe strings, which might +# cause unexpected results: +# +# * This allows execution of arbitrary commands through extra expansions of +# array subscripts in name references. For example, +# +# declare -n v='dummy[$(echo xxx >/dev/tty)]' +# echo "$v" # This line executes the command 'echo xxx'. +# _comp_dequote '"$v"' # This line also executes it. +# +# * This may change the internal state of the variable that has side effects. +# For example, the state of the random number generator of RANDOM can change: +# +# RANDOM=1234 # Set seed +# echo "$RANDOM" # This produces 30658. +# RANDOM=1234 # Reset seed +# _comp_dequote '"$RANDOM"' # This line changes the internal state. +# echo "$RANDOM" # This fails to reproduce 30658. +# +# We allow these parameter expansions as a part of safe strings assuming the +# referential transparency of the simple parameter expansions and the sane +# setup of the variables by the user or other frameworks that the user loads. +# @since 2.12 +_comp_dequote() +{ + REPLY=() # fallback value for unsafe word and failglob + [[ $1 =~ $_comp_dequote__regex_safe_word ]] || return 1 + eval "REPLY=($1)" 2>/dev/null # may produce failglob } -# Assign variable one scope above the caller -# Usage: local "$1" && _upvar $1 "value(s)" -# Param: $1 Variable name to assign value to -# Param: $* Value(s) to assign. If multiple values, an array is -# assigned, otherwise a single value is assigned. -# NOTE: For assigning multiple variables, use '_upvars'. Do NOT -# use multiple '_upvar' calls, since one '_upvar' call might -# reassign a variable to be used by another '_upvar' call. -# See: https://fvue.nl/wiki/Bash:_Passing_variables_by_reference -_upvar() -{ - echo "bash_completion: $FUNCNAME: deprecated function," \ - "use _upvars instead" >&2 - if unset -v "$1"; then # Unset & validate varname - if (($# == 2)); then - eval $1=\"\$2\" # Return single value - else - eval $1=\(\"\$"{@:2}"\"\) # Return array - fi +# Unset the given variables across a scope boundary. Useful for unshadowing +# global scoped variables. Note that simply calling unset on a local variable +# will not unshadow the global variable. Rather, the result will be a local +# variable in an unset state. +# Usage: local IFS='|'; _comp_unlocal IFS +# @param $* Variable names to be unset +# @since 2.12 +_comp_unlocal() +{ + if ((BASH_VERSINFO[0] >= 5)) && shopt -q localvar_unset; then + shopt -u localvar_unset + unset -v "$@" + shopt -s localvar_unset + else + unset -v "$@" fi } # Assign variables one scope above the caller # Usage: local varname [varname ...] && -# _upvars [-v varname value] | [-aN varname [value ...]] ... +# _comp_upvars [-v varname value] | [-aN varname [value ...]] ... # Available OPTIONS: # -aN Assign next N values to varname as array # -v Assign single value to varname -# Return: 1 if error occurs -# See: https://fvue.nl/wiki/Bash:_Passing_variables_by_reference -_upvars() +# @return 1 if error occurs +# @see https://fvue.nl/wiki/Bash:_Passing_variables_by_reference +# @since 2.12 +_comp_upvars() { if ! (($#)); then echo "bash_completion: $FUNCNAME: usage: $FUNCNAME" \ @@ -201,7 +291,8 @@ _upvars() return 1 } # Assign array of -aN elements - [[ "$2" ]] && unset -v "$2" && eval $2=\(\"\$"{@:3:${1#-a}}"\"\) && + # shellcheck disable=SC2015,SC2140 # TODO + [[ $2 ]] && unset -v "$2" && eval "$2"=\(\"\$"{@:3:${1#-a}}"\"\) && shift $((${1#-a} + 2)) || { echo bash_completion: \ "$FUNCNAME: \`$1${2+ }$2': missing argument(s)" \ @@ -211,7 +302,8 @@ _upvars() ;; -v) # Assign single value - [[ "$2" ]] && unset -v "$2" && eval $2=\"\$3\" && + # shellcheck disable=SC2015 # TODO + [[ $2 ]] && unset -v "$2" && eval "$2"=\"\$3\" && shift 3 || { echo "bash_completion: $FUNCNAME: $1:" \ "missing argument(s)" >&2 @@ -226,6 +318,482 @@ _upvars() done } +# Get the list of filenames that match with the specified glob pattern. +# This function does the globbing in a controlled environment, avoiding +# interference from user's shell options/settings or environment variables. +# @param $1 array_name Array name +# The array name should not start with an underscore "_", which is internally +# used. The array name should not be "GLOBIGNORE". +# @param $2 pattern Pattern string to be evaluated. +# This pattern string will be evaluated using "eval", so brace expansions, +# parameter expansions, command substitutions, and other expansions will be +# processed. The user-provided strings should not be directly specified to +# this argument. +# @return 0 if at least one path is generated, 1 if no path is generated, or 2 +# if the usage is incorrect. +# @since 2.12 +_comp_expand_glob() +{ + if (($# != 2)); then + printf 'bash-completion: %s: unexpected number of arguments\n' "$FUNCNAME" >&2 + printf 'usage: %s ARRAY_NAME PATTERN\n' "$FUNCNAME" >&2 + return 2 + elif [[ $1 == @(GLOBIGNORE|_*|*[^_a-zA-Z0-9]*|[0-9]*|'') ]]; then + printf 'bash-completion: %s: invalid array name "%s"\n' "$FUNCNAME" "$1" >&2 + return 2 + fi + + # Save and adjust the settings. + local _original_opts=$SHELLOPTS:$BASHOPTS + set +o noglob + shopt -s nullglob + shopt -u failglob dotglob + + # Also the user's GLOBIGNORE may affect the result of pathname expansions. + local GLOBIGNORE= + + eval -- "$1=()" # a fallback in case that the next line fails. + eval -- "$1=($2)" + + # Restore the settings. Note: Changing GLOBIGNORE affects the state of + # "shopt -q dotglob", so we need to explicitly restore the original state + # of "shopt -q dotglob". + _comp_unlocal GLOBIGNORE + if [[ :$_original_opts: == *:dotglob:* ]]; then + shopt -s dotglob + else + shopt -u dotglob + fi + [[ :$_original_opts: == *:nullglob:* ]] || shopt -u nullglob + [[ :$_original_opts: == *:failglob:* ]] && shopt -s failglob + [[ :$_original_opts: == *:noglob:* ]] && set -o noglob + eval "((\${#$1[@]}))" +} + +# Split a string and assign to an array. This function basically performs +# `IFS=; =()` but properly handles saving/restoring the +# state of `IFS` and the shell option `noglob`. A naive splitting by +# `arr=(...)` suffers from unexpected IFS and pathname expansions, so one +# should prefer this function to such naive splitting. +# OPTIONS +# -a Append to the array +# -F sep Set a set of separator characters (used as IFS). The default +# separator is $' \t\n' +# -l The same as -F $'\n' +# @param $1 array_name The array name +# The array name should not start with an underscores "_", which is +# internally used. The array name should not be either "IFS" or +# "OPT{IND,ARG,ERR}". +# @param $2 text The string to split +# @return 2 when the usage is wrong, 0 when one or more completions are +# generated, or 1 when the execution succeeds but no candidates are +# generated. +# @since 2.12 +_comp_split() +{ + local _append="" IFS=$' \t\n' + + local OPTIND=1 OPTARG="" OPTERR=0 _opt + while getopts ':alF:' _opt "$@"; do + case $_opt in + a) _append=set ;; + l) IFS=$'\n' ;; + F) IFS=$OPTARG ;; + *) + echo "bash_completion: $FUNCNAME: usage error" >&2 + return 2 + ;; + esac + done + shift "$((OPTIND - 1))" + if (($# != 2)); then + printf '%s\n' "bash_completion: $FUNCNAME: unexpected number of arguments" >&2 + printf '%s\n' "usage: $FUNCNAME [-al] [-F SEP] ARRAY_NAME TEXT" >&2 + return 2 + elif [[ $1 == @(*[^_a-zA-Z0-9]*|[0-9]*|''|_*|IFS|OPTIND|OPTARG|OPTERR) ]]; then + printf '%s\n' "bash_completion: $FUNCNAME: invalid array name '$1'" >&2 + return 2 + fi + + local _original_opts=$SHELLOPTS + set -o noglob + + local _old_size _new_size + if [[ $_append ]]; then + eval "$1+=()" # in case $1 is unset + eval "_old_size=\${#$1[@]}" + eval "$1+=(\$2)" + else + _old_size=0 + eval "$1=(\$2)" + fi + eval "_new_size=\${#$1[@]}" + + [[ :$_original_opts: == *:noglob:* ]] || set +o noglob + ((_new_size > _old_size)) +} + +# Helper function for _comp_compgen +# @var[in] $? +# @var[in] _var +# @var[in] _append +# @return original $? +_comp_compgen__error_fallback() +{ + local _status=$? + if [[ $_append ]]; then + # make sure existence of variable + eval -- "$_var+=()" + else + eval -- "$_var=()" + fi + return "$_status" +} + +# Provide a common interface to generate completion candidates in COMPREPLY or +# in a specified array. +# OPTIONS +# -a Append to the array +# -v arr Store the results to the array ARR. The default is `COMPREPLY`. +# The array name should not start with an underscores "_", which is +# internally used. The array name should not be any of "cur", "IFS" +# or "OPT{IND,ARG,ERR}". +# -U var Unlocalize VAR before performing the assignments. This option can +# be specified multiple times to register multiple variables. This +# option is supposed to be used in implementing a generator (G1) when +# G1 defines a local variable name that does not start with `_`. In +# such a case, when the target variable specified to G1 by `-v VAR1` +# conflicts with the local variable, the assignment to the target +# variable fails to propagate outside G1. To avoid such a situation, +# G1 can call `_comp_compgen` with `-U VAR` to unlocalize `VAR` +# before accessing the target variable. For a builtin compgen call +# (i.e., _comp_compgen [options] -- options), VAR is unlocalized +# after calling the builtin `compgen` but before assigning results to +# the target array. For a generator call (i.e., _comp_compgen +# [options] G2 ...), VAR is unlocalized before calling the child +# generator function `_comp_compgen_G2`. +# -c cur Set a word used as a prefix to filter the completions. The default +# is ${cur-}. +# -R The same as -c ''. Use raw outputs without filtering. +# -C dir Evaluate compgen/generator in the specified directory. +# @var[in,opt] cur Used as the default value of a prefix to filter the +# completions. +# +# Usage #1: _comp_compgen [-alR|-F sep|-v arr|-c cur|-C dir] -- options... +# Call `compgen` with the specified arguments and store the results in the +# specified array. This function essentially performs arr=($(compgen args...)) +# but properly handles shell options, IFS, etc. using _comp_split. This +# function is equivalent to `_comp_split [-a] -l arr "$(IFS=sep; compgen +# args... -- cur)"`, but this pattern is frequent in the codebase and is good +# to separate out as a function for the possible future implementation change. +# OPTIONS +# -F sep Set a set of separator characters (used as IFS in evaluating +# `compgen'). The default separator is $' \t\n'. Note that this is +# not the set of separators to delimit output of `compgen', but the +# separators in evaluating the expansions of `-W '...'`, etc. The +# delimiter of the output of `compgen` is always a newline. +# -l The same as -F $'\n'. Use lines as words in evaluating compgen. +# @param $1... options Arguments that are passed to compgen (if $1 starts with +# a hyphen `-`). +# +# Note: References to positional parameters $1, $2, ... (such as -W '$1') +# will not work as expected because these reference the arguments of +# `_comp_compgen' instead of those of the caller function. When there are +# needs to reference them, save the arguments to an array and reference the +# array instead. +# +# Note: The array option `-V arr` in bash >= 5.3 should be instead specified +# as `-v arr` as a part of the `_comp_compgen` options. +# @return True (0) if at least one completion is generated, False (1) if no +# completion is generated, or 2 with an incorrect usage. +# +# Usage #2: _comp_compgen [-aR|-v arr|-c cur|-C dir|-i cmd|-x cmd] name args... +# Call the generator `_comp_compgen_NAME ARGS...` with the specified options. +# This provides a common interface to call the functions `_comp_compgen_NAME`, +# which produce completion candidates, with custom options [-alR|-v arr|-c +# cur]. The option `-F sep` is not used with this usage. +# OPTIONS +# -x cmd Call exported generator `_comp_xfunc_CMD_compgen_NAME` +# -i cmd Call internal generator `_comp_cmd_CMD__compgen_NAME` +# @param $1... name args Calls the function _comp_compgen_NAME with the +# specified ARGS (if $1 does not start with a hyphen `-`). The options +# [-alR|-v arr|-c cur] are inherited by the child calls of `_comp_compgen` +# inside `_comp_compgen_NAME` unless the child call `_comp_compgen` receives +# overriding options. +# @var[in,opt,internal] _comp_compgen__append +# @var[in,opt,internal] _comp_compgen__var +# @var[in,opt,internal] _comp_compgen__cur +# These variables are internally used to pass the effect of the options +# [-alR|-v arr|-c cur] to the child calls of `_comp_compgen` in +# `_comp_compgen_NAME`. +# @return Exit status of the generator. +# +# @remarks When no options are supplied to _comp_compgen, `_comp_compgen NAME +# args` is equivalent to the direct call `_comp_compgen_NAME args`. As the +# direct call is slightly more efficient, the direct call is preferred over +# calling it through `_comp_compgen`. +# +# @remarks Design `_comp_compgen_NAME`: a function that produce completions can +# be defined with the name _comp_compgen_NAME. The function is supposed to +# generate completions by calling `_comp_compgen`. To reflect the options +# specified to the outer calls of `_comp_compgen`, the function should not +# directly modify `COMPREPLY`. To add words, one can call +# +# _comp_compgen -- -W '"${words[@]}"' +# +# To directly add words without filtering by `cur`, one can call +# +# _comp_compgen -R -- -W '"${words[@]}"' +# +# or use the utility `_comp_compgen_set`: +# +# _comp_compgen_set "${words[@]}" +# +# Other nested calls of _comp_compgen can also be used. The function is +# supposed to replace the existing content of the array by default to allow the +# caller control whether to replace or append by the option `-a`. +# +# @since 2.12 +_comp_compgen() +{ + local _append= + local _var= + local _cur=${_comp_compgen__cur-${cur-}} + local _dir="" + local _ifs=$' \t\n' _has_ifs="" + local _icmd="" _xcmd="" + local -a _upvars=() + + local _old_nocasematch="" + if shopt -q nocasematch; then + _old_nocasematch=set + shopt -u nocasematch + fi + local OPTIND=1 OPTARG="" OPTERR=0 _opt + while getopts ':av:U:Rc:C:lF:i:x:' _opt "$@"; do + case $_opt in + a) _append=set ;; + v) + if [[ $OPTARG == @(*[^_a-zA-Z0-9]*|[0-9]*|''|_*|IFS|OPTIND|OPTARG|OPTERR|cur) ]]; then + printf 'bash_completion: %s: -v: invalid array name `%s'\''\n' "$FUNCNAME" "$OPTARG" >&2 + return 2 + fi + _var=$OPTARG + ;; + U) + if [[ $OPTARG == @(*[^_a-zA-Z0-9]*|[0-9]*|'') ]]; then + printf 'bash_completion: %s: -U: invalid variable name `%s'\''\n' "$FUNCNAME" "$OPTARG" >&2 + return 2 + elif [[ $OPTARG == @(_*|IFS|OPTIND|OPTARG|OPTERR|cur) ]]; then + printf 'bash_completion: %s: -U: unnecessary to mark `%s'\'' as upvar\n' "$FUNCNAME" "$OPTARG" >&2 + return 2 + fi + _upvars+=("$OPTARG") + ;; + c) _cur=$OPTARG ;; + R) _cur="" ;; + C) + if [[ ! $OPTARG ]]; then + printf 'bash_completion: %s: -C: invalid directory name `%s'\''\n' "$FUNCNAME" "$OPTARG" >&2 + return 2 + fi + _dir=$OPTARG + ;; + l) _has_ifs=set _ifs=$'\n' ;; + F) _has_ifs=set _ifs=$OPTARG ;; + [ix]) + if [[ ! $OPTARG ]]; then + printf 'bash_completion: %s: -%s: invalid command name `%s'\''\n' "$FUNCNAME" "$_opt" "$OPTARG" >&2 + return 2 + elif [[ $_icmd ]]; then + printf 'bash_completion: %s: -%s: `-i %s'\'' is already specified\n' "$FUNCNAME" "$_opt" "$_icmd" >&2 + return 2 + elif [[ $_xcmd ]]; then + printf 'bash_completion: %s: -%s: `-x %s'\'' is already specified\n' "$FUNCNAME" "$_opt" "$_xcmd" >&2 + return 2 + fi + ;;& + i) _icmd=$OPTARG ;; + x) _xcmd=$OPTARG ;; + *) + printf 'bash_completion: %s: usage error\n' "$FUNCNAME" >&2 + return 2 + ;; + esac + done + [[ $_old_nocasematch ]] && shopt -s nocasematch + shift "$((OPTIND - 1))" + if (($# == 0)); then + printf 'bash_completion: %s: unexpected number of arguments\n' "$FUNCNAME" >&2 + printf 'usage: %s [-alR|-F SEP|-v ARR|-c CUR] -- ARGS...' "$FUNCNAME" >&2 + return 2 + fi + if [[ ! $_var ]]; then + # Inherit _append and _var only when -v var is unspecified. + _var=${_comp_compgen__var-COMPREPLY} + [[ $_append ]] || _append=${_comp_compgen__append-} + fi + + if [[ $1 != -* ]]; then + # usage: _comp_compgen [options] NAME args + if [[ $_has_ifs ]]; then + printf 'bash_completion: %s: `-l'\'' and `-F sep'\'' are not supported for generators\n' "$FUNCNAME" >&2 + return 2 + fi + + local -a _generator + if [[ $_icmd ]]; then + _generator=("_comp_cmd_${_icmd//[^a-zA-Z0-9_]/_}__compgen_$1") + elif [[ $_xcmd ]]; then + _generator=(_comp_xfunc "$_xcmd" "compgen_$1") + else + _generator=("_comp_compgen_$1") + fi + if ! declare -F -- "${_generator[0]}" &>/dev/null; then + printf 'bash_completion: %s: unrecognized generator `%s'\'' (function %s not found)\n' "$FUNCNAME" "$1" "${_generator[0]}" >&2 + return 2 + fi + + ((${#_upvars[@]})) && _comp_unlocal "${_upvars[@]}" + + if [[ $_dir ]]; then + local _original_pwd=$PWD + local PWD=${PWD-} OLDPWD=${OLDPWD-} + # Note: We also redirect stdout because `cd` may output the target + # directory to stdout when CDPATH is set. + command cd -- "$_dir" &>/dev/null || + { + _comp_compgen__error_fallback + return + } + fi + + local _comp_compgen__append=$_append + local _comp_compgen__var=$_var + local _comp_compgen__cur=$_cur cur=$_cur + # Note: we use $1 as a part of a function name, and we use $2... as + # arguments to the function if any. + # shellcheck disable=SC2145 + "${_generator[@]}" "${@:2}" + local _status=$? + + # Go back to the original directory. + # Note: Failure of this line results in the change of the current + # directory visible to the user. We intentionally do not redirect + # stderr so that the error message appear in the terminal. + # shellcheck disable=SC2164 + [[ $_dir ]] && command cd -- "$_original_pwd" + + return "$_status" + fi + + # usage: _comp_compgen [options] -- [compgen_options] + if [[ $_icmd || $_xcmd ]]; then + printf 'bash_completion: %s: generator name is unspecified for `%s'\''\n' "$FUNCNAME" "${_icmd:+-i $_icmd}${_xcmd:+x $_xcmd}" >&2 + return 2 + fi + + # Note: $* in the below checks would be affected by uncontrolled IFS in + # bash >= 5.0, so we need to set IFS to the normal value. The behavior in + # bash < 5.0, where unquoted $* in conditional command did not honor IFS, + # was a bug. + # Note: Also, ${_cur:+-- "$_cur"} and ${_append:+-a} would be affected by + # uncontrolled IFS. + local IFS=$' \t\n' + # Note: extglob *\$?(\{)[0-9]* can be extremely slow when the string + # "${*:2:_nopt}" becomes longer, so we test \$[0-9] and \$\{[0-9] + # separately. + if [[ $* == *\$[0-9]* || $* == *\$\{[0-9]* ]]; then + printf 'bash_completion: %s: positional parameter $1, $2, ... do not work inside this function\n' "$FUNCNAME" >&2 + return 2 + fi + + local _result + _result=$( + if [[ $_dir ]]; then + # Note: We also redirect stdout because `cd` may output the target + # directory to stdout when CDPATH is set. + command cd -- "$_dir" &>/dev/null || return + fi + IFS=$_ifs compgen "$@" ${_cur:+-- "$_cur"} + ) || { + _comp_compgen__error_fallback + return + } + + ((${#_upvars[@]})) && _comp_unlocal "${_upvars[@]}" + _comp_split -l ${_append:+-a} "$_var" "$_result" +} + +# usage: _comp_compgen_set [words...] +# Reset COMPREPLY with the specified WORDS. If no arguments are specified, the +# array is cleared. +# +# When an array name is specified by `-v VAR` in a caller _comp_compgen, the +# array is reset instead of COMPREPLY. When the `-a` flag is specified in a +# caller _comp_compgen, the words are appended to the existing elements of the +# array instead of replacing the existing elements. This function ignores +# ${cur-} or the prefix specified by `-v CUR`. +# @return 0 if at least one completion is generated, or 1 otherwise. +# @since 2.12 +_comp_compgen_set() +{ + local _append=${_comp_compgen__append-} + local _var=${_comp_compgen__var-COMPREPLY} + eval -- "$_var${_append:++}=(\"\$@\")" + (($#)) +} + +# Simply split the text and generate completions. This function should be used +# instead of `_comp_compgen -- -W "$(command)"`, which is vulnerable because +# option -W evaluates the shell expansions included in the option argument. +# Options: +# -F sep Specify the separators. The default is $' \t\n' +# -l The same as -F $'\n' +# -X arg The same as the compgen option -X. +# -S arg The same as the compgen option -S. +# -P arg The same as the compgen option -P. +# -o arg The same as the compgen option -o. +# @param $1 String to split +# @return 0 if at least one completion is generated, or 1 otherwise. +# @since 2.12 +_comp_compgen_split() +{ + local _ifs=$' \t\n' + local -a _compgen_options=() + + local OPTIND=1 OPTARG="" OPTERR=0 _opt + while getopts ':lF:X:S:P:o:' _opt "$@"; do + case $_opt in + l) _ifs=$'\n' ;; + F) _ifs=$OPTARG ;; + [XSPo]) _compgen_options+=("-$_opt" "$OPTARG") ;; + *) + printf 'bash_completion: usage: %s [-l|-F sep] [--] str\n' "$FUNCNAME" >&2 + return 2 + ;; + esac + done + shift "$((OPTIND - 1))" + if (($# != 1)); then + printf 'bash_completion: %s: unexpected number of arguments.\n' "$FUNCNAME" >&2 + printf 'usage: %s [-l|-F sep] [--] str' "$FUNCNAME" >&2 + return 2 + fi + + local input=$1 IFS=$' \t\n' + _comp_compgen -F "$_ifs" -U input -- ${_compgen_options[@]+"${_compgen_options[@]}"} -W '$input' +} + +# Check if the argument looks like a path. +# @param $1 thing to check +# @return True (0) if it does, False (> 0) otherwise +# @since 2.12 +_comp_looks_like_path() +{ + [[ ${1-} == @(*/|[.~])* ]] +} + # Reassemble command line words, excluding specified characters from the # list of word completion separators (COMP_WORDBREAKS). # @param $1 chars Characters out of $COMP_WORDBREAKS which should @@ -235,9 +803,9 @@ _upvars() # @param $2 words Name of variable to return words to # @param $3 cword Name of variable to return cword to # -__reassemble_comp_words_by_ref() +_comp__reassemble_words() { - local exclude i j line ref + local exclude="" i j line ref # Exclude word separator characters? if [[ $1 ]]; then # Yes, exclude word separator characters; @@ -248,7 +816,7 @@ __reassemble_comp_words_by_ref() # Default to cword unchanged printf -v "$3" %s "$COMP_CWORD" # Are characters excluded which were former included? - if [[ -v exclude ]]; then + if [[ $exclude ]]; then # Yes, list of word completion separators has shrunk; line=$COMP_LINE # Re-assemble words to complete @@ -269,12 +837,16 @@ __reassemble_comp_words_by_ref() ((i == COMP_CWORD)) && printf -v "$3" %s "$j" # Remove optional whitespace + word separator from line copy line=${line#*"${COMP_WORDS[i]}"} + # Indicate next word if available, else end *both* while and + # for loop + if ((i < ${#COMP_WORDS[@]} - 1)); then + ((i++)) + else + break 2 + fi # Start new word if word separator in original line is # followed by whitespace. [[ $line == [[:blank:]]* ]] && ((j++)) - # Indicate next word if available, else end *both* while and - # for loop - ((i < ${#COMP_WORDS[@]} - 1)) && ((i++)) || break 2 done # Append word to current word ref="$2[$j]" @@ -291,7 +863,7 @@ __reassemble_comp_words_by_ref() printf -v "$2[i]" %s "${COMP_WORDS[i]}" done fi -} # __reassemble_comp_words_by_ref() +} # @param $1 exclude Characters out of $COMP_WORDBREAKS which should NOT be # considered word breaks. This is useful for things like scp where @@ -300,22 +872,22 @@ __reassemble_comp_words_by_ref() # @param $2 words Name of variable to return words to # @param $3 cword Name of variable to return cword to # @param $4 cur Name of variable to return current word to complete to -# @see __reassemble_comp_words_by_ref() -__get_cword_at_cursor_by_ref() +# @see _comp__reassemble_words() +_comp__get_cword_at_cursor() { local cword words=() - __reassemble_comp_words_by_ref "$1" words cword + _comp__reassemble_words "$1" words cword local i cur="" index=$COMP_POINT lead=${COMP_LINE:0:COMP_POINT} - # Cursor not at position 0 and not leaded by just space(s)? + # Cursor not at position 0 and not led by just space(s)? if [[ $index -gt 0 && ($lead && ${lead//[[:space:]]/}) ]]; then cur=$COMP_LINE for ((i = 0; i <= cword; ++i)); do # Current word fits in $cur, and $cur doesn't match cword? - while [[ ${#cur} -ge ${#words[i]} && \ + while [[ ${#cur} -ge ${#words[i]} && ${cur:0:${#words[i]}} != "${words[i]-}" ]]; do # Strip first character - cur="${cur:1}" + cur=${cur:1} # Decrease cursor position, staying >= 0 ((index > 0)) && ((index--)) done @@ -324,7 +896,7 @@ __get_cword_at_cursor_by_ref() if ((i < cword)); then # No, cword lies further; local old_size=${#cur} - cur="${cur#"${words[i]}"}" + cur=${cur#"${words[i]}"} local new_size=${#cur} ((index -= old_size - new_size)) fi @@ -335,8 +907,9 @@ __get_cword_at_cursor_by_ref() ((index < 0)) && index=0 fi - local "$2" "$3" "$4" && _upvars -a${#words[@]} $2 ${words+"${words[@]}"} \ - -v $3 "$cword" -v $4 "${cur:0:index}" + local IFS=$' \t\n' + local "$2" "$3" "$4" && _comp_upvars -a"${#words[@]}" "$2" ${words[@]+"${words[@]}"} \ + -v "$3" "$cword" -v "$4" "${cur:0:index}" } # Get the word to complete and optional previous words. @@ -345,7 +918,7 @@ __get_cword_at_cursor_by_ref() # (For example, if the line is "ls foobar", # and the cursor is here --------> ^ # Also one is able to cross over possible wordbreak characters. -# Usage: _get_comp_words_by_ref [OPTIONS] [VARNAMES] +# Usage: _comp_get_words [OPTIONS] [VARNAMES] # Available VARNAMES: # cur Return cur via $cur # prev Return prev via $prev @@ -364,16 +937,23 @@ __get_cword_at_cursor_by_ref() # # Example usage: # -# $ _get_comp_words_by_ref -n : cur prev +# $ _comp_get_words -n : cur prev # -_get_comp_words_by_ref() +# @since 2.12 +_comp_get_words() { - local exclude flag i OPTIND=1 + local exclude="" flag i OPTIND=1 local cur cword words=() - local upargs=() upvars=() vcur vcword vprev vwords + local upargs=() upvars=() vcur="" vcword="" vprev="" vwords="" while getopts "c:i:n:p:w:" flag "$@"; do case $flag in + [cipw]) + if [[ $OPTARG != [a-zA-Z_]*([a-zA-Z_0-9])?(\[*\]) ]]; then + echo "bash_completion: $FUNCNAME: -$flag: invalid variable name \`$OPTARG'" >&2 + return 1 + fi + ;;& c) vcur=$OPTARG ;; i) vcword=$OPTARG ;; n) exclude=$OPTARG ;; @@ -400,108 +980,44 @@ _get_comp_words_by_ref() ((OPTIND += 1)) done - __get_cword_at_cursor_by_ref "${exclude-}" words cword cur + _comp__get_cword_at_cursor "${exclude-}" words cword cur - [[ -v vcur ]] && { + [[ $vcur ]] && { upvars+=("$vcur") - upargs+=(-v $vcur "$cur") + upargs+=(-v "$vcur" "$cur") } - [[ -v vcword ]] && { + [[ $vcword ]] && { upvars+=("$vcword") - upargs+=(-v $vcword "$cword") + upargs+=(-v "$vcword" "$cword") } - [[ -v vprev && $cword -ge 1 ]] && { + [[ $vprev ]] && { + local value="" + ((cword >= 1)) && value=${words[cword - 1]} upvars+=("$vprev") - upargs+=(-v $vprev "${words[cword - 1]}") + upargs+=(-v "$vprev" "$value") } - [[ -v vwords ]] && { + [[ $vwords ]] && { + # Note: bash < 4.4 has a bug that all the elements are connected with + # ${v+"$@"} when IFS does not contain whitespace. + local IFS=$' \t\n' upvars+=("$vwords") - upargs+=(-a${#words[@]} $vwords ${words+"${words[@]}"}) + upargs+=(-a"${#words[@]}" "$vwords" ${words+"${words[@]}"}) } - ((${#upvars[@]})) && local "${upvars[@]}" && _upvars "${upargs[@]}" + ((${#upvars[@]})) && local "${upvars[@]}" && _comp_upvars "${upargs[@]}" } -# Get the word to complete. -# This is nicer than ${COMP_WORDS[COMP_CWORD]}, since it handles cases -# where the user is completing in the middle of a word. -# (For example, if the line is "ls foobar", -# and the cursor is here --------> ^ -# @param $1 string Characters out of $COMP_WORDBREAKS which should NOT be -# considered word breaks. This is useful for things like scp where -# we want to return host:path and not only path, so we would pass the -# colon (:) as $1 in this case. -# @param $2 integer Index number of word to return, negatively offset to the -# current word (default is 0, previous is 1), respecting the exclusions -# given at $1. For example, `_get_cword "=:" 1' returns the word left of -# the current word, respecting the exclusions "=:". -# @deprecated Use `_get_comp_words_by_ref cur' instead -# @see _get_comp_words_by_ref() -_get_cword() -{ - local LC_CTYPE=C - local cword words - __reassemble_comp_words_by_ref "${1-}" words cword - - # return previous word offset by $2 - if [[ ${2-} && ${2//[^0-9]/} ]]; then - printf "%s" "${words[cword - $2]}" - elif ((${#words[cword]} == 0 && COMP_POINT == ${#COMP_LINE})); then - : # nothing - else - local i - local cur="$COMP_LINE" - local index="$COMP_POINT" - for ((i = 0; i <= cword; ++i)); do - # Current word fits in $cur, and $cur doesn't match cword? - while [[ ${#cur} -ge ${#words[i]} && \ - ${cur:0:${#words[i]}} != "${words[i]}" ]]; do - # Strip first character - cur="${cur:1}" - # Decrease cursor position, staying >= 0 - ((index > 0)) && ((index--)) - done - - # Does found word match cword? - if ((i < cword)); then - # No, cword lies further; - local old_size="${#cur}" - cur="${cur#${words[i]}}" - local new_size="${#cur}" - ((index -= old_size - new_size)) - fi - done - - if [[ ${words[cword]:0:${#cur}} != "$cur" ]]; then - # We messed up! At least return the whole word so things - # keep working - printf "%s" "${words[cword]}" - else - printf "%s" "${cur:0:index}" - fi - fi -} # _get_cword() - -# Get word previous to the current word. -# This is a good alternative to `prev=${COMP_WORDS[COMP_CWORD-1]}' because bash4 -# will properly return the previous word with respect to any given exclusions to -# COMP_WORDBREAKS. -# @deprecated Use `_get_comp_words_by_ref cur prev' instead -# @see _get_comp_words_by_ref() +# Generate the specified items after left-trimming with the word-to-complete +# containing a colon (:). If the word-to-complete does not contain a colon, +# this generates the specified items without modifications. +# @param $@ items to generate +# @var[in] cur current word to complete +# +# @remarks In Bash, with a colon in COMP_WORDBREAKS, words containing colons +# are always completed as entire words if the word to complete contains a +# colon. This function fixes this behavior by removing the +# colon-containing-prefix from the items. # -_get_pword() -{ - if ((COMP_CWORD >= 1)); then - _get_cword "${@:-}" 1 - fi -} - -# If the word-to-complete contains a colon (:), left-trim COMPREPLY items with -# word-to-complete. -# With a colon in COMP_WORDBREAKS, words containing -# colons are always completed as entire words if the word to complete contains -# a colon. This function fixes this, by removing the colon-containing-prefix -# from COMPREPLY items. # The preferred solution is to remove the colon (:) from COMP_WORDBREAKS in # your .bashrc: # @@ -510,24 +1026,37 @@ _get_pword() # # See also: Bash FAQ - E13) Why does filename completion misbehave if a colon # appears in the filename? - https://tiswww.case.edu/php/chet/bash/FAQ +# +# @since 2.12 +_comp_compgen_ltrim_colon() +{ + (($#)) || return 0 + local -a _tmp + _tmp=("$@") + if [[ $cur == *:* && $COMP_WORDBREAKS == *:* ]]; then + # Remove colon-word prefix from items + local _colon_word=${cur%"${cur##*:}"} + _tmp=("${_tmp[@]#"$_colon_word"}") + fi + _comp_compgen_set "${_tmp[@]}" +} + +# If the word-to-complete contains a colon (:), left-trim COMPREPLY items with +# word-to-complete. +# # @param $1 current word to complete (cur) -# @modifies global array $COMPREPLY +# @var[in,out] COMPREPLY # -__ltrim_colon_completions() +# @since 2.12 +_comp_ltrim_colon_completions() { - if [[ $1 == *:* && $COMP_WORDBREAKS == *:* ]]; then - # Remove colon-word prefix from COMPREPLY items - local colon_word=${1%"${1##*:}"} - local i=${#COMPREPLY[*]} - while ((i-- > 0)); do - COMPREPLY[i]=${COMPREPLY[i]#"$colon_word"} - done - fi -} # __ltrim_colon_completions() + ((${#COMPREPLY[@]})) || return 0 + _comp_compgen -c "$1" ltrim_colon "${COMPREPLY[@]}" +} # This function quotes the argument in a way so that readline dequoting # results in the original argument. This is necessary for at least -# `compgen' which requires its arguments quoted/escaped: +# `compgen` which requires its arguments quoted/escaped: # # $ ls "a'b/" # c @@ -538,97 +1067,90 @@ __ltrim_colon_completions() # See also: # - https://lists.gnu.org/archive/html/bug-bash/2009-03/msg00155.html # - https://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01944.html -# @param $1 Argument to quote -# @param $2 Name of variable to return result to -_quote_readline_by_ref() -{ - if [ -z "$1" ]; then - # avoid quoting if empty - printf -v $2 %s "$1" - elif [[ $1 == \'* ]]; then +# @param $1 Argument to quote +# @var[out] REPLY Quoted result is stored in this variable +# @since 2.12 +# shellcheck disable=SC2178 # The assignment is not intended for the global "REPLY" +_comp_quote_compgen() +{ + if [[ $1 == \'* ]]; then # Leave out first character - printf -v $2 %s "${1:1}" - elif [[ $1 == \~* ]]; then - # avoid escaping first ~ - printf -v $2 \~%q "${1:1}" + REPLY=${1:1} else - printf -v $2 %q "$1" + printf -v REPLY %q "$1" + + # If result becomes quoted like this: $'string', re-evaluate in order + # to drop the additional quoting. See also: + # https://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01942.html + if [[ $REPLY == \$\'*\' ]]; then + local value=${REPLY:2:-1} # Strip beginning $' and ending '. + value=${value//'%'/%%} # Escape % for printf format. + # shellcheck disable=SC2059 + printf -v REPLY "$value" # Decode escape sequences of \.... + fi fi - - # Replace double escaping ( \\ ) by single ( \ ) - # This happens always when argument is already escaped at cmdline, - # and passed to this function as e.g.: file\ with\ spaces - [[ ${!2} == *\\* ]] && printf -v $2 %s "${1//\\\\/\\}" - # If result becomes quoted like this: $'string', re-evaluate in order to - # drop the additional quoting. See also: - # https://www.mail-archive.com/bash-completion-devel@lists.alioth.debian.org/msg01942.html - [[ ${!2} == \$* ]] && eval $2=${!2} -} # _quote_readline_by_ref() +} # This function performs file and directory completion. It's better than # simply using 'compgen -f', because it honours spaces in filenames. # @param $1 If `-d', complete only on directories. Otherwise filter/pick only # completions with `.$1' and the uppercase version of it as file # extension. +# @return 0 if at least one completion is generated, or 1 otherwise. # -_filedir() +# @since 2.12 +_comp_compgen_filedir() { - local IFS=$'\n' - - _tilde "${cur-}" || return + _comp_compgen_tilde && return local -a toks - local reset arg=${1-} - - if [[ $arg == -d ]]; then - reset=$(shopt -po noglob) - set -o noglob - toks=($(compgen -d -- "${cur-}")) - IFS=' ' - $reset - IFS=$'\n' + local _arg=${1-} + + if [[ $_arg == -d ]]; then + _comp_compgen -v toks -- -d else - local quoted - _quote_readline_by_ref "${cur-}" quoted + local REPLY + _comp_quote_compgen "${cur-}" + local _quoted=$REPLY + _comp_unlocal REPLY + + # work around bash-4.2 where compgen -f "''" produces nothing. + [[ $_quoted == "''" ]] && _quoted="" # Munge xspec to contain uppercase version too # https://lists.gnu.org/archive/html/bug-bash/2010-09/msg00036.html # news://news.gmane.io/4C940E1C.1010304@case.edu - local xspec=${arg:+"!*.@($arg|${arg^^})"} plusdirs=() + local _xspec=${_arg:+"!*.@($_arg|${_arg^^})"} _plusdirs=() # Use plusdirs to get dir completions if we have a xspec; if we don't, # there's no need, dirs come along with other completions. Don't use # plusdirs quite yet if fallback is in use though, in order to not ruin # the fallback condition with the "plus" dirs. - local opts=(-f -X "$xspec") - [[ $xspec ]] && plusdirs=(-o plusdirs) - [[ ${COMP_FILEDIR_FALLBACK-} || -z ${plusdirs-} ]] || - opts+=("${plusdirs[@]}") - - reset=$(shopt -po noglob) - set -o noglob - toks+=($(compgen "${opts[@]}" -- $quoted)) - IFS=' ' - $reset - IFS=$'\n' + local _opts=(-f -X "$_xspec") + [[ $_xspec ]] && _plusdirs=(-o plusdirs) + [[ ${BASH_COMPLETION_FILEDIR_FALLBACK-} || ! ${_plusdirs-} ]] || + _opts+=("${_plusdirs[@]}") + + _comp_compgen -v toks -c "$_quoted" -- "${_opts[@]}" # Try without filter if it failed to produce anything and configured to - [[ -n ${COMP_FILEDIR_FALLBACK-} && -n $arg && ${#toks[@]} -lt 1 ]] && { - reset=$(shopt -po noglob) - set -o noglob - toks+=($(compgen -f ${plusdirs+"${plusdirs[@]}"} -- $quoted)) - IFS=' ' - $reset - IFS=$'\n' - } + [[ ${BASH_COMPLETION_FILEDIR_FALLBACK-} && + $_arg && ${#toks[@]} -lt 1 ]] && + _comp_compgen -av toks -c "$_quoted" -- \ + -f ${_plusdirs+"${_plusdirs[@]}"} fi if ((${#toks[@]} != 0)); then - # 2>/dev/null for direct invocation, e.g. in the _filedir unit test + # 2>/dev/null for direct invocation, e.g. in the _comp_compgen_filedir + # unit test compopt -o filenames 2>/dev/null - COMPREPLY+=("${toks[@]}") fi -} # _filedir() + + # Note: bash < 4.4 has a bug that all the elements are connected with + # ${v+"${a[@]}"} when IFS does not contain whitespace. + local IFS=$' \t\n' + _comp_compgen -U toks set ${toks[@]+"${toks[@]}"} +} # This function splits $cur=--foo=bar into $prev=--foo, $cur=bar, making it # easier to support both "--foo bar" and "--foo=bar" style completions. @@ -636,13 +1158,13 @@ _filedir() # this to be useful. # Returns 0 if current option was split, 1 otherwise. # -_split_longopt() +_comp__split_longopt() { if [[ $cur == --?*=* ]]; then # Cut also backslash before '=' in case it ended up there # for some reason. - prev="${cur%%?(\\)=*}" - cur="${cur#*=}" + prev=${cur%%?(\\)=*} + cur=${cur#*=} return 0 fi @@ -652,51 +1174,140 @@ _split_longopt() # Complete variables. # @return True (0) if variables were completed, # False (> 0) if not. -_variables() +# @since 2.12 +_comp_compgen_variables() { if [[ $cur =~ ^(\$(\{[!#]?)?)([A-Za-z0-9_]*)$ ]]; then # Completing $var / ${var / ${!var / ${#var if [[ $cur == '${'* ]]; then local arrs vars - vars=($(compgen -A variable -P ${BASH_REMATCH[1]} -S '}' -- ${BASH_REMATCH[3]})) - arrs=($(compgen -A arrayvar -P ${BASH_REMATCH[1]} -S '[' -- ${BASH_REMATCH[3]})) + _comp_compgen -v vars -c "${BASH_REMATCH[3]}" -- -A variable -P "${BASH_REMATCH[1]}" -S '}' + _comp_compgen -v arrs -c "${BASH_REMATCH[3]}" -- -A arrayvar -P "${BASH_REMATCH[1]}" -S '[' if ((${#vars[@]} == 1 && ${#arrs[@]} != 0)); then # Complete ${arr with ${array[ if there is only one match, and that match is an array variable compopt -o nospace - COMPREPLY+=(${arrs[*]}) + _comp_compgen -U vars -U arrs -R -- -W '"${arrs[@]}"' else # Complete ${var with ${variable} - COMPREPLY+=(${vars[*]}) + _comp_compgen -U vars -U arrs -R -- -W '"${vars[@]}"' fi else # Complete $var with $variable - COMPREPLY+=($(compgen -A variable -P '$' -- "${BASH_REMATCH[3]}")) + _comp_compgen -ac "${BASH_REMATCH[3]}" -- -A variable -P '$' fi return 0 elif [[ $cur =~ ^(\$\{[#!]?)([A-Za-z0-9_]*)\[([^]]*)$ ]]; then # Complete ${array[i with ${array[idx]} - local IFS=$'\n' - COMPREPLY+=($(compgen -W '$(printf %s\\n "${!'${BASH_REMATCH[2]}'[@]}")' \ - -P "${BASH_REMATCH[1]}${BASH_REMATCH[2]}[" -S ']}' -- "${BASH_REMATCH[3]}")) + local vars + _comp_compgen -v vars -c "${BASH_REMATCH[3]}" -- -W '"${!'"${BASH_REMATCH[2]}"'[@]}"' \ + -P "${BASH_REMATCH[1]}${BASH_REMATCH[2]}[" -S ']}' # Complete ${arr[@ and ${arr[* if [[ ${BASH_REMATCH[3]} == [@*] ]]; then - COMPREPLY+=("${BASH_REMATCH[1]}${BASH_REMATCH[2]}[${BASH_REMATCH[3]}]}") + vars+=("${BASH_REMATCH[1]}${BASH_REMATCH[2]}[${BASH_REMATCH[3]}]}") + fi + # array indexes may have colons + if ((${#vars[@]})); then + _comp_compgen -U vars -c "$cur" ltrim_colon "${vars[@]}" + else + _comp_compgen_set fi - __ltrim_colon_completions "$cur" # array indexes may have colons return 0 elif [[ $cur =~ ^\$\{[#!]?[A-Za-z0-9_]*\[.*\]$ ]]; then # Complete ${array[idx] with ${array[idx]} - COMPREPLY+=("$cur}") - __ltrim_colon_completions "$cur" + _comp_compgen -c "$cur" ltrim_colon "$cur}" return 0 + fi + return 1 +} + +# Complete a delimited value. +# +# Usage: [-k] DELIMITER COMPGEN_ARG... +# -k: do not filter out already present tokens in value +# @since 2.12 +_comp_delimited() +{ + local prefix="" delimiter=$1 deduplicate=set + shift + if [[ $delimiter == -k ]]; then + deduplicate="" + delimiter=$1 + shift + fi + [[ $cur == *"$delimiter"* ]] && prefix=${cur%"$delimiter"*}$delimiter + + if [[ $deduplicate ]]; then + # We could construct a -X pattern to feed to compgen, but that'd + # conflict with possibly already set -X in $@, as well as have + # glob char escaping issues to deal with. Do removals by hand instead. + _comp_compgen -R -- "$@" + local -a existing + _comp_split -F "$delimiter" existing "$cur" + # Do not remove the last from existing if it's not followed by the + # delimiter so we get space appended. + [[ ! $cur || $cur == *"$delimiter" ]] || unset -v "existing[${#existing[@]}-1]" + if ((${#COMPREPLY[@]})); then + local x i + for x in ${existing+"${existing[@]}"}; do + for i in "${!COMPREPLY[@]}"; do + if [[ $x == "${COMPREPLY[i]}" ]]; then + unset -v 'COMPREPLY[i]' + continue 2 # assume no dupes in COMPREPLY + fi + done + done + ((${#COMPREPLY[@]})) && + _comp_compgen -c "${cur##*"$delimiter"}" -- -W '"${COMPREPLY[@]}"' + fi + else + _comp_compgen -c "${cur##*"$delimiter"}" -- "$@" + fi + + # It would seem that in some specific cases we could avoid adding the + # prefix to all completions, thereby making the list of suggestions + # cleaner, and only adding it when there's exactly one completion. + # The cases where this opportunity has been observed involve having + # `show-all-if-ambiguous` on, but even that has cases where it fails + # and the last separator including everything before it is lost. + # https://github.com/scop/bash-completion/pull/913#issuecomment-1490140309 + local i + for i in "${!COMPREPLY[@]}"; do + COMPREPLY[i]="$prefix${COMPREPLY[i]}" + done + + [[ $delimiter != : ]] || _comp_ltrim_colon_completions "$cur" +} + +# Complete assignment of various known environment variables. +# +# The word to be completed is expected to contain the entire assignment, +# including the variable name and the "=". Some known variables are completed +# with colon separated values; for those to work, colon should not have been +# used to split words. See related parameters to _comp_initialize. +# +# @param $1 variable assignment to be completed +# @return True (0) if variable value completion was attempted, +# False (> 0) if not. +# @since 2.12 +_comp_variable_assignments() +{ + local cur=${1-} i + + if [[ $cur =~ ^([A-Za-z_][A-Za-z0-9_]*)=(.*)$ ]]; then + prev=${BASH_REMATCH[1]} + cur=${BASH_REMATCH[2]} else - case ${prev-} in - TZ) - cur=/usr/share/zoneinfo/$cur - _filedir + return 1 + fi + + case $prev in + TZ) + cur=/usr/share/zoneinfo/$cur + _comp_compgen_filedir + if ((${#COMPREPLY[@]})); then for i in "${!COMPREPLY[@]}"; do if [[ ${COMPREPLY[i]} == *.tab ]]; then - unset 'COMPREPLY[i]' + unset -v 'COMPREPLY[i]' continue elif [[ -d ${COMPREPLY[i]} ]]; then COMPREPLY[i]+=/ @@ -704,20 +1315,24 @@ _variables() fi COMPREPLY[i]=${COMPREPLY[i]#/usr/share/zoneinfo/} done - return 0 - ;; - TERM) - _terms - return 0 - ;; - LANG | LC_*) - COMPREPLY=($(compgen -W '$(locale -a 2>/dev/null)' \ - -- "$cur")) - return 0 - ;; - esac - fi - return 1 + fi + ;; + TERM) + _comp_compgen_terms + ;; + LANG | LC_*) + _comp_compgen_split -- "$(locale -a 2>/dev/null)" + ;; + LANGUAGE) + _comp_delimited : -W '$(locale -a 2>/dev/null)' + ;; + *) + _comp_compgen_variables && return 0 + _comp_compgen -a filedir + ;; + esac + + return 0 } # Initialize completion and deal with various general things: do file @@ -727,18 +1342,37 @@ _variables() # cur, prev, words, and cword are local, ditto split if you use -s. # # Options: -# -n EXCLUDE Passed to _get_comp_words_by_ref -n with redirection chars -# -e XSPEC Passed to _filedir as first arg for stderr redirections -# -o XSPEC Passed to _filedir as first arg for other output redirections -# -i XSPEC Passed to _filedir as first arg for stdin redirections -# -s Split long options with _split_longopt, implies -n = +# -n EXCLUDE Passed to _comp_get_words -n with redirection chars +# -e XSPEC Passed to _comp_compgen_filedir as first arg for stderr +# redirections +# -o XSPEC Passed to _comp_compgen_filedir as first arg for other output +# redirections +# -i XSPEC Passed to _comp_compgen_filedir as first arg for stdin +# redirections +# -s Split long options with _comp__split_longopt, implies -n = +# @param $1...$3 args Original arguments specified to the completion function. +# The first argument $1 is command name. The second +# argument $2 is the string before the cursor in the +# current word. The third argument $3 is the previous +# word. +# @var[out] cur Reconstructed current word +# @var[out] prev Reconstructed previous word +# @var[out] words Reconstructed words +# @var[out] cword Current word index in `words` +# @var[out] comp_args Original arguments specified to the completion +# function are saved in this array, if the arguments +# $1...$3 is specified. +# @var[out,opt] was_split When "-s" is specified, `"set"/""` is set depending +# on whether the split happened. # @return True (0) if completion needs further processing, # False (> 0) no further processing is necessary. # -_init_completion() +# @since 2.12 +_comp_initialize() { - local exclude="" flag outx errx inx OPTIND=1 + local exclude="" opt_split="" outx="" errx="" inx="" + local flag OPTIND=1 OPTARG="" OPTERR=0 while getopts "n:e:o:i:s" flag "$@"; do case $flag in n) exclude+=$OPTARG ;; @@ -746,8 +1380,9 @@ _init_completion() o) outx=$OPTARG ;; i) inx=$OPTARG ;; s) - split=false - exclude+== + opt_split="set" + was_split="" + exclude+="=" ;; *) echo "bash_completion: $FUNCNAME: usage error" >&2 @@ -755,13 +1390,15 @@ _init_completion() ;; esac done + shift "$((OPTIND - 1))" + (($#)) && comp_args=("$@") COMPREPLY=() - local redir="@(?([0-9])<|?([0-9&])>?(>)|>&)" - _get_comp_words_by_ref -n "$exclude<>&" cur prev words cword + local redir='@(?(+([0-9])|{[a-zA-Z_]*([a-zA-Z_0-9])})@(>?([>|&])|&])|<?(>))' + _comp_get_words -n "$exclude<>&" cur prev words cword # Complete variable names. - _variables && return 1 + _comp_compgen_variables && return 1 # Complete on files if current is a redirect possibly followed by a # filename, e.g. ">foo", or previous is a "bare" redirect, e.g. ">". @@ -780,8 +1417,9 @@ _init_completion() esac ;; esac - cur="${cur##$redir}" - _filedir $xspec + # shellcheck disable=SC2295 # redir is a pattern + cur=${cur##$redir} + _comp_compgen_filedir "$xspec" return 1 fi @@ -802,259 +1440,342 @@ _init_completion() ((cword <= 0)) && return 1 prev=${words[cword - 1]} - [[ ${split-} ]] && _split_longopt && split=true + [[ $opt_split ]] && _comp__split_longopt && was_split="set" return 0 } -# Helper function for _parse_help and _parse_usage. -__parse_options() +# Helper function for _comp_compgen_help and _comp_compgen_usage. +# Obtain the help output based on the arguments. +# @param $@ args Arguments specified to the caller. +# @var[out] _lines +# @return 2 if the usage is wrong, 1 if no output is obtained, or otherwise 0. +_comp_compgen_help__get_help_lines() +{ + local -a help_cmd + case ${1-} in + -) + if (($# > 1)); then + printf 'bash_completion: %s -: extra arguments for -\n' "${FUNCNAME[1]}" >&2 + printf 'usage: %s -\n' "${FUNCNAME[1]}" >&2 + printf 'usage: %s -c cmd args...\n' "${FUNCNAME[1]}" >&2 + printf 'usage: %s [-- args...]\n' "${FUNCNAME[1]}" >&2 + return 2 + fi + help_cmd=(exec cat) + ;; + -c) + if (($# < 2)); then + printf 'bash_completion: %s -c: no command is specified\n' "${FUNCNAME[1]}" >&2 + printf 'usage: %s -\n' "${FUNCNAME[1]}" >&2 + printf 'usage: %s -c cmd args...\n' "${FUNCNAME[1]}" >&2 + printf 'usage: %s [-- args...]\n' "${FUNCNAME[1]}" >&2 + return 2 + fi + help_cmd=("${@:2}") + ;; + --) shift 1 ;& + *) + local REPLY + _comp_dequote "${comp_args[0]-}" || REPLY=${comp_args[0]-} + help_cmd=("${REPLY:-false}" "$@") + ;; + esac + + local REPLY + _comp_split -l REPLY "$(LC_ALL=C "${help_cmd[@]}" 2>&1)" && + _lines=("${REPLY[@]}") +} + +# Helper function for _comp_compgen_help and _comp_compgen_usage. +# @var[in,out] options Add options +# @return True (0) if an option was found, False (> 0) otherwise +_comp_compgen_help__parse() { - local option option2 i IFS=$' \t\n,/|' + local option option2 i # Take first found long option, or first one (short) if not found. option= - local -a array=($1) - for i in "${array[@]}"; do - case "$i" in - ---*) break ;; - --?*) - option=$i - break - ;; - -?*) [[ $option ]] || option=$i ;; - *) break ;; - esac - done - [[ $option ]] || return 0 - - IFS=$' \t\n' # affects parsing of the regexps below... + local -a array + if _comp_split -F $' \t\n,/|' array "$1"; then + for i in "${array[@]}"; do + case "$i" in + ---*) break ;; + --?*) + option=$i + break + ;; + -?*) [[ $option ]] || option=$i ;; + *) break ;; + esac + done + fi + [[ $option ]] || return 1 # Expand --[no]foo to --foo and --nofoo etc if [[ $option =~ (\[((no|dont)-?)\]). ]]; then option2=${option/"${BASH_REMATCH[1]}"/} option2=${option2%%[<{().[]*} - printf '%s\n' "${option2/=*/=}" + options+=("${option2/=*/=}") option=${option/"${BASH_REMATCH[1]}"/"${BASH_REMATCH[2]}"} fi - option=${option%%[<{().[]*} - printf '%s\n' "${option/=*/=}" + [[ $option =~ ^([^=<{().[]|\.[A-Za-z0-9])+=? ]] && + options+=("$BASH_REMATCH") } -# Parse GNU style help output of the given command. -# @param $1 command; if "-", read from stdin and ignore rest of args -# @param $2 command options (default: --help) +# Parse GNU style help output of the given command and generate and store +# completions in an array. The help output is produced in the way depending on +# the usage: +# usage: _comp_compgen_help - # read from stdin +# usage: _comp_compgen_help -c cmd args... # run "cmd args..." +# usage: _comp_compgen_help [[--] args...] # run "${comp_args[0]} args..." +# When no arguments are specified, `--help` is assumed. # -_parse_help() -{ - eval local cmd="$(quote "$1")" - local line - { - case $cmd in - -) cat ;; - *) LC_ALL=C "$(dequote "$cmd")" ${2:---help} 2>&1 ;; - esac - } | - while read -r line; do - - [[ $line == *([[:blank:]])-* ]] || continue - # transform "-f FOO, --foo=FOO" to "-f , --foo=FOO" etc - while [[ $line =~ \ - ((^|[^-])-[A-Za-z0-9?][[:space:]]+)\[?[A-Z0-9]+([,_-]+[A-Z0-9]+)?(\.\.+)?\]? ]]; do - line=${line/"${BASH_REMATCH[0]}"/"${BASH_REMATCH[1]}"} - done - __parse_options "${line// or /, }" - +# @var[in] comp_args[0] +# @since 2.12 +_comp_compgen_help() +{ + (($#)) || set -- -- --help + + local -a _lines + _comp_compgen_help__get_help_lines "$@" || return "$?" + + local -a options=() + local _line + for _line in "${_lines[@]}"; do + [[ $_line == *([[:blank:]])-* ]] || continue + # transform "-f FOO, --foo=FOO" to "-f , --foo=FOO" etc + while [[ $_line =~ ((^|[^-])-[A-Za-z0-9?][[:space:]]+)\[?[A-Z0-9]+([,_-]+[A-Z0-9]+)?(\.\.+)?\]? ]]; do + _line=${_line/"${BASH_REMATCH[0]}"/"${BASH_REMATCH[1]}"} done + _comp_compgen_help__parse "${_line// or /, }" + done + ((${#options[@]})) || return 1 + + _comp_compgen -U options -- -W '"${options[@]}"' + return 0 } -# Parse BSD style usage output (options in brackets) of the given command. -# @param $1 command; if "-", read from stdin and ignore rest of args -# @param $2 command options (default: --usage) +# Parse BSD style usage output (options in brackets) of the given command. The +# help output is produced in the way depending on the usage: +# usage: _comp_compgen_usage - # read from stdin +# usage: _comp_compgen_usage -c cmd args... # run "cmd args..." +# usage: _comp_compgen_usage [[--] args...] # run "${comp_args[0]} args..." +# When no arguments are specified, `--usage` is assumed. # -_parse_usage() -{ - eval local cmd="$(quote "$1")" - local line match option i char - { - case $cmd in - -) cat ;; - *) LC_ALL=C "$(dequote "$cmd")" ${2:---usage} 2>&1 ;; - esac - } | - while read -r line; do - - while [[ $line =~ \[[[:space:]]*(-[^]]+)[[:space:]]*\] ]]; do - match=${BASH_REMATCH[0]} - option=${BASH_REMATCH[1]} - case $option in - -?(\[)+([a-zA-Z0-9?])) - # Treat as bundled short options - for ((i = 1; i < ${#option}; i++)); do - char=${option:i:1} - [[ $char != '[' ]] && printf '%s\n' -$char - done - ;; - *) - __parse_options "$option" - ;; - esac - line=${line#*"$match"} - done - +# @var[in] comp_args[0] +# @since 2.12 +_comp_compgen_usage() +{ + (($#)) || set -- -- --usage + + local -a _lines + _comp_compgen_help__get_help_lines "$@" || return "$?" + + local -a options=() + local _line _match _option _i _char + for _line in "${_lines[@]}"; do + while [[ $_line =~ \[[[:space:]]*(-[^]]+)[[:space:]]*\] ]]; do + _match=${BASH_REMATCH[0]} + _option=${BASH_REMATCH[1]} + case $_option in + -?(\[)+([a-zA-Z0-9?])) + # Treat as bundled short options + for ((_i = 1; _i < ${#_option}; _i++)); do + _char=${_option:_i:1} + [[ $_char != '[' ]] && options+=("-$_char") + done + ;; + *) + _comp_compgen_help__parse "$_option" + ;; + esac + _line=${_line#*"$_match"} done + done + ((${#options[@]})) || return 1 + + _comp_compgen -U options -- -W '"${options[@]}"' + return 0 } # This function completes on signal names (minus the SIG prefix) # @param $1 prefix -_signals() +# +# @since 2.12 +_comp_compgen_signals() { - local -a sigs=($(compgen -P "${1-}" -A signal "SIG${cur#${1-}}")) - COMPREPLY+=("${sigs[@]/#${1-}SIG/${1-}}") + local -a sigs + _comp_compgen -v sigs -c "SIG${cur#"${1-}"}" -- -A signal && + _comp_compgen -RU sigs -- -P "${1-}" -W '"${sigs[@]#SIG}"' } # This function completes on known mac addresses # -_mac_addresses() +# @since 2.12 +_comp_compgen_mac_addresses() { - local re='\([A-Fa-f0-9]\{2\}:\)\{5\}[A-Fa-f0-9]\{2\}' + local _re='\([A-Fa-f0-9]\{2\}:\)\{5\}[A-Fa-f0-9]\{2\}' local PATH="$PATH:/sbin:/usr/sbin" + local -a addresses # Local interfaces # - ifconfig on Linux: HWaddr or ether # - ifconfig on FreeBSD: ether # - ip link: link/ether - COMPREPLY+=($( + _comp_compgen -v addresses split -- "$( { - LC_ALL=C ifconfig -a || ip link show + LC_ALL=C ifconfig -a || ip -c=never link show || ip link show } 2>/dev/null | command sed -ne \ - "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]].*/\1/p" -ne \ - "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($re\)[[:space:]]*$/\1/p" -ne \ - "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($re\)[[:space:]].*|\2|p" -ne \ - "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($re\)[[:space:]]*$|\2|p" - )) + "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($_re\)[[:space:]].*/\1/p" -ne \ + "s/.*[[:space:]]HWaddr[[:space:]]\{1,\}\($_re\)[[:space:]]*$/\1/p" -ne \ + "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($_re\)[[:space:]].*|\2|p" -ne \ + "s|.*[[:space:]]\(link/\)\{0,1\}ether[[:space:]]\{1,\}\($_re\)[[:space:]]*$|\2|p" + )" # ARP cache - COMPREPLY+=($({ - arp -an || ip neigh show - } 2>/dev/null | command sed -ne \ - "s/.*[[:space:]]\($re\)[[:space:]].*/\1/p" -ne \ - "s/.*[[:space:]]\($re\)[[:space:]]*$/\1/p")) + _comp_compgen -av addresses split -- "$( + { + arp -an || ip -c=never neigh show || ip neigh show + } 2>/dev/null | command sed -ne \ + "s/.*[[:space:]]\($_re\)[[:space:]].*/\1/p" -ne \ + "s/.*[[:space:]]\($_re\)[[:space:]]*$/\1/p" + )" # /etc/ethers - COMPREPLY+=($(command sed -ne \ - "s/^[[:space:]]*\($re\)[[:space:]].*/\1/p" /etc/ethers 2>/dev/null)) + _comp_compgen -av addresses split -- "$(command sed -ne \ + "s/^[[:space:]]*\($_re\)[[:space:]].*/\1/p" /etc/ethers 2>/dev/null)" - COMPREPLY=($(compgen -W '${COMPREPLY[@]}' -- "$cur")) - __ltrim_colon_completions "$cur" + _comp_compgen -U addresses ltrim_colon "${addresses[@]}" } # This function completes on configured network interfaces # -_configured_interfaces() +# @since 2.12 +_comp_compgen_configured_interfaces() { + local -a files if [[ -f /etc/debian_version ]]; then # Debian system - COMPREPLY=($(compgen -W "$(command sed -ne 's|^iface \([^ ]\{1,\}\).*$|\1|p' \ - /etc/network/interfaces /etc/network/interfaces.d/* 2>/dev/null)" \ - -- "$cur")) + _comp_expand_glob files '/etc/network/interfaces /etc/network/interfaces.d/*' || return 0 + _comp_compgen -U files split -- "$(command sed -ne \ + 's|^iface \([^ ]\{1,\}\).*$|\1|p' "${files[@]}" 2>/dev/null)" elif [[ -f /etc/SuSE-release ]]; then # SuSE system - COMPREPLY=($(compgen -W "$(printf '%s\n' \ - /etc/sysconfig/network/ifcfg-* | - command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" -- "$cur")) + _comp_expand_glob files '/etc/sysconfig/network/ifcfg-*' || return 0 + _comp_compgen -U files split -- "$(printf '%s\n' "${files[@]}" | + command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" elif [[ -f /etc/pld-release ]]; then # PLD Linux - COMPREPLY=($(compgen -W "$(command ls -B \ - /etc/sysconfig/interfaces | - command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" -- "$cur")) + _comp_compgen -U files split -- "$(command ls -B /etc/sysconfig/interfaces | + command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" else # Assume Red Hat - COMPREPLY=($(compgen -W "$(printf '%s\n' \ - /etc/sysconfig/network-scripts/ifcfg-* | - command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" -- "$cur")) + _comp_expand_glob files '/etc/sysconfig/network-scripts/ifcfg-*' || return 0 + _comp_compgen -U files split -- "$(printf '%s\n' "${files[@]}" | + command sed -ne 's|.*ifcfg-\([^*].*\)$|\1|p')" fi } # Local IP addresses. +# If producing IPv6 completions, `_comp_initialize` with `-n :`. +# # -4: IPv4 addresses only (default) # -6: IPv6 addresses only # -a: All addresses # -_ip_addresses() +# @since 2.12 +_comp_compgen_ip_addresses() { - local n + local _n case ${1-} in - -a) n='6\?' ;; - -6) n='6' ;; - *) n= ;; + -a) _n='6\{0,1\}' ;; + -6) _n='6' ;; + *) _n= ;; esac local PATH=$PATH:/sbin - local addrs=$({ - LC_ALL=C ifconfig -a || ip addr show + local addrs + _comp_compgen -v addrs split -- "$({ + LC_ALL=C ifconfig -a || ip -c=never addr show || ip addr show } 2>/dev/null | command sed -e 's/[[:space:]]addr:/ /' -ne \ - "s|.*inet${n}[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p") - COMPREPLY+=($(compgen -W "$addrs" -- "${cur-}")) + "s|.*inet${_n}[[:space:]]\{1,\}\([^[:space:]/]*\).*|\1|p")" || + return + + if [[ ! $_n ]]; then + _comp_compgen -U addrs set "${addrs[@]}" + else + _comp_compgen -U addrs ltrim_colon "${addrs[@]}" + fi } -# This function completes on available kernels +# This function completes on available kernel versions # -_kernel_versions() +# @since 2.12 +_comp_compgen_kernel_versions() { - COMPREPLY=($(compgen -W '$(command ls /lib/modules)' -- "$cur")) + _comp_compgen_split -- "$(command ls /lib/modules)" } # This function completes on all available network interfaces # -a: restrict to active interfaces only # -w: restrict to wireless interfaces only # -_available_interfaces() +# @since 2.12 +_comp_compgen_available_interfaces() { local PATH=$PATH:/sbin - - COMPREPLY=($({ - if [[ ${1:-} == -w ]]; then + local generated + _comp_compgen -v generated split -- "$({ + if [[ ${1-} == -w ]]; then iwconfig - elif [[ ${1:-} == -a ]]; then - ifconfig || ip link show up + elif [[ ${1-} == -a ]]; then + ifconfig || ip -c=never link show up || ip link show up else - ifconfig -a || ip link show + ifconfig -a || ip -c=never link show || ip link show fi - } 2>/dev/null | awk \ - '/^[^ \t]/ { if ($1 ~ /^[0-9]+:/) { print $2 } else { print $1 } }')) - - COMPREPLY=($(compgen -W '${COMPREPLY[@]/%[[:punct:]]/}' -- "$cur")) + } 2>/dev/null | _comp_awk \ + '/^[^ \t]/ { if ($1 ~ /^[0-9]+:/) { print $2 } else { print $1 } }')" && + _comp_compgen -U generated set "${generated[@]%:}" } # Echo number of CPUs, falling back to 1 on failure. -_ncpus() +# @var[out] REPLY +# @return 0 if it successfully obtained the number of CPUs, or otherwise 1 +# @since 2.12 +_comp_get_ncpus() { local var=NPROCESSORS_ONLN - [[ $OSTYPE == *linux* ]] && var=_$var - local n=$(getconf $var 2>/dev/null) - printf %s ${n:-1} + [[ $OSTYPE == *@(linux|msys|cygwin)* ]] && var=_$var + if REPLY=$(getconf $var 2>/dev/null) && ((REPLY >= 1)); then + return 0 + else + REPLY=1 + return 1 + fi } # Perform tilde (~) completion -# @return True (0) if completion needs further processing, -# False (> 0) if tilde is followed by a valid username, completions -# are put in COMPREPLY and no further processing is necessary. -_tilde() +# @return False (1) if completion needs further processing, +# True (0) if tilde is followed by a valid username, completions are +# put in COMPREPLY and no further processing is necessary. +# @since 2.12 +_comp_compgen_tilde() { - local result=0 - if [[ ${1-} == \~* && $1 != */* ]]; then + if [[ ${cur-} == \~* && $cur != */* ]]; then # Try generate ~username completions - COMPREPLY=($(compgen -P '~' -u -- "${1#\~}")) - result=${#COMPREPLY[@]} - # 2>/dev/null for direct invocation, e.g. in the _tilde unit test - ((result > 0)) && compopt -o filenames 2>/dev/null + if _comp_compgen -c "${cur#\~}" -- -P '~' -u; then + # 2>/dev/null for direct invocation, e.g. in the + # _comp_compgen_tilde unit test + compopt -o filenames 2>/dev/null + return 0 + fi fi - return $result + return 1 } -# Expand variable starting with tilde (~) +# Expand string starting with tilde (~) # We want to expand ~foo/... to /home/foo/... to avoid problems when # word-to-complete starting with a tilde is fed to commands and ending up # quoted instead of expanded. @@ -1063,11 +1784,11 @@ _tilde() # a dollar sign variable ($) or asterisk (*) is not expanded. # Example usage: # -# $ v="~"; __expand_tilde_by_ref v; echo "$v" +# $ _comp_expand_tilde "~"; echo "$REPLY" # # Example output: # -# v output +# $1 REPLY # -------- ---------------- # ~ /home/user # ~foo/bar /home/foo/bar @@ -1075,17 +1796,22 @@ _tilde() # ~foo/a b /home/foo/a b # ~foo/* /home/foo/* # -# @param $1 Name of variable (not the value of the variable) to expand -__expand_tilde_by_ref() -{ - if [[ ${!1-} == \~* ]]; then - eval $1="$(printf ~%q "${!1#\~}")" +# @param $1 Value to expand +# @var[out] REPLY Expanded result +# @since 2.12 +_comp_expand_tilde() +{ + REPLY=$1 + if [[ $1 == \~* ]]; then + printf -v REPLY '~%q' "${1#\~}" + eval "REPLY=$REPLY" fi -} # __expand_tilde_by_ref() +} # This function expands tildes in pathnames # -_expand() +# @since 2.12 +_comp_expand() { # Expand ~username type directory specifications. We want to expand # ~foo/... to /home/foo/... to avoid problems when $cur starting with @@ -1093,58 +1819,67 @@ _expand() case ${cur-} in ~*/*) - __expand_tilde_by_ref cur + local REPLY + _comp_expand_tilde "$cur" + cur=$REPLY ;; ~*) - _tilde "$cur" || - eval COMPREPLY[0]="$(printf ~%q "${COMPREPLY[0]#\~}")" - return ${#COMPREPLY[@]} + _comp_compgen -v COMPREPLY tilde && + eval "COMPREPLY[0]=$(printf ~%q "${COMPREPLY[0]#\~}")" && + return 1 ;; esac + return 0 } # Process ID related functions. # for AIX and Solaris we use X/Open syntax, BSD for others. +# +# @since 2.12 if [[ $OSTYPE == *@(solaris|aix)* ]]; then # This function completes on process IDs. - _pids() + _comp_compgen_pids() { - COMPREPLY=($(compgen -W '$(command ps -efo pid | command sed 1d)' -- "$cur")) + _comp_compgen_split -- "$(command ps -efo pid | command sed 1d)" } - _pgids() + _comp_compgen_pgids() { - COMPREPLY=($(compgen -W '$(command ps -efo pgid | command sed 1d)' -- "$cur")) + _comp_compgen_split -- "$(command ps -efo pgid | command sed 1d)" } - _pnames() + _comp_compgen_pnames() { - COMPREPLY=($(compgen -X '' -W '$(command ps -efo comm | \ - command sed -e 1d -e "s:.*/::" -e "s/^-//" | sort -u)' -- "$cur")) + _comp_compgen_split -X '' -- "$(command ps -efo comm | + command sed -e 1d -e 's:.*/::' -e 's/^-//' | sort -u)" } else - _pids() + _comp_compgen_pids() { - COMPREPLY=($(compgen -W '$(command ps axo pid=)' -- "$cur")) + _comp_compgen_split -- "$(command ps ax -o pid=)" } - _pgids() + _comp_compgen_pgids() { - COMPREPLY=($(compgen -W '$(command ps axo pgid=)' -- "$cur")) + _comp_compgen_split -- "$(command ps ax -o pgid=)" } # @param $1 if -s, don't try to avoid truncated command names - _pnames() + _comp_compgen_pnames() { - local -a procs + local -a procs=() if [[ ${1-} == -s ]]; then - procs=($(command ps axo comm | command sed -e 1d)) + _comp_split procs "$(command ps ax -o comm | command sed -e 1d)" else - local line i=-1 ifs=$IFS - IFS=$'\n' - local -a psout=($(command ps axo command=)) - IFS=$ifs + # Some versions of ps don't support "command", but do "comm", e.g. + # some busybox ones. Fall back + local -a psout + _comp_split -l psout "$({ + command ps ax -o command= || command ps ax -o comm= + } 2>/dev/null)" + local line i=-1 for line in "${psout[@]}"; do if ((i == -1)); then - # First line, see if it has COMMAND column header. For example - # the busybox ps does that, i.e. doesn't respect axo command= + # First line, see if it has COMMAND column header. For + # example some busybox ps versions do that, i.e. don't + # respect command= if [[ $line =~ ^(.*[[:space:]])COMMAND([[:space:]]|$) ]]; then # It does; store its index. i=${#BASH_REMATCH[1]} @@ -1156,147 +1891,165 @@ else # line=${line:i} # take command starting from found index line=${line%% *} # trim arguments - procs+=($line) + [[ $line ]] && procs+=("$line") fi done if ((i == -1)); then - # Regular axo command= parsing + # Regular command= parsing for line in "${psout[@]}"; do if [[ $line =~ ^[[(](.+)[])]$ ]]; then - procs+=(${BASH_REMATCH[1]}) + procs+=("${BASH_REMATCH[1]}") else line=${line%% *} # trim arguments line=${line##@(*/|-)} # trim leading path and - - procs+=($line) + [[ $line ]] && procs+=("$line") fi done fi fi - COMPREPLY=($(compgen -X "" -W '${procs[@]}' -- "$cur")) + ((${#procs[@]})) && + _comp_compgen -U procs -- -X "" -W '"${procs[@]}"' } fi # This function completes on user IDs # -_uids() +# @since 2.12 +_comp_compgen_uids() { if type getent &>/dev/null; then - COMPREPLY=($(compgen -W '$(getent passwd | cut -d: -f3)' -- "$cur")) + _comp_compgen_split -- "$(getent passwd | cut -d: -f3)" elif type perl &>/dev/null; then - COMPREPLY=($(compgen -W '$(perl -e '"'"'while (($uid) = (getpwent)[2]) { print $uid . "\n" }'"'"')' -- "$cur")) + _comp_compgen_split -- "$(perl -e 'while (($uid) = (getpwent)[2]) { print $uid . "\n" }')" else # make do with /etc/passwd - COMPREPLY=($(compgen -W '$(cut -d: -f3 /etc/passwd)' -- "$cur")) + _comp_compgen_split -- "$(cut -d: -f3 /etc/passwd)" fi } # This function completes on group IDs # -_gids() +# @since 2.12 +_comp_compgen_gids() { if type getent &>/dev/null; then - COMPREPLY=($(compgen -W '$(getent group | cut -d: -f3)' -- "$cur")) + _comp_compgen_split -- "$(getent group | cut -d: -f3)" elif type perl &>/dev/null; then - COMPREPLY=($(compgen -W '$(perl -e '"'"'while (($gid) = (getgrent)[2]) { print $gid . "\n" }'"'"')' -- "$cur")) + _comp_compgen_split -- "$(perl -e 'while (($gid) = (getgrent)[2]) { print $gid . "\n" }')" else # make do with /etc/group - COMPREPLY=($(compgen -W '$(cut -d: -f3 /etc/group)' -- "$cur")) + _comp_compgen_split -- "$(cut -d: -f3 /etc/group)" fi } # Glob for matching various backup files. # -_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|dpkg*|rpm@(orig|new|save))))' +_comp_backup_glob='@(#*#|*@(~|.@(bak|orig|rej|swp|@(dpkg|ucf)-*|rpm@(orig|new|save))))' # Complete on xinetd services # -_xinetd_services() +# @since 2.12 +_comp_compgen_xinetd_services() { - local xinetddir=${BASHCOMP_XINETDDIR:-/etc/xinetd.d} + local xinetddir=${_comp__test_xinetd_dir:-/etc/xinetd.d} if [[ -d $xinetddir ]]; then - local IFS=$' \t\n' reset=$(shopt -p nullglob) - shopt -s nullglob - local -a svcs=($(printf '%s\n' $xinetddir/!($_backup_glob))) - $reset - ((!${#svcs[@]})) || - COMPREPLY+=($(compgen -W '${svcs[@]#$xinetddir/}' -- "${cur-}")) + local -a svcs + if _comp_expand_glob svcs '$xinetddir/!($_comp_backup_glob)'; then + _comp_compgen -U svcs -U xinetddir -- -W '"${svcs[@]#$xinetddir/}"' + fi fi } # This function completes on services # -_services() +# @since 2.12 +_comp_compgen_services() { local sysvdirs - _sysvdirs + _comp_sysvdirs || return 1 - local IFS=$' \t\n' reset=$(shopt -p nullglob) - shopt -s nullglob - COMPREPLY=( - $(printf '%s\n' ${sysvdirs[0]}/!($_backup_glob|functions|README))) - $reset + local services + _comp_expand_glob services '${sysvdirs[0]}/!($_comp_backup_glob|functions|README)' - COMPREPLY+=($({ + local _generated=$({ systemctl list-units --full --all || systemctl list-unit-files } 2>/dev/null | - awk '$1 ~ /\.service$/ { sub("\\.service$", "", $1); print $1 }')) + _comp_awk '$1 ~ /\.service$/ { sub("\\.service$", "", $1); print $1 }') + _comp_split -la services "$_generated" if [[ -x /sbin/upstart-udev-bridge ]]; then - COMPREPLY+=($(initctl list 2>/dev/null | cut -d' ' -f1)) + _comp_split -la services "$(initctl list 2>/dev/null | cut -d' ' -f1)" fi - COMPREPLY=($(compgen -W '${COMPREPLY[@]#${sysvdirs[0]}/}' -- "$cur")) + ((${#services[@]})) || return 1 + _comp_compgen -U services -U sysvdirs -- -W '"${services[@]#${sysvdirs[0]}/}"' } # This completes on a list of all available service scripts for the # 'service' command and/or the SysV init.d directory, followed by # that script's available commands +# This function is in the main bash_completion file rather than in a separate +# one, because we set it up eagerly as completer for scripts in sysv init dirs +# below. # -_service() +# @since 2.12 +_comp_complete_service() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return # don't complete past 2nd token ((cword > 2)) && return if [[ $cword -eq 1 && $prev == ?(*/)service ]]; then - _services - [[ -e /etc/mandrake-release ]] && _xinetd_services + _comp_compgen_services + [[ -e /etc/mandrake-release ]] && _comp_compgen_xinetd_services else local sysvdirs - _sysvdirs - COMPREPLY=($(compgen -W '`command sed -e "y/|/ /" \ - -ne "s/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p" \ - ${sysvdirs[0]}/${prev##*/} 2>/dev/null` start stop' -- "$cur")) + _comp_sysvdirs || return 1 + _comp_compgen_split -l -- "$(command sed -e 'y/|/ /' \ + -ne 's/^.*\(U\|msg_u\)sage.*{\(.*\)}.*$/\2/p' \ + "${sysvdirs[0]}/${prev##*/}" 2>/dev/null) start stop" fi } && - complete -F _service service -_sysvdirs -for svcdir in "${sysvdirs[@]}"; do - for svc in $svcdir/!($_backup_glob); do - [[ -x $svc ]] && complete -F _service $svc - done -done -unset svc svcdir sysvdirs + complete -F _comp_complete_service service + +_comp__init_set_up_service_completions() +{ + local sysvdirs svc svcdir svcs + _comp_sysvdirs && + for svcdir in "${sysvdirs[@]}"; do + if _comp_expand_glob svcs '"$svcdir"/!($_comp_backup_glob)'; then + for svc in "${svcs[@]}"; do + [[ -x $svc ]] && complete -F _comp_complete_service "$svc" + done + fi + done + unset -f "$FUNCNAME" +} +_comp__init_set_up_service_completions -# This function completes on modules +# This function completes on kernel modules +# @param $1 kernel version # -_modules() +# @since 2.12 +_comp_compgen_kernel_modules() { - local modpath - modpath=/lib/modules/$1 - COMPREPLY=($(compgen -W "$(command ls -RL $modpath 2>/dev/null | - command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p')" -- "$cur")) + local _modpath=/lib/modules/$1 + _comp_compgen_split -- "$(command ls -RL "$_modpath" 2>/dev/null | + command sed -ne 's/^\(.*\)\.k\{0,1\}o\(\.[gx]z\)\{0,1\}$/\1/p' \ + -e 's/^\(.*\)\.ko\.zst$/\1/p')" } -# This function completes on installed modules +# This function completes on inserted kernel modules +# @param $1 prefix to filter with, default $cur # -_installed_modules() +# @since 2.12 +_comp_compgen_inserted_kernel_modules() { - COMPREPLY=($(compgen -W "$(PATH="$PATH:/sbin" lsmod | - awk '{if (NR != 1) print $1}')" -- "$1")) + _comp_compgen -c "${1:-$cur}" split -- "$(PATH="$PATH:/sbin" lsmod | + _comp_awk '{if (NR != 1) print $1}')" } # This function completes on user or user:group format; as for chown and cpio. @@ -1306,7 +2059,9 @@ _installed_modules() # # @param $1 If -u, only return users/groups the user has access to in # context of current completion. -_usergroup() +# +# @since 2.12 +_comp_compgen_usergroups() { if [[ $cur == *\\\\* || $cur == *:*:* ]]; then # Give up early on if something seems horribly wrong. @@ -1315,27 +2070,26 @@ _usergroup() # Completing group after 'user\:gr'. # Reply with a list of groups prefixed with 'user:', readline will # escape to the colon. - local prefix - prefix=${cur%%*([^:])} - prefix=${prefix//\\/} - local mycur="${cur#*[:]}" + local tmp if [[ ${1-} == -u ]]; then - _allowed_groups "$mycur" + _comp_compgen -v tmp -c "${cur#*:}" allowed_groups else - local IFS=$'\n' - COMPREPLY=($(compgen -g -- "$mycur")) + _comp_compgen -v tmp -c "${cur#*:}" -- -g + fi + if ((${#tmp[@]})); then + local _prefix=${cur%%*([^:])} + _prefix=${_prefix//\\/} + _comp_compgen -Rv tmp -- -P "$_prefix" -W '"${tmp[@]}"' + _comp_compgen -U tmp set "${tmp[@]}" fi - COMPREPLY=($(compgen -P "$prefix" -W "${COMPREPLY[@]}")) elif [[ $cur == *:* ]]; then # Completing group after 'user:gr'. # Reply with a list of unprefixed groups since readline with split on : # and only replace the 'gr' part - local mycur="${cur#*:}" if [[ ${1-} == -u ]]; then - _allowed_groups "$mycur" + _comp_compgen -c "${cur#*:}" allowed_groups else - local IFS=$'\n' - COMPREPLY=($(compgen -g -- "$mycur")) + _comp_compgen -c "${cur#*:}" -- -g fi else # Completing a partial 'usernam'. @@ -1344,168 +2098,274 @@ _usergroup() # slash. It's better to complete into 'chown username ' than 'chown # username\:'. if [[ ${1-} == -u ]]; then - _allowed_users "$cur" + _comp_compgen_allowed_users else - local IFS=$'\n' - COMPREPLY=($(compgen -u -- "$cur")) + _comp_compgen -- -u fi fi } -_allowed_users() +# @since 2.12 +_comp_compgen_allowed_users() { - if _complete_as_root; then - local IFS=$'\n' - COMPREPLY=($(compgen -u -- "${1:-$cur}")) + if _comp_as_root; then + _comp_compgen -- -u else - local IFS=$'\n ' - COMPREPLY=($(compgen -W \ - "$(id -un 2>/dev/null || whoami 2>/dev/null)" -- "${1:-$cur}")) + _comp_compgen_split -- "$(id -un 2>/dev/null || whoami 2>/dev/null)" fi } -_allowed_groups() +# @since 2.12 +_comp_compgen_allowed_groups() { - if _complete_as_root; then - local IFS=$'\n' - COMPREPLY=($(compgen -g -- "$1")) + if _comp_as_root; then + _comp_compgen -- -g else - local IFS=$'\n ' - COMPREPLY=($(compgen -W \ - "$(id -Gn 2>/dev/null || groups 2>/dev/null)" -- "$1")) + _comp_compgen_split -- "$(id -Gn 2>/dev/null || groups 2>/dev/null)" fi } +# @since 2.12 +_comp_compgen_selinux_users() +{ + _comp_compgen_split -- "$(semanage user -nl 2>/dev/null | + _comp_awk '{ print $1 }')" +} + # This function completes on valid shells +# @param $1 chroot to search from # -_shells() -{ - local shell rest - while read -r shell rest; do - [[ $shell == /* && $shell == "$cur"* ]] && COMPREPLY+=($shell) - done 2>/dev/null /dev/null <"${1-}"/etc/shells + _comp_compgen -U shells -- -W '"${shells[@]}"' } # This function completes on valid filesystem types # -_fstypes() +# @since 2.12 +_comp_compgen_fstypes() { - local fss + local _fss if [[ -e /proc/filesystems ]]; then # Linux - fss="$(cut -d$'\t' -f2 /proc/filesystems) - $(awk '! /\*/ { print $NF }' /etc/filesystems 2>/dev/null)" + _fss="$(cut -d$'\t' -f2 /proc/filesystems) + $(_comp_awk '! /\*/ { print $NF }' /etc/filesystems 2>/dev/null)" else # Generic - fss="$(awk '/^[ \t]*[^#]/ { print $3 }' /etc/fstab 2>/dev/null) - $(awk '/^[ \t]*[^#]/ { print $3 }' /etc/mnttab 2>/dev/null) - $(awk '/^[ \t]*[^#]/ { print $4 }' /etc/vfstab 2>/dev/null) - $(awk '{ print $1 }' /etc/dfs/fstypes 2>/dev/null) + _fss="$(_comp_awk '/^[ \t]*[^#]/ { print $3 }' /etc/fstab 2>/dev/null) + $(_comp_awk '/^[ \t]*[^#]/ { print $3 }' /etc/mnttab 2>/dev/null) + $(_comp_awk '/^[ \t]*[^#]/ { print $4 }' /etc/vfstab 2>/dev/null) + $(_comp_awk '{ print $1 }' /etc/dfs/fstypes 2>/dev/null) + $(lsvfs 2>/dev/null | _comp_awk '$1 !~ /^(Filesystem|[^a-zA-Z])/ { print $1 }') $([[ -d /etc/fs ]] && command ls /etc/fs)" fi - [[ -n $fss ]] && COMPREPLY+=($(compgen -W "$fss" -- "$cur")) + [[ $_fss ]] && _comp_compgen_split -- "$_fss" +} + +# Get absolute path to a file, with rudimentary canonicalization. +# No symlink resolution or existence checks are done; +# see `_comp_realcommand` for those. +# @param $1 The file +# @var[out] REPLY The path +# @since 2.12 +_comp_abspath() +{ + REPLY=$1 + case $REPLY in + /*) ;; + ../*) REPLY=$PWD/${REPLY:3} ;; + *) REPLY=$PWD/$REPLY ;; + esac + while [[ $REPLY == */./* ]]; do + REPLY=${REPLY//\/.\//\/} + done + REPLY=${REPLY//+(\/)/\/} } # Get real command. -# - arg: $1 Command -# - stdout: Filename of command in PATH with possible symbolic links resolved. -# Empty string if command not found. -# - return: True (0) if command found, False (> 0) if not. -_realcommand() -{ - type -P "$1" >/dev/null && { - if type -p realpath >/dev/null; then - realpath "$(type -P "$1")" - elif type -p greadlink >/dev/null; then - greadlink -f "$(type -P "$1")" - elif type -p readlink >/dev/null; then - readlink -f "$(type -P "$1")" - else - type -P "$1" - fi - } +# Command is the filename of command in PATH with possible symlinks resolved +# (if resolve tooling available), empty string if command not found. +# @param $1 Command +# @var[out] REPLY Resulting string +# @return True (0) if command found, False (> 0) if not. +# @since 2.12 +_comp_realcommand() +{ + REPLY="" + local file + file=$(type -P -- "$1") || return $? + if type -p realpath >/dev/null; then + REPLY=$(realpath "$file") + elif type -p greadlink >/dev/null; then + REPLY=$(greadlink -f "$file") + elif type -p readlink >/dev/null; then + REPLY=$(readlink -f "$file") + else + _comp_abspath "$file" + fi } -# This function returns the first argument, excluding options -# @param $1 chars Characters out of $COMP_WORDBREAKS which should -# NOT be considered word breaks. See __reassemble_comp_words_by_ref. -_get_first_arg() -{ - local i +# This function returns the position of the first argument, excluding options +# +# Options: +# -a GLOB Pattern of options that take an option argument +# +# @var[out] REPLY Position of the first argument before the current one being +# completed if any, or otherwise an empty string +# @return True (0) if any argument is found, False (> 0) otherwise. +# @since 2.12 +_comp_locate_first_arg() +{ + local has_optarg="" + local OPTIND=1 OPTARG="" OPTERR=0 _opt + while getopts ':a:' _opt "$@"; do + case $_opt in + a) has_optarg=$OPTARG ;; + *) + echo "bash_completion: $FUNCNAME: usage error" >&2 + return 2 + ;; + esac + done + shift "$((OPTIND - 1))" - arg= - for ((i = 1; i < COMP_CWORD; i++)); do - if [[ ${COMP_WORDS[i]} != -* ]]; then - arg=${COMP_WORDS[i]} + local i + REPLY= + for ((i = 1; i < cword; i++)); do + # shellcheck disable=SC2053 + if [[ $has_optarg && ${words[i]} == $has_optarg ]]; then + ((i++)) + elif [[ ${words[i]} != -?* ]]; then + REPLY=$i + return 0 + elif [[ ${words[i]} == -- ]]; then + ((i + 1 < cword)) && REPLY=$((i + 1)) && return 0 break fi done + return 1 } -# This function counts the number of args, excluding options -# @param $1 chars Characters out of $COMP_WORDBREAKS which should -# NOT be considered word breaks. See __reassemble_comp_words_by_ref. -# @param $2 glob Options whose following argument should not be counted -# @param $3 glob Options that should be counted as args -_count_args() +# This function returns the first argument, excluding options +# +# Options: +# -a GLOB Pattern of options that take an option argument +# +# @var[out] REPLY First argument before the current one being completed if any, +# or otherwise an empty string +# @return True (0) if any argument is found, False (> 0) otherwise. +# @since 2.12 +_comp_get_first_arg() { - local i cword words - __reassemble_comp_words_by_ref "${1-}" words cword + _comp_locate_first_arg "$@" && REPLY=${words[REPLY]} +} + +# This function counts the number of args, excluding options +# +# Options: +# -n CHARS Characters out of $COMP_WORDBREAKS which should +# NOT be considered word breaks. See +# _comp__reassemble_words. +# -a GLOB Options whose following argument should not be counted +# -i GLOB Options that should be counted as args +# +# @var[out] REPLY Return the number of arguments +# @since 2.12 +_comp_count_args() +{ + local has_optarg="" has_exclude="" exclude="" glob_include="" + local OPTIND=1 OPTARG="" OPTERR=0 _opt + while getopts ':a:n:i:' _opt "$@"; do + case $_opt in + a) has_optarg=$OPTARG ;; + n) has_exclude=set exclude+=$OPTARG ;; + i) glob_include=$OPTARG ;; + *) + echo "bash_completion: $FUNCNAME: usage error" >&2 + return 2 + ;; + esac + done + shift "$((OPTIND - 1))" - args=1 + if [[ $has_exclude ]]; then + local cword words + _comp__reassemble_words "$exclude<>&" words cword + fi + + local i + REPLY=1 for ((i = 1; i < cword; i++)); do # shellcheck disable=SC2053 - if [[ ${words[i]} != -* && ${words[i - 1]} != ${2-} || \ - ${words[i]} == ${3-} ]]; then - ((args++)) + if [[ $has_optarg && ${words[i]} == $has_optarg ]]; then + ((i++)) + elif [[ ${words[i]} != -?* || $glob_include && ${words[i]} == $glob_include ]]; then + ((REPLY++)) + elif [[ ${words[i]} == -- ]]; then + ((REPLY += cword - i - 1)) + break fi done } # This function completes on PCI IDs # -_pci_ids() +# @since 2.12 +_comp_compgen_pci_ids() { - COMPREPLY+=($(compgen -W \ - "$(PATH="$PATH:/sbin" lspci -n | awk '{print $3}')" -- "$cur")) + _comp_compgen_split -- "$(PATH="$PATH:/sbin" lspci -n | _comp_awk '{print $3}')" } # This function completes on USB IDs # -_usb_ids() +# @since 2.12 +_comp_compgen_usb_ids() { - COMPREPLY+=($(compgen -W \ - "$(PATH="$PATH:/sbin" lsusb | awk '{print $6}')" -- "$cur")) + _comp_compgen_split -- "$(PATH="$PATH:/sbin" lsusb | _comp_awk '{print $6}')" } # CD device names -_cd_devices() +# +# @since 2.12 +_comp_compgen_cd_devices() { - COMPREPLY+=($(compgen -f -d -X "!*/?([amrs])cd*" -- "${cur:-/dev/}")) + _comp_compgen -c "${cur:-/dev/}" -- -f -d -X "!*/?([amrs])cd!(c-*)" } # DVD device names -_dvd_devices() +# +# @since 2.12 +_comp_compgen_dvd_devices() { - COMPREPLY+=($(compgen -f -d -X "!*/?(r)dvd*" -- "${cur:-/dev/}")) + _comp_compgen -c "${cur:-/dev/}" -- -f -d -X "!*/?(r)dvd*" } # TERM environment variable values -_terms() +# +# @since 2.12 +_comp_compgen_terms() { - COMPREPLY+=($(compgen -W "$({ + _comp_compgen_split -- "$({ command sed -ne 's/^\([^[:space:]#|]\{2,\}\)|.*/\1/p' /etc/termcap { toe -a || toe - } | awk '{ print $1 }' - find /{etc,lib,usr/lib,usr/share}/terminfo/? -type f -maxdepth 1 | - awk -F/ '{ print $NF }' - } 2>/dev/null)" -- "$cur")) + } | _comp_awk '{ print $1 }' + _comp_expand_glob dirs '/{etc,lib,usr/lib,usr/share}/terminfo/?' && + find "${dirs[@]}" -type f -maxdepth 1 | + _comp_awk -F / '{ print $NF }' + } 2>/dev/null)" } -_bashcomp_try_faketty() +# @since 2.12 +_comp_try_faketty() { if type unbuffer &>/dev/null; then unbuffer -p "$@" @@ -1524,95 +2384,122 @@ _bashcomp_try_faketty() # This function provides simple user@host completion # -_user_at_host() +# @since 2.12 +_comp_complete_user_at_host() { - local cur prev words cword - _init_completion -n : || return + local cur prev words cword comp_args + _comp_initialize -n : -- "$@" || return if [[ $cur == *@* ]]; then - _known_hosts_real "$cur" + _comp_compgen_known_hosts "$cur" else - COMPREPLY=($(compgen -u -S @ -- "$cur")) + _comp_compgen -- -u -S @ compopt -o nospace fi } -shopt -u hostcomplete && complete -F _user_at_host talk ytalk finger +shopt -u hostcomplete && complete -F _comp_complete_user_at_host talk ytalk finger # NOTE: Using this function as a helper function is deprecated. Use -# `_known_hosts_real' instead. -_known_hosts() -{ - local cur prev words cword - _init_completion -n : || return - - # NOTE: Using `_known_hosts' as a helper function and passing options - # to `_known_hosts' is deprecated: Use `_known_hosts_real' instead. - local options - [[ ${1-} == -a || ${2-} == -a ]] && options=-a - [[ ${1-} == -c || ${2-} == -c ]] && options+=" -c" - _known_hosts_real ${options-} -- "$cur" -} # _known_hosts() +# `_comp_compgen_known_hosts' instead. +# @since 2.12 +_comp_complete_known_hosts() +{ + local cur prev words cword comp_args + _comp_initialize -n : -- "$@" || return + + # NOTE: Using `_known_hosts' (the old name of `_comp_complete_known_hosts') + # as a helper function and passing options to `_known_hosts' is + # deprecated: Use `_comp_compgen_known_hosts' instead. + local -a options=() + [[ ${1-} == -a || ${2-} == -a ]] && options+=(-a) + [[ ${1-} == -c || ${2-} == -c ]] && options+=(-c) + local IFS=$' \t\n' # Workaround for connected ${v+"$@"} in bash < 4.4 + _comp_compgen_known_hosts ${options[@]+"${options[@]}"} -- "$cur" +} # Helper function to locate ssh included files in configs # This function looks for the "Include" keyword in ssh config files and # includes them recursively, adding each result to the config variable. -_included_ssh_config_files() +_comp__included_ssh_config_files() { (($# < 1)) && echo "bash_completion: $FUNCNAME: missing mandatory argument CONFIG" >&2 - local configfile i f + local configfile i files f REPLY configfile=$1 - local reset=$(shopt -po noglob) - set -o noglob - local included=($(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\(.*\)$/\1/p' "${configfile}")) - $reset - - [[ ${included-} ]] || return - for i in "${included[@]}"; do - # Check the origin of $configfile to complete relative included paths on included - # files according to ssh_config(5): - # "[...] Files without absolute paths are assumed to be in ~/.ssh if included in a user - # configuration file or /etc/ssh if included from the system configuration file.[...]" - if ! [[ $i =~ ^\~.*|^\/.* ]]; then - if [[ $configfile =~ ^\/etc\/ssh.* ]]; then - i="/etc/ssh/$i" - else - i="$HOME/.ssh/$i" + # From man ssh_config: + # "Files without absolute paths are assumed to be in ~/.ssh if included + # in a user configuration file or /etc/ssh if included from the system + # configuration file." + # This behavior is not affected by the the including file location - + # if the system configuration file is included from the user's config, + # relative includes are still resolved in the user's ssh config directory. + local relative_include_base + if [[ $configfile == /etc/ssh* ]]; then + relative_include_base="/etc/ssh" + else + relative_include_base="$HOME/.ssh" + fi + + local depth=1 + local -a included + local -a include_files + included=("$configfile") + + # Max recursion depth per openssh's READCONF_MAX_DEPTH: + # https://github.com/openssh/openssh-portable/blob/5ec5504f1d328d5bfa64280cd617c3efec4f78f3/readconf.c#L2240 + local max_depth=16 + while ((${#included[@]} > 0 && depth++ < max_depth)); do + _comp_split include_files "$(command sed -ne 's/^[[:blank:]]*[Ii][Nn][Cc][Ll][Uu][Dd][Ee][[:blank:]]\(.*\)$/\1/p' "${included[@]}")" || return + included=() + for i in "${include_files[@]}"; do + if [[ $i != [~/]* ]]; then + i="${relative_include_base}/${i}" fi - fi - __expand_tilde_by_ref i - # In case the expanded variable contains multiple paths - set +o noglob - for f in $i; do - if [[ -r $f ]]; then - config+=("$f") - # The Included file is processed to look for Included files in itself - _included_ssh_config_files $f + _comp_expand_tilde "$i" + if _comp_expand_glob files '$REPLY'; then + # In case the expanded variable contains multiple paths + for f in "${files[@]}"; do + if [[ -r $f && ! -d $f ]]; then + config+=("$f") + included+=("$f") + fi + done fi done - $reset done -} # _included_ssh_config_files() +} -# Helper function for completing _known_hosts. +# Helper function for completing _comp_complete_known_hosts. # This function performs host completion based on ssh's config and known_hosts # files, as well as hostnames reported by avahi-browse if -# COMP_KNOWN_HOSTS_WITH_AVAHI is set to a non-empty value. Also hosts from -# HOSTFILE (compgen -A hostname) are added, unless -# COMP_KNOWN_HOSTS_WITH_HOSTFILE is set to an empty value. -# Usage: _known_hosts_real [OPTIONS] CWORD -# Options: -a Use aliases from ssh config files -# -c Use `:' suffix -# -F configfile Use `configfile' for configuration settings -# -p PREFIX Use PREFIX -# -4 Filter IPv6 addresses from results -# -6 Filter IPv4 addresses from results -# Return: Completions, starting with CWORD, are added to COMPREPLY[] -_known_hosts_real() -{ - local configfile flag prefix="" ifs=$IFS - local cur suffix="" aliases i host ipv4 ipv6 +# BASH_COMPLETION_KNOWN_HOSTS_WITH_AVAHI is set to a non-empty value. +# Also hosts from HOSTFILE (compgen -A hostname) are added, unless +# BASH_COMPLETION_KNOWN_HOSTS_WITH_HOSTFILE is set to an empty value. +# Usage: _comp_compgen_known_hosts [OPTIONS] CWORD +# Options: +# -a Use aliases from ssh config files +# -c Use `:' suffix +# -F configfile Use `configfile' for configuration settings +# -p PREFIX Use PREFIX +# -4 Filter IPv6 addresses from results +# -6 Filter IPv4 addresses from results +# @var[out] COMPREPLY Completions, starting with CWORD, are added +# @return True (0) if one or more completions are generated, or otherwise False +# (1). +# @since 2.12 +_comp_compgen_known_hosts() +{ + local known_hosts + _comp_compgen_known_hosts__impl "$@" || return "$?" + _comp_compgen -U known_hosts set "${known_hosts[@]}" +} +_comp_compgen_known_hosts__impl() +{ + known_hosts=() + + local configfile="" flag prefix="" + local cur suffix="" aliases="" i host ipv4="" ipv6="" local -a kh tmpkh=() khd=() config=() # TODO remove trailing %foo from entries @@ -1620,21 +2507,27 @@ _known_hosts_real() local OPTIND=1 while getopts "ac46F:p:" flag "$@"; do case $flag in - a) aliases='yes' ;; + a) aliases=set ;; c) suffix=':' ;; - F) configfile=$OPTARG ;; + F) + if [[ ! $OPTARG ]]; then + echo "bash_completion: $FUNCNAME: -F: an empty filename is specified" >&2 + return 2 + fi + configfile=$OPTARG + ;; p) prefix=$OPTARG ;; - 4) ipv4=1 ;; - 6) ipv6=1 ;; + 4) ipv4=set ;; + 6) ipv6=set ;; *) echo "bash_completion: $FUNCNAME: usage error" >&2 - return 1 + return 2 ;; esac done if (($# < OPTIND)); then echo "bash_completion: $FUNCNAME: missing mandatory argument CWORD" >&2 - return 1 + return 2 fi cur=${!OPTIND} ((OPTIND += 1)) @@ -1644,68 +2537,63 @@ _known_hosts_real() printf '%s ' ${!OPTIND} shift done)" >&2 - return 1 + return 2 fi [[ $cur == *@* ]] && prefix=$prefix${cur%@*}@ && cur=${cur#*@} kh=() # ssh config files - if [[ -v configfile ]]; then - [[ -r $configfile ]] && config+=("$configfile") + if [[ $configfile ]]; then + [[ -r $configfile && ! -d $configfile ]] && config+=("$configfile") else for i in /etc/ssh/ssh_config ~/.ssh/config ~/.ssh2/config; do - [[ -r $i ]] && config+=("$i") + [[ -r $i && ! -d $i ]] && config+=("$i") done fi - local reset=$(shopt -po noglob) - set -o noglob - # "Include" keyword in ssh config files if ((${#config[@]} > 0)); then for i in "${config[@]}"; do - _included_ssh_config_files "$i" + _comp__included_ssh_config_files "$i" done fi # Known hosts files from configs if ((${#config[@]} > 0)); then - local IFS=$'\n' # expand paths (if present) to global and user known hosts files # TODO(?): try to make known hosts files with more than one consecutive # spaces in their name work (watch out for ~ expansion # breakage! Alioth#311595) - tmpkh=($(awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t]+", "") { print $0 }' "${config[@]}" | sort -u)) - IFS=$ifs - fi - if ((${#tmpkh[@]} != 0)); then - local j - for i in "${tmpkh[@]}"; do - # First deal with quoted entries... - while [[ $i =~ ^([^\"]*)\"([^\"]*)\"(.*)$ ]]; do - i=${BASH_REMATCH[1]}${BASH_REMATCH[3]} - j=${BASH_REMATCH[2]} - __expand_tilde_by_ref j # Eval/expand possible `~' or `~user' - [[ -r $j ]] && kh+=("$j") - done - # ...and then the rest. - for j in $i; do - __expand_tilde_by_ref j # Eval/expand possible `~' or `~user' - [[ -r $j ]] && kh+=("$j") + if _comp_split -l tmpkh "$(_comp_awk 'sub("^[ \t]*([Gg][Ll][Oo][Bb][Aa][Ll]|[Uu][Ss][Ee][Rr])[Kk][Nn][Oo][Ww][Nn][Hh][Oo][Ss][Tt][Ss][Ff][Ii][Ll][Ee][ \t=]+", "") { print $0 }' "${config[@]}" | sort -u)"; then + local tmpkh2 j REPLY + for i in "${tmpkh[@]}"; do + # First deal with quoted entries... + while [[ $i =~ ^([^\"]*)\"([^\"]*)\"(.*)$ ]]; do + i=${BASH_REMATCH[1]}${BASH_REMATCH[3]} + _comp_expand_tilde "${BASH_REMATCH[2]}" # Eval/expand possible `~' or `~user' + [[ -r $REPLY ]] && kh+=("$REPLY") + done + # ...and then the rest. + _comp_split tmpkh2 "$i" || continue + for j in "${tmpkh2[@]}"; do + _comp_expand_tilde "$j" # Eval/expand possible `~' or `~user' + [[ -r $REPLY ]] && kh+=("$REPLY") + done done - done + fi fi - if [[ ! -v configfile ]]; then + if [[ ! $configfile ]]; then # Global and user known_hosts files for i in /etc/ssh/ssh_known_hosts /etc/ssh/ssh_known_hosts2 \ /etc/known_hosts /etc/known_hosts2 ~/.ssh/known_hosts \ ~/.ssh/known_hosts2; do - [[ -r $i ]] && kh+=("$i") + [[ -r $i && ! -d $i ]] && kh+=("$i") done for i in /etc/ssh2/knownhosts ~/.ssh2/hostkeys; do - [[ -d $i ]] && khd+=("$i"/*pub) + [[ -d $i ]] || continue + _comp_expand_glob tmpkh '"$i"/*.pub' && khd+=("${tmpkh[@]}") done fi @@ -1716,27 +2604,27 @@ _known_hosts_real() for i in "${kh[@]}"; do while read -ra tmpkh; do ((${#tmpkh[@]} == 0)) && continue - set -- "${tmpkh[@]}" # Skip entries starting with | (hashed) and # (comment) - [[ $1 == [\|\#]* ]] && continue + [[ ${tmpkh[0]} == [\|\#]* ]] && continue # Ignore leading @foo (markers) - [[ $1 == @* ]] && shift + local host_list=${tmpkh[0]} + [[ ${tmpkh[0]} == @* ]] && host_list=${tmpkh[1]-} # Split entry on commas - local IFS=, - for host in $1; do - # Skip hosts containing wildcards - [[ $host == *[*?]* ]] && continue - # Remove leading [ - host="${host#[}" - # Remove trailing ] + optional :port - host="${host%]?(:+([0-9]))}" - # Add host to candidates - COMPREPLY+=($host) - done - IFS=$ifs + local -a hosts + if _comp_split -F , hosts "$host_list"; then + for host in "${hosts[@]}"; do + # Skip hosts containing wildcards + [[ $host == *[*?]* ]] && continue + # Remove leading [ + host=${host#[} + # Remove trailing ] + optional :port + host=${host%]?(:+([0-9]))} + # Add host to candidates + [[ $host ]] && known_hosts+=("$host") + done + fi done <"$i" done - COMPREPLY=($(compgen -W '${COMPREPLY[@]}' -- "$cur")) fi if ((${#khd[@]} > 0)); then # Needs to look for files called @@ -1744,213 +2632,233 @@ _known_hosts_real() # dont fork any processes, because in a cluster environment, # there can be hundreds of hostkeys for i in "${khd[@]}"; do - if [[ $i == *key_22_$cur*.pub && -r $i ]]; then + if [[ $i == *key_22_*.pub && -r $i ]]; then host=${i/#*key_22_/} host=${host/%.pub/} - COMPREPLY+=($host) + [[ $host ]] && known_hosts+=("$host") fi done fi # apply suffix and prefix - for i in ${!COMPREPLY[*]}; do - COMPREPLY[i]=$prefix${COMPREPLY[i]}$suffix - done + ((${#known_hosts[@]})) && + _comp_compgen -v known_hosts -- -W '"${known_hosts[@]}"' -P "$prefix" -S "$suffix" fi # append any available aliases from ssh config files - if [[ ${#config[@]} -gt 0 && -v aliases ]]; then - local -a hosts=($(command sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]]\(.*\)$/\1/p' "${config[@]}")) - if ((${#hosts[@]} != 0)); then - COMPREPLY+=($(compgen -P "$prefix" \ - -S "$suffix" -W '${hosts[@]%%[*?%]*}' -X '\!*' -- "$cur")) + if [[ ${#config[@]} -gt 0 && $aliases ]]; then + local -a hosts + if _comp_split hosts "$(command sed -ne 's/^[[:blank:]]*[Hh][Oo][Ss][Tt][[:blank:]=]\{1,\}\(.*\)$/\1/p' "${config[@]}")"; then + _comp_compgen -av known_hosts -- -P "$prefix" \ + -S "$suffix" -W '"${hosts[@]%%[*?%]*}"' -X '@(\!*|)' fi fi # Add hosts reported by avahi-browse, if desired and it's available. - if [[ ${COMP_KNOWN_HOSTS_WITH_AVAHI-} ]] && + if [[ ${BASH_COMPLETION_KNOWN_HOSTS_WITH_AVAHI-} ]] && type avahi-browse &>/dev/null; then - # The original call to avahi-browse also had "-k", to avoid lookups - # into avahi's services DB. We don't need the name of the service, and - # if it contains ";", it may mistify the result. But on Gentoo (at - # least), -k wasn't available (even if mentioned in the manpage) some - # time ago, so... - COMPREPLY+=($(compgen -P "$prefix" -S "$suffix" -W \ - "$(avahi-browse -cpr _workstation._tcp 2>/dev/null | - awk -F';' '/^=/ { print $7 }' | sort -u)" -- "$cur")) + # Some old versions of avahi-browse reportedly didn't have -k + # (even if mentioned in the manpage); those we do not support any more. + local generated=$(avahi-browse -cprak 2>/dev/null | _comp_awk -F ';' \ + '/^=/ && $5 ~ /^_(ssh|workstation)\._tcp$/ { print $7 }' | + sort -u) + _comp_compgen -av known_hosts -- -P "$prefix" -S "$suffix" -W '$generated' fi # Add hosts reported by ruptime. if type ruptime &>/dev/null; then - COMPREPLY+=($(compgen -W \ - "$(ruptime 2>/dev/null | awk '!/^ruptime:/ { print $1 }')" \ - -- "$cur")) + local generated=$(ruptime 2>/dev/null | _comp_awk '!/^ruptime:/ { print $1 }') + _comp_compgen -av known_hosts -- -W '$generated' fi # Add results of normal hostname completion, unless - # `COMP_KNOWN_HOSTS_WITH_HOSTFILE' is set to an empty value. - if [[ -n ${COMP_KNOWN_HOSTS_WITH_HOSTFILE-1} ]]; then - COMPREPLY+=( - $(compgen -A hostname -P "$prefix" -S "$suffix" -- "$cur")) + # `BASH_COMPLETION_KNOWN_HOSTS_WITH_HOSTFILE' is set to an empty value. + if [[ ${BASH_COMPLETION_KNOWN_HOSTS_WITH_HOSTFILE-set} ]]; then + _comp_compgen -av known_hosts -- -A hostname -P "$prefix" -S "$suffix" fi - $reset + ((${#known_hosts[@]})) || return 1 - if [[ -v ipv4 ]]; then - COMPREPLY=("${COMPREPLY[@]/*:*$suffix/}") + if [[ $ipv4 ]]; then + known_hosts=("${known_hosts[@]/*:*$suffix/}") fi - if [[ -v ipv6 ]]; then - COMPREPLY=("${COMPREPLY[@]/+([0-9]).+([0-9]).+([0-9]).+([0-9])$suffix/}") + if [[ $ipv6 ]]; then + known_hosts=("${known_hosts[@]/+([0-9]).+([0-9]).+([0-9]).+([0-9])$suffix/}") fi - if [[ -v ipv4 || -v ipv6 ]]; then - for i in "${!COMPREPLY[@]}"; do - [[ ${COMPREPLY[i]} ]] || unset -v "COMPREPLY[i]" + if [[ $ipv4 || $ipv6 ]]; then + for i in "${!known_hosts[@]}"; do + [[ ${known_hosts[i]} ]] || unset -v 'known_hosts[i]' done fi + ((${#known_hosts[@]})) || return 1 - __ltrim_colon_completions "$prefix$cur" - -} # _known_hosts_real() -complete -F _known_hosts traceroute traceroute6 \ - fping fping6 telnet rsh rlogin ftp dig mtr ssh-installkeys showmount - -# This meta-cd function observes the CDPATH variable, so that cd additionally -# completes on directories under those specified in CDPATH. + _comp_compgen -v known_hosts -c "$prefix$cur" ltrim_colon "${known_hosts[@]}" +} +complete -F _comp_complete_known_hosts traceroute traceroute6 \ + fping fping6 telnet rsh rlogin ftp dig drill mtr ssh-installkeys showmount + +# Convert the word index in `words` to the index in `COMP_WORDS`. +# @param $1 Index in the array WORDS. +# @var[in,opt] words Words that contain reassmbled words. +# @var[in,opt] cword Current word index in WORDS. +# WORDS and CWORD, if any, are expected to be created by +# _comp__reassemble_words. # -_cd() +_comp__find_original_word() { - local cur prev words cword - _init_completion || return - - local IFS=$'\n' i j k - - compopt -o filenames + REPLY=$1 - # Use standard dir completion if no CDPATH or parameter starts with /, - # ./ or ../ - if [[ -z ${CDPATH:-} || $cur == ?(.)?(.)/* ]]; then - _filedir -d - return - fi + # If CWORD or WORDS are undefined, we return the first argument without any + # processing. + [[ -v cword && -v words ]] || return 0 - local -r mark_dirs=$(_rl_enabled mark-directories && echo y) - local -r mark_symdirs=$(_rl_enabled mark-symlinked-directories && echo y) - - # we have a CDPATH, so loop on its contents - for i in ${CDPATH//:/$'\n'}; do - # create an array of matched subdirs - k="${#COMPREPLY[@]}" - for j in $(compgen -d -- $i/$cur); do - if [[ ($mark_symdirs && -L $j || $mark_dirs && ! -L $j) && ! -d ${j#$i/} ]]; then - j+="/" - fi - COMPREPLY[k++]=${j#$i/} + local reassembled_offset=$1 i=0 j + for ((j = 0; j < reassembled_offset; j++)); do + local word=${words[j]} + while [[ $word && i -lt ${#COMP_WORDS[@]} && $word == *"${COMP_WORDS[i]}"* ]]; do + word=${word#*"${COMP_WORDS[i++]}"} done done - - _filedir -d - - if ((${#COMPREPLY[@]} == 1)); then - i=${COMPREPLY[0]} - if [[ $i == "$cur" && $i != "*/" ]]; then - COMPREPLY[0]="${i}/" - fi - fi - - return -} -if shopt -q cdable_vars; then - complete -v -F _cd -o nospace cd pushd -else - complete -F _cd -o nospace cd pushd -fi - -# A _command_offset wrapper function for use when the offset is unknown. -# Only intended to be used as a completion function directly associated -# with a command, not to be invoked from within other completion functions. -# -_command() -{ - local offset i - - # find actual offset, as position of the first non-option - offset=1 - for ((i = 1; i <= COMP_CWORD; i++)); do - if [[ ${COMP_WORDS[i]} != -* ]]; then - offset=$i - break - fi - done - _command_offset $offset + REPLY=$i } - # A meta-command completion function for commands like sudo(8), which need to # first complete on a command, then complete according to that command's own # completion definition. # -_command_offset() +# @since 2.12 +_comp_command_offset() { # rewrite current completion context before invoking # actual command completion + # obtain the word index in COMP_WORDS + local REPLY + _comp__find_original_word "$1" + local word_offset=$REPLY + + # make changes to COMP_* local. Note that bash-4.3..5.0 have a + # bug that `local -a arr=("${arr[@]}")` fails. We instead first + # assign the values of `COMP_WORDS` to another array `comp_words`. + local COMP_LINE=$COMP_LINE COMP_POINT=$COMP_POINT COMP_CWORD=$COMP_CWORD + local -a comp_words=("${COMP_WORDS[@]}") + local -a COMP_WORDS=("${comp_words[@]}") + # find new first word position, then # rewrite COMP_LINE and adjust COMP_POINT - local word_offset=$1 i j + local i tail for ((i = 0; i < word_offset; i++)); do - for ((j = 0; j <= ${#COMP_LINE}; j++)); do - [[ $COMP_LINE == "${COMP_WORDS[i]}"* ]] && break - COMP_LINE=${COMP_LINE:1} - ((COMP_POINT--)) - done - COMP_LINE=${COMP_LINE#"${COMP_WORDS[i]}"} - ((COMP_POINT -= ${#COMP_WORDS[i]})) + tail=${COMP_LINE#*"${COMP_WORDS[i]}"} + ((COMP_POINT -= ${#COMP_LINE} - ${#tail})) + COMP_LINE=$tail done # shift COMP_WORDS elements and adjust COMP_CWORD - for ((i = 0; i <= COMP_CWORD - word_offset; i++)); do - COMP_WORDS[i]=${COMP_WORDS[i + word_offset]} - done - for ((i; i <= COMP_CWORD; i++)); do - unset 'COMP_WORDS[i]' - done + COMP_WORDS=("${COMP_WORDS[@]:word_offset}") ((COMP_CWORD -= word_offset)) COMPREPLY=() local cur - _get_comp_words_by_ref cur + _comp_get_words cur if ((COMP_CWORD == 0)); then - local IFS=$'\n' - compopt -o filenames - COMPREPLY=($(compgen -d -c -- "$cur")) + _comp_compgen_commands else - local cmd=${COMP_WORDS[0]} compcmd=${COMP_WORDS[0]} - local cspec=$(complete -p $cmd 2>/dev/null) + _comp_dequote "${COMP_WORDS[0]}" || REPLY=${COMP_WORDS[0]} + local cmd=$REPLY compcmd=$REPLY + local cspec=$(complete -p -- "$cmd" 2>/dev/null) # If we have no completion for $cmd yet, see if we have for basename if [[ ! $cspec && $cmd == */* ]]; then - cspec=$(complete -p ${cmd##*/} 2>/dev/null) + cspec=$(complete -p -- "${cmd##*/}" 2>/dev/null) [[ $cspec ]] && compcmd=${cmd##*/} fi # If still nothing, just load it for the basename if [[ ! $cspec ]]; then compcmd=${cmd##*/} - _completion_loader $compcmd - cspec=$(complete -p $compcmd 2>/dev/null) + _comp_load -D -- "$compcmd" + cspec=$(complete -p -- "$compcmd" 2>/dev/null) fi - if [[ -n $cspec ]]; then - if [[ ${cspec#* -F } != "$cspec" ]]; then - # complete -F + local retry_count=0 + while true; do # loop for the retry request by status 124 + local args original_cur=${comp_args[1]-$cur} + if ((${#COMP_WORDS[@]} >= 2)); then + args=("$cmd" "$original_cur" "${COMP_WORDS[-2]}") + else + args=("$cmd" "$original_cur") + fi + + if [[ ! $cspec ]]; then + if ((${#COMPREPLY[@]} == 0)); then + # XXX will probably never happen as long as completion loader loads + # *something* for every command thrown at it ($cspec != empty) + _comp_complete_minimal "${args[@]}" + fi + elif [[ $cspec == *\ -[CF]\ * ]]; then + if [[ $cspec == *' -F '* ]]; then + # complete -F + + # get function name + local func=${cspec#* -F } + func=${func%% *} + $func "${args[@]}" + + # restart completion (once) if function exited with 124 + if (($? == 124 && retry_count++ == 0)); then + # Note: When the completion function returns 124, the + # state of COMPREPLY is discarded. + COMPREPLY=() + + cspec=$(complete -p -- "$compcmd" 2>/dev/null) - # get function name - local func=${cspec#*-F } - func=${func%% *} + # Note: When completion spec is removed after 124, we + # do not generate any completions including the default + # ones. This is the behavior of the original Bash + # progcomp. + [[ $cspec ]] || break - if ((${#COMP_WORDS[@]} >= 2)); then - $func $cmd "${COMP_WORDS[-1]}" "${COMP_WORDS[-2]}" + continue + fi else - $func $cmd "${COMP_WORDS[-1]}" + # complete -C + + # get command name + local completer=${cspec#* -C \'} + + # completer commands are always single-quoted + if ! _comp_dequote "'$completer"; then + _minimal "${args[@]}" + break + fi + completer=${REPLY[0]} + + local -a suggestions + + local IFS=$' \t\n' + local reset_monitor=$(shopt -po monitor) reset_lastpipe=$(shopt -p lastpipe) reset_noglob=$(shopt -po noglob) + set +o monitor + shopt -s lastpipe + set -o noglob + + COMP_KEY="$COMP_KEY" COMP_LINE="$COMP_LINE" \ + COMP_POINT="$COMP_POINT" COMP_TYPE="$COMP_TYPE" \ + $completer "${args[@]}" | mapfile -t suggestions + + $reset_monitor + $reset_lastpipe + $reset_noglob + _comp_unlocal IFS + + local suggestion + local i=0 + COMPREPLY=() + for suggestion in "${suggestions[@]}"; do + COMPREPLY[i]+=${COMPREPLY[i]+$'\n'}$suggestion + + if [[ $suggestion != *\\ ]]; then + ((i++)) + fi + done fi # restore initial compopts @@ -1959,53 +2867,93 @@ _command_offset() # FIXME: should we take "+o opt" into account? cspec=${cspec#*-o } opt=${cspec%% *} - compopt -o $opt - cspec=${cspec#$opt} + compopt -o "$opt" + cspec=${cspec#"$opt"} done else cspec=${cspec#complete} - cspec=${cspec%%$compcmd} - COMPREPLY=($(eval compgen "$cspec" -- '$cur')) + cspec=${cspec%%@("$compcmd"|"'${compcmd//\'/\'\\\'\'}'")} + eval "_comp_compgen -- $cspec" fi - elif ((${#COMPREPLY[@]} == 0)); then - # XXX will probably never happen as long as completion loader loads - # *something* for every command thrown at it ($cspec != empty) - _minimal - fi + break + done fi } -complete -F _command aoss command "do" else eval exec ltrace nice nohup padsp \ + +# A _comp_command_offset wrapper function for use when the offset is unknown. +# Only intended to be used as a completion function directly associated +# with a command, not to be invoked from within other completion functions. +# +# @since 2.12 +_comp_command() +{ + # We unset the shell variable `words` locally to tell + # `_comp_command_offset` that the index is intended to be that in + # `COMP_WORDS` instead of `words`. + local words + unset -v words + + local offset i + + # find actual offset, as position of the first non-option + offset=1 + for ((i = 1; i <= COMP_CWORD; i++)); do + if [[ ${COMP_WORDS[i]} != -* ]]; then + offset=$i + break + fi + done + _comp_command_offset $offset +} +complete -F _comp_command aoss command "do" else eval exec ltrace nice nohup padsp \ "then" time tsocks vsound xargs -_root_command() +# @since 2.12 +_comp_root_command() { local PATH=$PATH:/sbin:/usr/sbin:/usr/local/sbin - local root_command=$1 - _command + local _comp_root_command=$1 + _comp_command } -complete -F _root_command fakeroot gksu gksudo kdesudo really +complete -F _comp_root_command fakeroot gksu gksudo kdesudo really # Return true if the completion should be treated as running as root -_complete_as_root() +# +# @since 2.12 +_comp_as_root() { - [[ $EUID -eq 0 || ${root_command:-} ]] + [[ $EUID -eq 0 || ${_comp_root_command-} ]] } -_longopt() +# Complete on available commands, subject to `no_empty_cmd_completion`. +# @return True (0) if one or more completions are generated, or otherwise False +# (1). Note that it returns 1 even when the completion generation is canceled +# by `shopt -s no_empty_cmd_completion`. +# +# @since 2.12 +_comp_compgen_commands() +{ + [[ ! ${cur-} ]] && shopt -q no_empty_cmd_completion && return 1 + # -o filenames for e.g. spaces in paths to and in command names + _comp_compgen -- -c -o plusdirs && compopt -o filenames +} + +# @since 2.12 +_comp_complete_longopt() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "${prev,,}" in --help | --usage | --version) return ;; --!(no-*)dir*) - _filedir -d + _comp_compgen -a filedir -d return ;; --!(no-*)@(file|path)*) - _filedir + _comp_compgen -a filedir return ;; --+([-a-z0-9_])) @@ -2013,60 +2961,65 @@ _longopt() "s|.*$prev\[\{0,1\}=[<[]\{0,1\}\([-A-Za-z0-9_]\{1,\}\).*|\1|p") case ${argtype,,} in *dir*) - _filedir -d + _comp_compgen -a filedir -d return ;; *file* | *path*) - _filedir + _comp_compgen -a filedir return ;; esac ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W "$(LC_ALL=C $1 --help 2>&1 | + _comp_compgen_split -- "$(LC_ALL=C $1 --help 2>&1 | while read -r line; do [[ $line =~ --[A-Za-z0-9]+([-_][A-Za-z0-9]+)*=? ]] && - printf '%s\n' ${BASH_REMATCH[0]} - done)" -- "$cur")) + printf '%s\n' "${BASH_REMATCH[0]}" + done)" [[ ${COMPREPLY-} == *= ]] && compopt -o nospace elif [[ $1 == *@(rmdir|chroot) ]]; then - _filedir -d + _comp_compgen -a filedir -d else [[ $1 == *mkdir ]] && compopt -o nospace - _filedir + _comp_compgen -a filedir fi } # makeinfo and texi2dvi are defined elsewhere. -complete -F _longopt a2ps awk base64 bash bc bison cat chroot colordiff cp \ - csplit cut date df diff dir du enscript env expand fmt fold gperf \ - grep grub head irb ld ldd less ln ls m4 md5sum mkdir mkfifo mknod \ +complete -F _comp_complete_longopt \ + a2ps awk base64 bash bc bison cat chroot colordiff cp \ + csplit cut date df diff dir du enscript expand fmt fold gperf \ + grep grub head irb ld ldd less ln ls m4 mkdir mkfifo mknod \ mv netstat nl nm objcopy objdump od paste pr ptx readelf rm rmdir \ - sed seq sha{,1,224,256,384,512}sum shar sort split strip sum tac tail tee \ + sed seq shar sort split strip sum tac tail tee \ texindex touch tr uname unexpand uniq units vdir wc who -declare -Ag _xspecs +# @since 2.12 +declare -Ag _comp_xspecs -_filedir_xspec() +# @since 2.12 +_comp_complete_filedir_xspec() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + _comp_compgen_filedir_xspec "$1" +} - _tilde "$cur" || return +# @since 2.12 +_comp_compgen_filedir_xspec() +{ + _comp_compgen_tilde && return - local IFS=$'\n' xspec=${_xspecs[${1##*/}]} tmp - local -a toks + local REPLY + _comp_quote_compgen "$cur" + local quoted=$REPLY - toks=($( - compgen -d -- "$(quote_readline "$cur")" | { - while read -r tmp; do - printf '%s\n' $tmp - done - } - )) + local xspec=${_comp_xspecs[${1##*/}]-${_xspecs[${1##*/}]-}} + local -a toks + _comp_compgen -v toks -c "$quoted" -- -d # Munge xspec to contain uppercase version too # https://lists.gnu.org/archive/html/bug-bash/2010-09/msg00036.html @@ -2079,198 +3032,318 @@ _filedir_xspec() fi xspec="$matchop($xspec|${xspec^^})" - toks+=($( - eval compgen -f -X "'!$xspec'" -- '$(quote_readline "$cur")' | { - while read -r tmp; do - [[ -n $tmp ]] && printf '%s\n' $tmp - done - } - )) + _comp_compgen -av toks -c "$quoted" -- -f -X "@(|!($xspec))" # Try without filter if it failed to produce anything and configured to - [[ -n ${COMP_FILEDIR_FALLBACK:-} && ${#toks[@]} -lt 1 ]] && { - local reset=$(shopt -po noglob) - set -o noglob - toks+=($(compgen -f -- "$(quote_readline "$cur")")) - IFS=' ' - $reset - IFS=$'\n' - } + [[ ${BASH_COMPLETION_FILEDIR_FALLBACK-} && ${#toks[@]} -lt 1 ]] && + _comp_compgen -av toks -c "$quoted" -- -f - if ((${#toks[@]} != 0)); then - compopt -o filenames - COMPREPLY=("${toks[@]}") - fi + ((${#toks[@]})) || return 1 + + compopt -o filenames + _comp_compgen -RU toks -- -W '"${toks[@]}"' } -_install_xspec() +_comp__init_install_xspec() { local xspec=$1 cmd shift for cmd in "$@"; do - _xspecs[$cmd]=$xspec + _comp_xspecs[$cmd]=$xspec done } # bzcmp, bzdiff, bz*grep, bzless, bzmore intentionally not here, see Debian: #455510 -_install_xspec '!*.?(t)bz?(2)' bunzip2 bzcat pbunzip2 pbzcat lbunzip2 lbzcat -_install_xspec '!*.@(zip|[aegjswx]ar|exe|pk3|wsz|zargo|xpi|s[tx][cdiw]|sx[gm]|o[dt][tspgfc]|od[bm]|oxt|epub|apk|aab|ipa|do[ct][xm]|p[op]t[mx]|xl[st][xm]|pyz|whl)' unzip zipinfo -_install_xspec '*.Z' compress znew +_comp__init_install_xspec '!*.?(t)bz?(2)' bunzip2 bzcat pbunzip2 pbzcat lbunzip2 lbzcat +_comp__init_install_xspec '!*.@(zip|[aegjkswx]ar|exe|pk3|wsz|zargo|xpi|s[tx][cdiw]|sx[gm]|o[dt][tspgfc]|od[bm]|oxt|?(o)xps|epub|cbz|apk|aab|ipa|do[ct][xm]|p[op]t[mx]|xl[st][xm]|pyz|whl|[Ff][Cc][Ss]td)' unzip zipinfo +_comp__init_install_xspec '*.Z' compress znew # zcmp, zdiff, z*grep, zless, zmore intentionally not here, see Debian: #455510 -_install_xspec '!*.@(Z|[gGd]z|t[ag]z)' gunzip zcat -_install_xspec '!*.@(Z|[gGdz]z|t[ag]z)' unpigz -_install_xspec '!*.Z' uncompress +_comp__init_install_xspec '!*.@(Z|[gGd]z|t[ag]z)' gunzip zcat +_comp__init_install_xspec '!*.@(Z|[gGdz]z|t[ag]z)' unpigz +_comp__init_install_xspec '!*.Z' uncompress # lzcmp, lzdiff intentionally not here, see Debian: #455510 -_install_xspec '!*.@(tlz|lzma)' lzcat lzegrep lzfgrep lzgrep lzless lzmore unlzma -_install_xspec '!*.@(?(t)xz|tlz|lzma)' unxz xzcat -_install_xspec '!*.lrz' lrunzip -_install_xspec '!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)' ee -_install_xspec '!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|svg)' qiv -_install_xspec '!*.@(gif|jp?(e)g?(2)|j2[ck]|jp[2f]|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|?(e)ps)' xv -_install_xspec '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv kghostview -_install_xspec '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi kdvi -_install_xspec '!*.dvi' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx -_install_xspec '!*.[pf]df' acroread gpdf xpdf -_install_xspec '!*.@(?(e)ps|pdf)' kpdf -_install_xspec '!*.@(okular|@(?(e|x)ps|?(E|X)PS|[pf]df|[PF]DF|dvi|DVI|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM)?(.?(gz|GZ|bz2|BZ2|xz|XZ)))' okular -_install_xspec '!*.pdf' epdfview pdfunite -_install_xspec '!*.@(cb[rz7t]|djv?(u)|?(e)ps|pdf)' zathura -_install_xspec '!*.@(?(e)ps|pdf)' ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr -_install_xspec '!*.texi*' makeinfo texi2html -_install_xspec '!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi xetex xelatex luatex lualatex -_install_xspec '!*.mp3' mpg123 mpg321 madplay -_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmv]|OG[AGMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' xine aaxine fbxine -_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmv]|OG[AGMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' kaffeine dragon totem -_install_xspec '!*.@(avi|asf|wmv)' aviplay -_install_xspec '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay -_install_xspec '!*.@(mpg|mpeg|avi|mov|qt)' xanim -_install_xspec '!*.@(og[ag]|m3u|flac|spx)' ogg123 -_install_xspec '!*.@(mp3|ogg|pls|m3u)' gqmpeg freeamp -_install_xspec '!*.fig' xfig -_install_xspec '!*.@(mid?(i)|cmf)' playmidi -_install_xspec '!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)' timidity -_install_xspec '!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|oct|okt?(a)|p[st]m|s[3t]m|ult|umx|wav|xm)' modplugplay modplug123 -_install_xspec '*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite -_install_xspec '!*.@(zip|z|gz|tgz)' bzme +_comp__init_install_xspec '!*.@(tlz|lzma)' lzcat lzegrep lzfgrep lzgrep lzless lzmore unlzma +_comp__init_install_xspec '!*.@(?(t)xz|tlz|lzma)' unxz xzcat +_comp__init_install_xspec '!*.lrz' lrunzip +_comp__init_install_xspec '!*.@(gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx)' ee +_comp__init_install_xspec '!*.@(gif|jp?(e)g|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|svg)' qiv +_comp__init_install_xspec '!*.@(gif|jp?(e)g?(2)|j2[ck]|jp[2f]|tif?(f)|png|p[bgp]m|bmp|x[bp]m|rle|rgb|pcx|fits|pm|?(e)ps)' xv +_comp__init_install_xspec '!*.@(@(?(e)ps|?(E)PS|pdf|PDF)?(.gz|.GZ|.bz2|.BZ2|.Z))' gv ggv kghostview +_comp__init_install_xspec '!*.@(dvi|DVI)?(.@(gz|Z|bz2))' xdvi kdvi +_comp__init_install_xspec '!*.dvi' dvips dviselect dvitype dvipdf advi dvipdfm dvipdfmx +_comp__init_install_xspec '!*.[pf]df' acroread gpdf xpdf +_comp__init_install_xspec '!*.@(?(e)ps|pdf)' kpdf +_comp__init_install_xspec '!*.@(okular|@(?(e|x)ps|?(E|X)PS|[pf]df|[PF]DF|dvi|DVI|cb[rz]|CB[RZ]|djv?(u)|DJV?(U)|dvi|DVI|gif|jp?(e)g|miff|tif?(f)|pn[gm]|p[bgp]m|bmp|xpm|ico|xwd|tga|pcx|GIF|JP?(E)G|MIFF|TIF?(F)|PN[GM]|P[BGP]M|BMP|XPM|ICO|XWD|TGA|PCX|epub|EPUB|odt|ODT|fb?(2)|FB?(2)|mobi|MOBI|g3|G3|chm|CHM|md|markdown)?(.?(gz|GZ|bz2|BZ2|xz|XZ)))' okular +_comp__init_install_xspec '!*.pdf' epdfview pdfunite +_comp__init_install_xspec '!*.@(cb[rz7t]|djv?(u)|?(e)ps|pdf)' zathura +_comp__init_install_xspec '!*.@(?(e)ps|pdf)' ps2pdf ps2pdf12 ps2pdf13 ps2pdf14 ps2pdfwr +_comp__init_install_xspec '!*.texi*' makeinfo texi2html +_comp__init_install_xspec '!*.@(?(la)tex|texi|dtx|ins|ltx|dbj)' tex latex slitex jadetex pdfjadetex pdftex pdflatex texi2dvi xetex xelatex luatex lualatex +_comp__init_install_xspec '!*.mp3' mpg123 mpg321 madplay +_comp__init_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmv]|OG[AGMV]|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' xine aaxine cacaxine fbxine +_comp__init_install_xspec '!*@(.@(mp?(e)g|MP?(E)G|wm[av]|WM[AV]|avi|AVI|asf|vob|VOB|bin|dat|divx|DIVX|vcd|ps|pes|fli|flv|FLV|fxm|FXM|viv|rm|ram|yuv|mov|MOV|qt|QT|web[am]|WEB[AM]|mp[234]|MP[234]|m?(p)4[av]|M?(P)4[AV]|mkv|MKV|og[agmv]|OG[AGMV]|opus|OPUS|t[ps]|T[PS]|m2t?(s)|M2T?(S)|mts|MTS|wav|WAV|flac|FLAC|asx|ASX|mng|MNG|srt|m[eo]d|M[EO]D|s[3t]m|S[3T]M|it|IT|xm|XM|iso|ISO)|+([0-9]).@(vdr|VDR))?(.@(crdownload|part))' kaffeine dragon totem +_comp__init_install_xspec '!*.@(avi|asf|wmv)' aviplay +_comp__init_install_xspec '!*.@(rm?(j)|ra?(m)|smi?(l))' realplay +_comp__init_install_xspec '!*.@(mpg|mpeg|avi|mov|qt)' xanim +_comp__init_install_xspec '!*.@(og[ag]|m3u|flac|spx)' ogg123 +_comp__init_install_xspec '!*.@(mp3|ogg|pls|m3u)' gqmpeg freeamp +_comp__init_install_xspec '!*.fig' xfig +_comp__init_install_xspec '!*.@(mid?(i)|cmf)' playmidi +_comp__init_install_xspec '!*.@(mid?(i)|rmi|rcp|[gr]36|g18|mod|xm|it|x3m|s[3t]m|kar)' timidity +_comp__init_install_xspec '!*.@(669|abc|am[fs]|d[bs]m|dmf|far|it|mdl|m[eo]d|mid?(i)|mt[2m]|oct|okt?(a)|p[st]m|s[3t]m|ult|umx|wav|xm)' modplugplay modplug123 +_comp__init_install_xspec '*.@([ao]|so|so.!(conf|*/*)|[rs]pm|gif|jp?(e)g|mp3|mp?(e)g|avi|asf|ogg|class)' vi vim gvim rvim view rview rgvim rgview gview emacs xemacs sxemacs kate kwrite +_comp__init_install_xspec '!*.@(zip|z|gz|tgz)' bzme # konqueror not here on purpose, it's more than a web/html browser -_install_xspec '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx galeon dillo elinks amaya epiphany -_install_xspec '!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|?(f)odt|ott|odm|pdf)' oowriter lowriter -_install_xspec '!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|?(f)odp|otp)' ooimpress loimpress -_install_xspec '!*.@(sxc|stc|xls?([bmx])|xlw|xlt?([mx])|[ct]sv|?(f)ods|ots)' oocalc localc -_install_xspec '!*.@(sxd|std|sda|sdd|?(f)odg|otg)' oodraw lodraw -_install_xspec '!*.@(sxm|smf|mml|odf)' oomath lomath -_install_xspec '!*.odb' oobase lobase -_install_xspec '!*.[rs]pm' rpm2cpio -_install_xspec '!*.aux' bibtex -_install_xspec '!*.po' poedit gtranslator kbabel lokalize -_install_xspec '!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])' harbour gharbour hbpp -_install_xspec '!*.[Hh][Rr][Bb]' hbrun -_install_xspec '!*.ly' lilypond ly2dvi -_install_xspec '!*.@(dif?(f)|?(d)patch)?(.@([gx]z|bz2|lzma))' cdiff -_install_xspec '!@(*.@(ks|jks|jceks|p12|pfx|bks|ubr|gkr|cer|crt|cert|p7b|pkipath|pem|p10|csr|crl)|cacerts)' portecle -_install_xspec '!*.@(mp[234c]|og[ag]|@(fl|a)ac|m4[abp]|spx|tta|w?(a)v|wma|aif?(f)|asf|ape)' kid3 kid3-qt -unset -f _install_xspec - -# Minimal completion to use as fallback in _completion_loader. -_minimal() -{ - local cur prev words cword split - _init_completion -s || return - $split && return - _filedir +_comp__init_install_xspec '!*.@(?([xX]|[sS])[hH][tT][mM]?([lL]))' netscape mozilla lynx galeon dillo elinks amaya epiphany +_comp__init_install_xspec '!*.@(sxw|stw|sxg|sgl|doc?([mx])|dot?([mx])|rtf|txt|htm|html|?(f)odt|ott|odm|pdf)' oowriter lowriter +_comp__init_install_xspec '!*.@(sxi|sti|pps?(x)|ppt?([mx])|pot?([mx])|?(f)odp|otp)' ooimpress loimpress +_comp__init_install_xspec '!*.@(sxc|stc|xls?([bmx])|xlw|xlt?([mx])|[ct]sv|?(f)ods|ots)' oocalc localc +_comp__init_install_xspec '!*.@(sxd|std|sda|sdd|?(f)odg|otg)' oodraw lodraw +_comp__init_install_xspec '!*.@(sxm|smf|mml|odf)' oomath lomath +_comp__init_install_xspec '!*.odb' oobase lobase +_comp__init_install_xspec '!*.[rs]pm' rpm2cpio +_comp__init_install_xspec '!*.aux' bibtex +_comp__init_install_xspec '!*.po' poedit gtranslator kbabel lokalize +_comp__init_install_xspec '!*.@([Pp][Rr][Gg]|[Cc][Ll][Pp])' harbour gharbour hbpp +_comp__init_install_xspec '!*.[Hh][Rr][Bb]' hbrun +_comp__init_install_xspec '!*.ly' lilypond ly2dvi +_comp__init_install_xspec '!*.@(dif?(f)|?(d)patch)?(.@([gx]z|bz2|lzma))' cdiff +_comp__init_install_xspec '!@(*.@(ks|jks|jceks|p12|pfx|bks|ubr|gkr|cer|crt|cert|p7b|pkipath|pem|p10|csr|crl)|cacerts)' portecle +_comp__init_install_xspec '!*.@(mp[234c]|og[ag]|@(fl|a)ac|m4[abp]|spx|tta|w?(a)v|wma|aif?(f)|asf|ape)' kid3 kid3-qt +unset -f _comp__init_install_xspec + +# Minimal completion to use as fallback in _comp_complete_load. +# TODO:API: rename per conventions +_comp_complete_minimal() +{ + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + compopt -o bashdefault -o default } # Complete the empty string to allow completion of '>', '>>', and '<' on < 4.3 # https://lists.gnu.org/archive/html/bug-bash/2012-01/msg00045.html -complete -F _minimal '' +complete -F _comp_complete_minimal '' -__load_completion() +# @since 2.12 +_comp_load() { - local -a dirs=(${BASH_COMPLETION_USER_DIR:-${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion}/completions) - local ifs=$IFS IFS=: dir cmd="${1##*/}" compfile - [[ -n $cmd ]] || return 1 - for dir in ${XDG_DATA_DIRS:-/usr/local/share:/usr/share}; do - dirs+=($dir/bash-completion/completions) + local flag_fallback_default="" IFS=$' \t\n' + local OPTIND=1 OPTARG="" OPTERR=0 opt + while getopts ':D' opt "$@"; do + case $opt in + D) flag_fallback_default=set ;; + *) + echo "bash_completion: $FUNCNAME: usage error" >&2 + return 2 + ;; + esac done - IFS=$ifs + shift "$((OPTIND - 1))" - if [[ $BASH_SOURCE == */* ]]; then - dirs+=("${BASH_SOURCE%/*}/completions") - else - dirs+=(./completions) - fi + local cmd=$1 cmdname=${1##*/} dir compfile + local -a paths + [[ $cmdname ]] || return 1 local backslash= if [[ $cmd == \\* ]]; then - cmd="${cmd:1}" + cmd=${cmd:1} # If we already have a completion for the "real" command, use it - $(complete -p "$cmd" 2>/dev/null || echo false) "\\$cmd" && return 0 + $(complete -p -- "$cmd" 2>/dev/null || echo false) "\\$cmd" && return 0 backslash=\\ fi - for dir in "${dirs[@]}"; do - [[ -d $dir ]] || continue - for compfile in "$cmd" "$cmd.bash" "_$cmd"; do - compfile="$dir/$compfile" - # Avoid trying to source dirs; https://bugzilla.redhat.com/903540 - if [[ -f $compfile ]] && . "$compfile" &>/dev/null; then - [[ $backslash ]] && $(complete -p "$cmd") "\\$cmd" - return 0 + # Resolve absolute path to $cmd + local REPLY pathcmd origcmd=$cmd + if pathcmd=$(type -P -- "$cmd"); then + _comp_abspath "$pathcmd" + cmd=$REPLY + fi + + local -a dirs=() + + # Lookup order: + # 1) From BASH_COMPLETION_USER_DIR (e.g. ~/.local/share/bash-completion): + # User installed completions. + if [[ ${BASH_COMPLETION_USER_DIR-} ]]; then + _comp_split -F : paths "$BASH_COMPLETION_USER_DIR" && + dirs+=("${paths[@]/%//completions}") + else + dirs=("${XDG_DATA_HOME:-$HOME/.local/share}/bash-completion/completions") + fi + + # 2) From the location of bash_completion: Completions relative to the main + # script. This is primarily for run-in-place-from-git-clone setups, where + # we want to prefer in-tree completions over ones possibly coming with a + # system installed bash-completion. (Due to usual install layouts, this + # often hits the correct completions in system installations, too.) + if [[ $BASH_SOURCE == */* ]]; then + dirs+=("${BASH_SOURCE%/*}/completions") + else + dirs+=(./completions) + fi + + # 3) From bin directories extracted from the specified path to the command, + # the real path to the command, and $PATH + paths=() + [[ $cmd == /* ]] && paths+=("${cmd%/*}") + _comp_realcommand "$cmd" && paths+=("${REPLY%/*}") + _comp_split -aF : paths "$PATH" + for dir in "${paths[@]%/}"; do + [[ $dir == ?*/@(bin|sbin) ]] && + dirs+=("${dir%/*}/share/bash-completion/completions") + done + + # 4) From XDG_DATA_DIRS or system dirs (e.g. /usr/share, /usr/local/share): + # Completions in the system data dirs. + _comp_split -F : paths "${XDG_DATA_DIRS:-/usr/local/share:/usr/share}" && + dirs+=("${paths[@]/%//bash-completion/completions}") + + # Set up default $IFS in case loaded completions depend on it, + # as well as for $compspec invocation below. + local IFS=$' \t\n' + + # Look up and source + shift + local i prefix compspec + for prefix in "" _; do # Regular from all dirs first, then fallbacks + for i in ${!dirs[*]}; do + dir=${dirs[i]} + if [[ ! -d $dir ]]; then + unset -v 'dirs[i]' + continue fi + for compfile in "$prefix$cmdname" "$prefix$cmdname.bash"; do + compfile="$dir/$compfile" + # Avoid trying to source dirs as long as we support bash < 4.3 + # to avoid an fd leak; https://bugzilla.redhat.com/903540 + if [[ -d $compfile ]]; then + # Do not warn with . or .. (especially the former is common) + [[ $compfile == */.?(.) ]] || + echo "bash_completion: $compfile: is a directory" >&2 + elif [[ -e $compfile ]] && . "$compfile" "$cmd" "$@"; then + # At least $cmd is expected to have a completion set when + # we return successfully; see if it already does + if compspec=$(complete -p -- "$cmd" 2>/dev/null); then + # $cmd is the case in which we do backslash processing + [[ $backslash ]] && eval "$compspec \"\$backslash\$cmd\"" + # If invoked without path, that one should be set, too + # ...but let's not overwrite an existing one, if any + [[ $origcmd != */* ]] && + ! complete -p -- "$origcmd" &>/dev/null && + eval "$compspec \"\$origcmd\"" + return 0 + fi + # If not, see if we got one for $cmdname + if [[ $cmdname != "$cmd" ]] && compspec=$(complete -p -- "$cmdname" 2>/dev/null); then + # Use that for $cmd too, if we have a full path to it + [[ $cmd == /* ]] && eval "$compspec \"\$cmd\"" + return 0 + fi + # Nothing expected was set, continue lookup + fi + done done done # Look up simple "xspec" completions - [[ -v _xspecs[$cmd] ]] && - complete -F _filedir_xspec "$cmd" "$backslash$cmd" && return 0 + [[ -v _comp_xspecs[$cmdname] || -v _xspecs[$cmdname] ]] && + complete -F _comp_complete_filedir_xspec "$cmdname" "$backslash$cmdname" && return 0 + + if [[ $flag_fallback_default ]]; then + complete -F _comp_complete_minimal -- "$origcmd" && return 0 + fi return 1 } # set up dynamic completion loading -_completion_loader() +# @since 2.12 +_comp_complete_load() { # $1=_EmptycmD_ already for empty cmds in bash 4.3, set to it for earlier - local cmd="${1:-_EmptycmD_}" - - __load_completion "$cmd" && return 124 + local cmd=${1:-_EmptycmD_} - # Need to define *something*, otherwise there will be no completion at all. - complete -F _minimal -- "$cmd" && return 124 + # Pass -D to define *something*, or otherwise there will be no completion + # at all. + _comp_load -D -- "$cmd" && return 124 } && - complete -D -F _completion_loader + complete -D -F _comp_complete_load # Function for loading and calling functions from dynamically loaded # completion files that may not have been sourced yet. # @param $1 completion file to load function from in case it is missing -# @param $2... function and its arguments -_xfunc() -{ - set -- "$@" - local srcfile=$1 - shift - declare -F $1 &>/dev/null || __load_completion "$srcfile" - "$@" +# @param $2 the xfunc name. When it does not start with `_', +# `_comp_xfunc_${1//[^a-zA-Z0-9_]/_}_$2' is used for the actual name of the +# shell function. +# @param $3... if any, specifies the arguments that are passed to the xfunc. +# @since 2.12 +_comp_xfunc() +{ + local xfunc_name=$2 + [[ $xfunc_name == _* ]] || + xfunc_name=_comp_xfunc_${1//[^a-zA-Z0-9_]/_}_$xfunc_name + declare -F -- "$xfunc_name" &>/dev/null || _comp_load -- "$1" + "$xfunc_name" "${@:3}" } +# Call a POSIX-compatible awk. Solaris awk is not POSIX-compliant, but Solaris +# provides a POSIX-compatible version through /usr/xpg4/bin/awk. We switch the +# implementation to /usr/xpg4/bin/awk in Solaris if any. +# @since 2.12 +if [[ $OSTYPE == *solaris* && -x /usr/xpg4/bin/awk ]]; then + _comp_awk() + { + /usr/xpg4/bin/awk "$@" + } +else + _comp_awk() + { + command awk "$@" + } +fi + # source compat completion directory definitions -compat_dir=${BASH_COMPLETION_COMPAT_DIR:-/etc/bash_completion.d} -if [[ -d $compat_dir && -r $compat_dir && -x $compat_dir ]]; then - for i in "$compat_dir"/*; do - [[ ${i##*/} != @($_backup_glob|Makefile*|$_blacklist_glob) && -f \ - $i && -r $i ]] && . "$i" - done +_comp__init_compat_dirs=() +if [[ ${BASH_COMPLETION_COMPAT_DIR-} ]]; then + _comp__init_compat_dirs+=("$BASH_COMPLETION_COMPAT_DIR") +else + _comp__init_compat_dirs+=(/etc/bash_completion.d) + # Similarly as for the "completions" dir, look up from relative to + # bash_completion, primarily for installed-with-prefix and + # run-in-place-from-git-clone setups. Notably we do it after the system + # location here, in order to prefer in-tree variables and functions. + if [[ ${BASH_SOURCE%/*} == */share/bash-completion ]]; then + _comp__init_compat_dir=${BASH_SOURCE%/share/bash-completion/*}/etc/bash_completion.d + elif [[ $BASH_SOURCE == */* ]]; then + _comp__init_compat_dir="${BASH_SOURCE%/*}/bash_completion.d" + else + _comp__init_compat_dir=./bash_completion.d + fi + [[ ${_comp__init_compat_dirs[0]} == "$_comp__init_compat_dir" ]] || + _comp__init_compat_dirs+=("$_comp__init_compat_dir") fi -unset compat_dir i _blacklist_glob +for _comp__init_compat_dir in "${_comp__init_compat_dirs[@]}"; do + [[ -d $_comp__init_compat_dir && -r $_comp__init_compat_dir && -x $_comp__init_compat_dir ]] || continue + for _comp__init_file in "$_comp__init_compat_dir"/*; do + [[ ${_comp__init_file##*/} != @($_comp_backup_glob|Makefile*|${BASH_COMPLETION_COMPAT_IGNORE-}) && + -f $_comp__init_file && -r $_comp__init_file ]] && . "$_comp__init_file" + done +done +unset -v _comp__init_compat_dirs _comp__init_compat_dir _comp__init_file # source user completion file -user_completion=${BASH_COMPLETION_USER_FILE:-~/.bash_completion} -[[ ${BASH_SOURCE[0]} != "$user_completion" && -r $user_completion && -f $user_completion ]] && - . $user_completion -unset user_completion +# +# Remark: We explicitly check that $user_completion is not '/dev/null' since +# /dev/null may be a regular file in broken systems and can contain arbitrary +# garbages of suppressed command outputs. +_comp__init_user_file=${BASH_COMPLETION_USER_FILE:-~/.bash_completion} +[[ $_comp__init_user_file != "${BASH_SOURCE[0]}" && $_comp__init_user_file != /dev/null && -r $_comp__init_user_file && -f $_comp__init_user_file ]] && + . "$_comp__init_user_file" +unset -v _comp__init_user_file unset -f have -unset have +unset -v have -set $BASH_COMPLETION_ORIGINAL_V_VALUE -unset BASH_COMPLETION_ORIGINAL_V_VALUE +set $_comp__init_original_set_v +unset -v _comp__init_original_set_v # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/2to3 b/usr/share/bash-completion/completions/2to3 index 7c5b3303a2a..0a60e1f2551 100644 --- a/usr/share/bash-completion/completions/2to3 +++ b/usr/share/bash-completion/completions/2to3 @@ -1,39 +1,42 @@ # bash completion for 2to3 -*- shell-script -*- -_2to3() +_comp_cmd_2to3() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case $prev in -h | --help | --add-suffix) return ;; -f | --fix | -x | --nofix) - COMPREPLY=($(compgen -W \ - "$($1 --list-fixes 2>/dev/null | command sed -e 1d)" -- "$cur")) + _comp_compgen_split -- "$( + "$1" --list-fixes 2>/dev/null | command sed -e 1d + )" return ;; -j | --processes) - COMPREPLY=($(compgen -W "{1..$(_ncpus)}" -- "$cur")) + local REPLY + _comp_get_ncpus + _comp_compgen -- -W "{1..$REPLY}" return ;; -o | --output-dir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir py + _comp_compgen_filedir py } && - complete -F _2to3 2to3 + complete -F _comp_cmd_2to3 2to3 # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/7z b/usr/share/bash-completion/completions/7z index a8acbc59355..027f84be652 100644 --- a/usr/share/bash-completion/completions/7z +++ b/usr/share/bash-completion/completions/7z @@ -1,21 +1,21 @@ # 7z(1) completion -*- shell-script -*- -_7z() +_comp_cmd_7z() { - local cur prev words cword - _init_completion -n = || return + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return if ((cword == 1)); then - COMPREPLY=($(compgen -W 'a b d e l t u x' -- "$cur")) + _comp_compgen -- -W 'a b d e h i l rn t u x' return fi local mode - [[ ${words[1]} == [adu] ]] && mode=w || mode=r + [[ ${words[1]} == @(a|d|rn|u) ]] && mode=w || mode=r case $cur in -ao*) - COMPREPLY=($(compgen -P${cur:0:3} -W 'a s t u' -- "${cur:3}")) + _comp_compgen -c "${cur:3}" -- -P"${cur:0:3}" -W 'a s t u' return ;; -?(a)[ix]*) @@ -26,59 +26,48 @@ _7z() opt=${cur:0:2} cur=${cur:2} fi if [[ $cur != *[@\!]* ]]; then - COMPREPLY=($(compgen -P$opt -W '@ ! r@ r-@ r0@ r! r-! r0!' \ - -- "$cur")) + _comp_compgen -- -P"$opt" -W '@ ! r@ r-@ r0@ r! r-! r0!' elif [[ $cur == ?(r@(-|0|))@* ]]; then - local IFS=$' \t\n' reset=$(shopt -po noglob) - set -o noglob - COMPREPLY=($(compgen -P"${opt}${cur%%@*}@" -f -- "${cur#*@}")) - $reset + _comp_compgen -c "${cur#*@}" -- -P"${opt}${cur%%@*}@" -f compopt -o filenames fi return ;; -mhe=* | -mhc=* | -ms=* | -mt=*) - COMPREPLY=($(compgen -W 'on off' -- "${cur#*=}")) + _comp_compgen -c "${cur#*=}" -- -W 'on off' return ;; -mx=*) - COMPREPLY=($(compgen -W '0 1 3 5 7 9' -- "${cur#*=}")) + _comp_compgen -c "${cur#*=}" -- -W '0 1 3 5 7 9' return ;; -o* | -w?*) - local reset=$(shopt -po noglob) - set -o noglob compopt -o filenames - local ifs=$IFS IFS=$'\n' - COMPREPLY=($(compgen -d -P${cur:0:2} -S/ -- "${cur:2}")) - IFS=$ifs - $reset + _comp_compgen -c "${cur:2}" -- -d -P"${cur:0:2}" -S/ compopt -o nospace return ;; -r?*) - COMPREPLY=($(compgen -P${cur:0:2} -W '- 0' -- "${cur:2}")) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '- 0' return ;; -scs*) - COMPREPLY=($(compgen -P${cur:0:4} -W 'UTF-8 WIN DOS' \ - -- "${cur:4}")) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W 'UTF-8 WIN DOS' return ;; -ssc?*) - COMPREPLY=($(compgen -P${cur:0:4} -W '-' -- "${cur:4}")) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W '-' return ;; -t*) if [[ $mode == w ]]; then - COMPREPLY=($(compgen -P${cur:0:2} -W '7z bzip2 gzip swfc - tar wim xz zip' -- "${cur:2}")) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z bzip2 gzip + swfc tar wim xz zip' else - COMPREPLY=($(compgen -P${cur:0:2} -W '7z apm arj bzip2 cab - chm cpio cramfs deb dmg elf fat flv gzip hfs iso lzh lzma - lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar rpm - squashfs swf swfc tar udf vhd wim xar xz z zip' \ - -- "${cur:2}")) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z apm arj + bzip2 cab chm cpio cramfs deb dmg elf fat flv gzip hfs iso + lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar + rpm squashfs swf swfc tar udf vhd wim xar xz z zip' fi return ;; @@ -88,18 +77,17 @@ _7z() esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= - -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' \ - -- "$cur")) + _comp_compgen -- -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= + -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' [[ ${COMPREPLY-} == -@(an|bd|sfx|si|slt|so|ssc|[rwy]) ]] || compopt -o nospace return fi - local args - _count_args = - if ((args == 2)); then - _filedir_xspec unzip + local REPLY + _comp_count_args + if ((REPLY == 2)); then + _comp_compgen_filedir_xspec unzip # TODO: parsing 7z i output? # - how to figure out if the format is input or output? # - find string Formats:, read until next empty line @@ -109,20 +97,20 @@ _7z() # - terminate on token containing anything [^a-z0-9] # (assumption: extensions are all lowercase) [[ $mode == w ]] && - _filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || - _filedir '@(7z|arj|bz2|cab|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' + _comp_compgen -a filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || + _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' else if [[ ${words[1]} == d ]]; then - local IFS=$'\n' - COMPREPLY=($(compgen -W "$(printf '%s\n' "$($1 l ${words[2]} \ - -slt 2>/dev/null | command sed -n '/^Path =/s/^Path = \(.*\)$/\1/p' \ - 2>/dev/null | tail -n+2)")" -- "$cur")) + _comp_compgen_split -l -- "$( + "$1" l "${words[2]}" -slt 2>/dev/null | command sed -n \ + '/^Path =/s/^Path = \(.*\)$/\1/p' 2>/dev/null | tail -n+2 + )" compopt -o filenames else - _filedir + _comp_compgen_filedir fi fi } && - complete -F _7z 7z 7za + complete -F _comp_cmd_7z 7z 7za 7zr 7zz 7zzs # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/7za b/usr/share/bash-completion/completions/7za index a8acbc59355..027f84be652 100644 --- a/usr/share/bash-completion/completions/7za +++ b/usr/share/bash-completion/completions/7za @@ -1,21 +1,21 @@ # 7z(1) completion -*- shell-script -*- -_7z() +_comp_cmd_7z() { - local cur prev words cword - _init_completion -n = || return + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return if ((cword == 1)); then - COMPREPLY=($(compgen -W 'a b d e l t u x' -- "$cur")) + _comp_compgen -- -W 'a b d e h i l rn t u x' return fi local mode - [[ ${words[1]} == [adu] ]] && mode=w || mode=r + [[ ${words[1]} == @(a|d|rn|u) ]] && mode=w || mode=r case $cur in -ao*) - COMPREPLY=($(compgen -P${cur:0:3} -W 'a s t u' -- "${cur:3}")) + _comp_compgen -c "${cur:3}" -- -P"${cur:0:3}" -W 'a s t u' return ;; -?(a)[ix]*) @@ -26,59 +26,48 @@ _7z() opt=${cur:0:2} cur=${cur:2} fi if [[ $cur != *[@\!]* ]]; then - COMPREPLY=($(compgen -P$opt -W '@ ! r@ r-@ r0@ r! r-! r0!' \ - -- "$cur")) + _comp_compgen -- -P"$opt" -W '@ ! r@ r-@ r0@ r! r-! r0!' elif [[ $cur == ?(r@(-|0|))@* ]]; then - local IFS=$' \t\n' reset=$(shopt -po noglob) - set -o noglob - COMPREPLY=($(compgen -P"${opt}${cur%%@*}@" -f -- "${cur#*@}")) - $reset + _comp_compgen -c "${cur#*@}" -- -P"${opt}${cur%%@*}@" -f compopt -o filenames fi return ;; -mhe=* | -mhc=* | -ms=* | -mt=*) - COMPREPLY=($(compgen -W 'on off' -- "${cur#*=}")) + _comp_compgen -c "${cur#*=}" -- -W 'on off' return ;; -mx=*) - COMPREPLY=($(compgen -W '0 1 3 5 7 9' -- "${cur#*=}")) + _comp_compgen -c "${cur#*=}" -- -W '0 1 3 5 7 9' return ;; -o* | -w?*) - local reset=$(shopt -po noglob) - set -o noglob compopt -o filenames - local ifs=$IFS IFS=$'\n' - COMPREPLY=($(compgen -d -P${cur:0:2} -S/ -- "${cur:2}")) - IFS=$ifs - $reset + _comp_compgen -c "${cur:2}" -- -d -P"${cur:0:2}" -S/ compopt -o nospace return ;; -r?*) - COMPREPLY=($(compgen -P${cur:0:2} -W '- 0' -- "${cur:2}")) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '- 0' return ;; -scs*) - COMPREPLY=($(compgen -P${cur:0:4} -W 'UTF-8 WIN DOS' \ - -- "${cur:4}")) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W 'UTF-8 WIN DOS' return ;; -ssc?*) - COMPREPLY=($(compgen -P${cur:0:4} -W '-' -- "${cur:4}")) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W '-' return ;; -t*) if [[ $mode == w ]]; then - COMPREPLY=($(compgen -P${cur:0:2} -W '7z bzip2 gzip swfc - tar wim xz zip' -- "${cur:2}")) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z bzip2 gzip + swfc tar wim xz zip' else - COMPREPLY=($(compgen -P${cur:0:2} -W '7z apm arj bzip2 cab - chm cpio cramfs deb dmg elf fat flv gzip hfs iso lzh lzma - lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar rpm - squashfs swf swfc tar udf vhd wim xar xz z zip' \ - -- "${cur:2}")) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z apm arj + bzip2 cab chm cpio cramfs deb dmg elf fat flv gzip hfs iso + lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar + rpm squashfs swf swfc tar udf vhd wim xar xz z zip' fi return ;; @@ -88,18 +77,17 @@ _7z() esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= - -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' \ - -- "$cur")) + _comp_compgen -- -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= + -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' [[ ${COMPREPLY-} == -@(an|bd|sfx|si|slt|so|ssc|[rwy]) ]] || compopt -o nospace return fi - local args - _count_args = - if ((args == 2)); then - _filedir_xspec unzip + local REPLY + _comp_count_args + if ((REPLY == 2)); then + _comp_compgen_filedir_xspec unzip # TODO: parsing 7z i output? # - how to figure out if the format is input or output? # - find string Formats:, read until next empty line @@ -109,20 +97,20 @@ _7z() # - terminate on token containing anything [^a-z0-9] # (assumption: extensions are all lowercase) [[ $mode == w ]] && - _filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || - _filedir '@(7z|arj|bz2|cab|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' + _comp_compgen -a filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || + _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' else if [[ ${words[1]} == d ]]; then - local IFS=$'\n' - COMPREPLY=($(compgen -W "$(printf '%s\n' "$($1 l ${words[2]} \ - -slt 2>/dev/null | command sed -n '/^Path =/s/^Path = \(.*\)$/\1/p' \ - 2>/dev/null | tail -n+2)")" -- "$cur")) + _comp_compgen_split -l -- "$( + "$1" l "${words[2]}" -slt 2>/dev/null | command sed -n \ + '/^Path =/s/^Path = \(.*\)$/\1/p' 2>/dev/null | tail -n+2 + )" compopt -o filenames else - _filedir + _comp_compgen_filedir fi fi } && - complete -F _7z 7z 7za + complete -F _comp_cmd_7z 7z 7za 7zr 7zz 7zzs # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/7zr b/usr/share/bash-completion/completions/7zr new file mode 100644 index 00000000000..027f84be652 --- /dev/null +++ b/usr/share/bash-completion/completions/7zr @@ -0,0 +1,116 @@ +# 7z(1) completion -*- shell-script -*- + +_comp_cmd_7z() +{ + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return + + if ((cword == 1)); then + _comp_compgen -- -W 'a b d e h i l rn t u x' + return + fi + + local mode + [[ ${words[1]} == @(a|d|rn|u) ]] && mode=w || mode=r + + case $cur in + -ao*) + _comp_compgen -c "${cur:3}" -- -P"${cur:0:3}" -W 'a s t u' + return + ;; + -?(a)[ix]*) + local opt + if [[ $cur == -a[ix]* ]]; then + opt=${cur:0:3} cur=${cur:3} + else + opt=${cur:0:2} cur=${cur:2} + fi + if [[ $cur != *[@\!]* ]]; then + _comp_compgen -- -P"$opt" -W '@ ! r@ r-@ r0@ r! r-! r0!' + elif [[ $cur == ?(r@(-|0|))@* ]]; then + _comp_compgen -c "${cur#*@}" -- -P"${opt}${cur%%@*}@" -f + compopt -o filenames + fi + return + ;; + -mhe=* | -mhc=* | -ms=* | -mt=*) + _comp_compgen -c "${cur#*=}" -- -W 'on off' + return + ;; + -mx=*) + _comp_compgen -c "${cur#*=}" -- -W '0 1 3 5 7 9' + return + ;; + -o* | -w?*) + compopt -o filenames + _comp_compgen -c "${cur:2}" -- -d -P"${cur:0:2}" -S/ + compopt -o nospace + return + ;; + -r?*) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '- 0' + return + ;; + -scs*) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W 'UTF-8 WIN DOS' + return + ;; + -ssc?*) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W '-' + return + ;; + -t*) + if [[ $mode == w ]]; then + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z bzip2 gzip + swfc tar wim xz zip' + else + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z apm arj + bzip2 cab chm cpio cramfs deb dmg elf fat flv gzip hfs iso + lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar + rpm squashfs swf swfc tar udf vhd wim xar xz z zip' + fi + return + ;; + -m*=* | -p* | -u* | -v*) + return + ;; + esac + + if [[ $cur == -* ]]; then + _comp_compgen -- -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= + -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' + [[ ${COMPREPLY-} == -@(an|bd|sfx|si|slt|so|ssc|[rwy]) ]] || + compopt -o nospace + return + fi + + local REPLY + _comp_count_args + if ((REPLY == 2)); then + _comp_compgen_filedir_xspec unzip + # TODO: parsing 7z i output? + # - how to figure out if the format is input or output? + # - find string Formats:, read until next empty line + # - extensions start from column 26 + # - ignore everything in parens + # - terminate on two spaces + # - terminate on token containing anything [^a-z0-9] + # (assumption: extensions are all lowercase) + [[ $mode == w ]] && + _comp_compgen -a filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || + _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' + else + if [[ ${words[1]} == d ]]; then + _comp_compgen_split -l -- "$( + "$1" l "${words[2]}" -slt 2>/dev/null | command sed -n \ + '/^Path =/s/^Path = \(.*\)$/\1/p' 2>/dev/null | tail -n+2 + )" + compopt -o filenames + else + _comp_compgen_filedir + fi + fi +} && + complete -F _comp_cmd_7z 7z 7za 7zr 7zz 7zzs + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/7zz b/usr/share/bash-completion/completions/7zz new file mode 100644 index 00000000000..027f84be652 --- /dev/null +++ b/usr/share/bash-completion/completions/7zz @@ -0,0 +1,116 @@ +# 7z(1) completion -*- shell-script -*- + +_comp_cmd_7z() +{ + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return + + if ((cword == 1)); then + _comp_compgen -- -W 'a b d e h i l rn t u x' + return + fi + + local mode + [[ ${words[1]} == @(a|d|rn|u) ]] && mode=w || mode=r + + case $cur in + -ao*) + _comp_compgen -c "${cur:3}" -- -P"${cur:0:3}" -W 'a s t u' + return + ;; + -?(a)[ix]*) + local opt + if [[ $cur == -a[ix]* ]]; then + opt=${cur:0:3} cur=${cur:3} + else + opt=${cur:0:2} cur=${cur:2} + fi + if [[ $cur != *[@\!]* ]]; then + _comp_compgen -- -P"$opt" -W '@ ! r@ r-@ r0@ r! r-! r0!' + elif [[ $cur == ?(r@(-|0|))@* ]]; then + _comp_compgen -c "${cur#*@}" -- -P"${opt}${cur%%@*}@" -f + compopt -o filenames + fi + return + ;; + -mhe=* | -mhc=* | -ms=* | -mt=*) + _comp_compgen -c "${cur#*=}" -- -W 'on off' + return + ;; + -mx=*) + _comp_compgen -c "${cur#*=}" -- -W '0 1 3 5 7 9' + return + ;; + -o* | -w?*) + compopt -o filenames + _comp_compgen -c "${cur:2}" -- -d -P"${cur:0:2}" -S/ + compopt -o nospace + return + ;; + -r?*) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '- 0' + return + ;; + -scs*) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W 'UTF-8 WIN DOS' + return + ;; + -ssc?*) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W '-' + return + ;; + -t*) + if [[ $mode == w ]]; then + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z bzip2 gzip + swfc tar wim xz zip' + else + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z apm arj + bzip2 cab chm cpio cramfs deb dmg elf fat flv gzip hfs iso + lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar + rpm squashfs swf swfc tar udf vhd wim xar xz z zip' + fi + return + ;; + -m*=* | -p* | -u* | -v*) + return + ;; + esac + + if [[ $cur == -* ]]; then + _comp_compgen -- -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= + -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' + [[ ${COMPREPLY-} == -@(an|bd|sfx|si|slt|so|ssc|[rwy]) ]] || + compopt -o nospace + return + fi + + local REPLY + _comp_count_args + if ((REPLY == 2)); then + _comp_compgen_filedir_xspec unzip + # TODO: parsing 7z i output? + # - how to figure out if the format is input or output? + # - find string Formats:, read until next empty line + # - extensions start from column 26 + # - ignore everything in parens + # - terminate on two spaces + # - terminate on token containing anything [^a-z0-9] + # (assumption: extensions are all lowercase) + [[ $mode == w ]] && + _comp_compgen -a filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || + _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' + else + if [[ ${words[1]} == d ]]; then + _comp_compgen_split -l -- "$( + "$1" l "${words[2]}" -slt 2>/dev/null | command sed -n \ + '/^Path =/s/^Path = \(.*\)$/\1/p' 2>/dev/null | tail -n+2 + )" + compopt -o filenames + else + _comp_compgen_filedir + fi + fi +} && + complete -F _comp_cmd_7z 7z 7za 7zr 7zz 7zzs + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/7zzs b/usr/share/bash-completion/completions/7zzs new file mode 100644 index 00000000000..027f84be652 --- /dev/null +++ b/usr/share/bash-completion/completions/7zzs @@ -0,0 +1,116 @@ +# 7z(1) completion -*- shell-script -*- + +_comp_cmd_7z() +{ + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return + + if ((cword == 1)); then + _comp_compgen -- -W 'a b d e h i l rn t u x' + return + fi + + local mode + [[ ${words[1]} == @(a|d|rn|u) ]] && mode=w || mode=r + + case $cur in + -ao*) + _comp_compgen -c "${cur:3}" -- -P"${cur:0:3}" -W 'a s t u' + return + ;; + -?(a)[ix]*) + local opt + if [[ $cur == -a[ix]* ]]; then + opt=${cur:0:3} cur=${cur:3} + else + opt=${cur:0:2} cur=${cur:2} + fi + if [[ $cur != *[@\!]* ]]; then + _comp_compgen -- -P"$opt" -W '@ ! r@ r-@ r0@ r! r-! r0!' + elif [[ $cur == ?(r@(-|0|))@* ]]; then + _comp_compgen -c "${cur#*@}" -- -P"${opt}${cur%%@*}@" -f + compopt -o filenames + fi + return + ;; + -mhe=* | -mhc=* | -ms=* | -mt=*) + _comp_compgen -c "${cur#*=}" -- -W 'on off' + return + ;; + -mx=*) + _comp_compgen -c "${cur#*=}" -- -W '0 1 3 5 7 9' + return + ;; + -o* | -w?*) + compopt -o filenames + _comp_compgen -c "${cur:2}" -- -d -P"${cur:0:2}" -S/ + compopt -o nospace + return + ;; + -r?*) + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '- 0' + return + ;; + -scs*) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W 'UTF-8 WIN DOS' + return + ;; + -ssc?*) + _comp_compgen -c "${cur:4}" -- -P"${cur:0:4}" -W '-' + return + ;; + -t*) + if [[ $mode == w ]]; then + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z bzip2 gzip + swfc tar wim xz zip' + else + _comp_compgen -c "${cur:2}" -- -P"${cur:0:2}" -W '7z apm arj + bzip2 cab chm cpio cramfs deb dmg elf fat flv gzip hfs iso + lzh lzma lzma86 macho mbr mslz mub nsis ntfs pe ppmd rar + rpm squashfs swf swfc tar udf vhd wim xar xz z zip' + fi + return + ;; + -m*=* | -p* | -u* | -v*) + return + ;; + esac + + if [[ $cur == -* ]]; then + _comp_compgen -- -W '-ai -an -ao -ax -bd -i -m{x,s,f,he,hc,mt}= + -o -p -r -scs -sfx -si -slp -slt -so -ssc -t -u -v -w -x -y' + [[ ${COMPREPLY-} == -@(an|bd|sfx|si|slt|so|ssc|[rwy]) ]] || + compopt -o nospace + return + fi + + local REPLY + _comp_count_args + if ((REPLY == 2)); then + _comp_compgen_filedir_xspec unzip + # TODO: parsing 7z i output? + # - how to figure out if the format is input or output? + # - find string Formats:, read until next empty line + # - extensions start from column 26 + # - ignore everything in parens + # - terminate on two spaces + # - terminate on token containing anything [^a-z0-9] + # (assumption: extensions are all lowercase) + [[ $mode == w ]] && + _comp_compgen -a filedir '@(7z|bz2|swf|?(g)tar|?(t)[bglx]z|tb?(z)2|wim)' || + _comp_compgen -a filedir '@(7z?(.001)|arj|bz2|cab|cb7|chm|cpio|deb|dmg|flv|gem|img|iso|lz[ah]|lzma?(86)|msi|pmd|[rx]ar|rpm|sw[fm]|?(g)tar|taz|?(t)[bglx]z|tb?(z)2|vhd|wim|Z)' + else + if [[ ${words[1]} == d ]]; then + _comp_compgen_split -l -- "$( + "$1" l "${words[2]}" -slt 2>/dev/null | command sed -n \ + '/^Path =/s/^Path = \(.*\)$/\1/p' 2>/dev/null | tail -n+2 + )" + compopt -o filenames + else + _comp_compgen_filedir + fi + fi +} && + complete -F _comp_cmd_7z 7z 7za 7zr 7zz 7zzs + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_adb b/usr/share/bash-completion/completions/_adb index e8ebab13239..0189331c74c 100644 --- a/usr/share/bash-completion/completions/_adb +++ b/usr/share/bash-completion/completions/_adb @@ -3,67 +3,67 @@ # Use of this file is deprecated. Upstream completion is available in # the Android SDK, use that instead. -_adb_command_usage() +_comp_cmd_adb__command_usage() { - COMPREPLY=($(compgen -W \ - '$("$1" help 2>&1 | command grep "^ *\(adb \)\? *$2 " \ - | command sed -e "s/[]|[]/\n/g" | _parse_help -)' -- "$cur")) + _comp_compgen_help - <<<"$("$1" help 2>&1 | + command sed -e "/^ *\(adb \)\{0,1\} *$2 /!d;s/[]|[]/\n/g")" } -_adb() +_comp_cmd_adb() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -s | -p | --algo | --key | --iv) return ;; -f) - _filedir + _comp_compgen_filedir return ;; esac - local cmd i + local cmd has_cmd="" i for ((i = 1; i < cword; i++)); do if [[ ${words[i]} != -* && ${words[i - 1]} != -[sp] ]]; then cmd="${words[i]}" + has_cmd=set break fi done - if [[ ! -v cmd ]]; then + if [[ ! $has_cmd ]]; then local tmp=() if [[ ! $cur || $cur == -* ]]; then - tmp+=($(compgen -W '$(_parse_help "$1" help)' -- "$cur")) + _comp_compgen -av tmp help -- help fi if [[ ! $cur || $cur != -* ]]; then - tmp+=($($1 help 2>&1 | awk '$1 == "adb" { print $2 }')) + _comp_split -a tmp "$("$1" help 2>&1 | _comp_awk '$1 == "adb" { print $2 }')" tmp+=(devices connect disconnect sideload) fi - COMPREPLY=($(compgen -W '${tmp[@]}' -- "$cur")) + ((${#tmp[@]})) && + _comp_compgen -- -W '"${tmp[@]}"' return fi # TODO: more and better command completions - _adb_command_usage "$1" $cmd + _comp_cmd_adb__command_usage "$1" "$cmd" case $cmd in push | restore | sideload) - _filedir + _comp_compgen -a filedir ;; forward) - COMPREPLY=($(compgen -W \ - '$("$1" help 2>&1 | command sed -ne "s/^ *adb *forward *-/-/p" | \ - _parse_help -)' -- "$cur")) + _comp_compgen_help - <<<"$("$1" help 2>&1 | + command sed -ne "s/^ *adb *forward *-/-/p")" ;; reboot) - COMPREPLY=($(compgen -W 'bootloader recovery' -- "$cur")) + _comp_compgen -- -W 'bootloader recovery' ;; esac } && - complete -F _adb adb + complete -F _comp_cmd_adb adb # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_airflow b/usr/share/bash-completion/completions/_airflow new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_airflow @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_allero b/usr/share/bash-completion/completions/_allero new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_allero @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible b/usr/share/bash-completion/completions/_ansible new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-config b/usr/share/bash-completion/completions/_ansible-config new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-config @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-console b/usr/share/bash-completion/completions/_ansible-console new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-console @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-doc b/usr/share/bash-completion/completions/_ansible-doc new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-doc @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-galaxy b/usr/share/bash-completion/completions/_ansible-galaxy new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-galaxy @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-inventory b/usr/share/bash-completion/completions/_ansible-inventory new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-inventory @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-playbook b/usr/share/bash-completion/completions/_ansible-playbook new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-playbook @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-pull b/usr/share/bash-completion/completions/_ansible-pull new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-pull @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ansible-vault b/usr/share/bash-completion/completions/_ansible-vault new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_ansible-vault @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_arduino-cli b/usr/share/bash-completion/completions/_arduino-cli new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_arduino-cli @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_bao b/usr/share/bash-completion/completions/_bao new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_bao @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_black b/usr/share/bash-completion/completions/_black new file mode 100644 index 00000000000..e6d2df6aa52 --- /dev/null +++ b/usr/share/bash-completion/completions/_black @@ -0,0 +1,15 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "_${cmdname^^}_COMPLETE=bash_source $cmd". +# This pattern is used by programs built with https://click.palletsprojects.com +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + # shellcheck disable=SC2154 + ucname="${cmdname^^}" + ucname=${ucname//-/_} + export "_${ucname}_COMPLETE=bash_source" + "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_blackd b/usr/share/bash-completion/completions/_blackd new file mode 100644 index 00000000000..e6d2df6aa52 --- /dev/null +++ b/usr/share/bash-completion/completions/_blackd @@ -0,0 +1,15 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "_${cmdname^^}_COMPLETE=bash_source $cmd". +# This pattern is used by programs built with https://click.palletsprojects.com +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + # shellcheck disable=SC2154 + ucname="${cmdname^^}" + ucname=${ucname//-/_} + export "_${ucname}_COMPLETE=bash_source" + "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_buf b/usr/share/bash-completion/completions/_buf new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_buf @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_cal b/usr/share/bash-completion/completions/_cal index 1eec2674e4d..3f8b3ca8028 100644 --- a/usr/share/bash-completion/completions/_cal +++ b/usr/share/bash-completion/completions/_cal @@ -3,15 +3,15 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_cal() +_comp_cmd_cal() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -m) if [[ $OSTYPE == *bsd* ]]; then - COMPREPLY=($(compgen -W '{1..12}' -- "$cur")) + _comp_compgen -- -W '{1..12}' return fi ;; @@ -24,15 +24,14 @@ _cal() esac if [[ $cur == -* ]]; then - local opts=$(_parse_help "$1") - COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + _comp_compgen_help || _comp_compgen_usage return fi - local args - _count_args - ((args == 1)) && COMPREPLY=($(compgen -W '{1..12}' -- "$cur")) + local REPLY + _comp_count_args + ((REPLY == 1)) && _comp_compgen -- -W '{1..12}' } && - complete -F _cal cal ncal + complete -F _comp_cmd_cal cal ncal # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_cargo b/usr/share/bash-completion/completions/_cargo new file mode 100644 index 00000000000..257eb35ed46 --- /dev/null +++ b/usr/share/bash-completion/completions/_cargo @@ -0,0 +1,9 @@ +# 3rd party completion loader for cargo -*- shell-script -*- +# +# This serves as a fallback in case the completion is not installed otherwise. + +# shellcheck disable=SC2168 # "local" is ok, assume sourced by _comp_load +local rustup="${1%cargo}rustup" # use rustup from same dir +eval -- "$("$rustup" completions bash cargo 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_chezmoi b/usr/share/bash-completion/completions/_chezmoi new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_chezmoi @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_chsh b/usr/share/bash-completion/completions/_chsh index 8f8a8077dca..4e243ba024a 100644 --- a/usr/share/bash-completion/completions/_chsh +++ b/usr/share/bash-completion/completions/_chsh @@ -1,31 +1,43 @@ # chsh(1) completion -*- shell-script -*- -# Use of this file is deprecated on Linux. Upstream completion is -# available in util-linux >= 2.23, use that instead. +# Use of this file is deprecated on Linux systems whose chsh is from +# util-linux. Upstream completion is in util-linux >= 2.23, use that instead. -_chsh() +_comp_cmd_chsh() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + + local word chroot="" has_chroot="" + for word in "${words[@]}"; do + if [[ $has_chroot ]]; then + chroot=$word + break + fi + [[ $word != -@(R|-root) ]] || has_chroot=set + done case $prev in --list-shells | --help | -v | --version) return ;; + -R | --root) + _comp_compgen_filedir -d + return + ;; -s | --shell) - _shells + _comp_compgen_shells "${chroot-}" return ;; esac if [[ $cur == -* ]]; then - local opts=$(_parse_help "$1") - COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + _comp_compgen_help || _comp_compgen_usage else - _allowed_users + _comp_compgen_allowed_users fi } && - complete -F _chsh chsh + complete -F _comp_cmd_chsh chsh # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_cilium b/usr/share/bash-completion/completions/_cilium new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_cilium @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_cloudquery b/usr/share/bash-completion/completions/_cloudquery new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_cloudquery @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_conda b/usr/share/bash-completion/completions/_conda new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_conda @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_constellation b/usr/share/bash-completion/completions/_constellation new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_constellation @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_consul b/usr/share/bash-completion/completions/_consul new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_consul @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_crc b/usr/share/bash-completion/completions/_crc new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_crc @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_cz b/usr/share/bash-completion/completions/_cz new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_cz @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_datree b/usr/share/bash-completion/completions/_datree new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_datree @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_deno b/usr/share/bash-completion/completions/_deno new file mode 100644 index 00000000000..fe326883e3d --- /dev/null +++ b/usr/share/bash-completion/completions/_deno @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_diesel b/usr/share/bash-completion/completions/_diesel new file mode 100644 index 00000000000..fe326883e3d --- /dev/null +++ b/usr/share/bash-completion/completions/_diesel @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_dlv b/usr/share/bash-completion/completions/_dlv new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_dlv @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_dmesg b/usr/share/bash-completion/completions/_dmesg index 830665411af..ad90fcca5fc 100644 --- a/usr/share/bash-completion/completions/_dmesg +++ b/usr/share/bash-completion/completions/_dmesg @@ -3,31 +3,29 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_dmesg() +_comp_cmd_dmesg() { [[ $OSTYPE == *solaris* ]] && return # no args there - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -h | --help | -V | --version | -s | --buffer-size | -M | -N) return ;; -f | --facility) - COMPREPLY=($(compgen -W 'kern user mail daemon auth syslog lpr - news' -- "$cur")) + _comp_compgen -- -W 'kern user mail daemon auth syslog lpr news' return ;; -l | --level | -n | --console-level) - COMPREPLY=($(compgen -W '{1..8}' -- "$cur")) + _comp_compgen -- -W '{1..8}' return ;; esac - local opts=$(_parse_help "$1") - COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + _comp_compgen_help || _comp_compgen_usage } && - complete -F _dmesg dmesg + complete -F _comp_cmd_dmesg dmesg # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_docker b/usr/share/bash-completion/completions/_docker new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_docker @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_dprint b/usr/share/bash-completion/completions/_dprint new file mode 100644 index 00000000000..fe326883e3d --- /dev/null +++ b/usr/share/bash-completion/completions/_dprint @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_eject b/usr/share/bash-completion/completions/_eject index 52168f741b3..76ae0f8230f 100644 --- a/usr/share/bash-completion/completions/_eject +++ b/usr/share/bash-completion/completions/_eject @@ -3,31 +3,31 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_eject() +_comp_cmd_eject() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -h | --help | -V | --version | -c | --changerslot | -x | --cdspeed) return ;; -a | --auto | -i | --manualeject) - COMPREPLY=($(compgen -W 'on off' -- "$cur")) + _comp_compgen -- -W 'on off' return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help return elif [[ $prev == @(-d|--default) ]]; then return fi - _cd_devices - _dvd_devices + _comp_compgen_cd_devices + _comp_compgen -a dvd_devices } && - complete -F _eject eject + complete -F _comp_cmd_eject eject # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_flamegraph b/usr/share/bash-completion/completions/_flamegraph new file mode 100644 index 00000000000..95c86c061d6 --- /dev/null +++ b/usr/share/bash-completion/completions/_flamegraph @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd --completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" --completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_flask b/usr/share/bash-completion/completions/_flask new file mode 100644 index 00000000000..e6d2df6aa52 --- /dev/null +++ b/usr/share/bash-completion/completions/_flask @@ -0,0 +1,15 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "_${cmdname^^}_COMPLETE=bash_source $cmd". +# This pattern is used by programs built with https://click.palletsprojects.com +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + # shellcheck disable=SC2154 + ucname="${cmdname^^}" + ucname=${ucname//-/_} + export "_${ucname}_COMPLETE=bash_source" + "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gaiacli b/usr/share/bash-completion/completions/_gaiacli new file mode 100644 index 00000000000..2f485980a1d --- /dev/null +++ b/usr/share/bash-completion/completions/_gaiacli @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gaiad b/usr/share/bash-completion/completions/_gaiad new file mode 100644 index 00000000000..2f485980a1d --- /dev/null +++ b/usr/share/bash-completion/completions/_gaiad @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gardenctl b/usr/share/bash-completion/completions/_gardenctl new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_gardenctl @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gh b/usr/share/bash-completion/completions/_gh new file mode 100644 index 00000000000..8a0376dd33f --- /dev/null +++ b/usr/share/bash-completion/completions/_gh @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion --shell bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion --shell bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gh-label b/usr/share/bash-completion/completions/_gh-label new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_gh-label @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_git-bump b/usr/share/bash-completion/completions/_git-bump new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_git-bump @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_go-licenses b/usr/share/bash-completion/completions/_go-licenses new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_go-licenses @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_golangci-lint b/usr/share/bash-completion/completions/_golangci-lint new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_golangci-lint @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gopherjs b/usr/share/bash-completion/completions/_gopherjs new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_gopherjs @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_goreleaser b/usr/share/bash-completion/completions/_goreleaser new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_goreleaser @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gsctl b/usr/share/bash-completion/completions/_gsctl new file mode 100644 index 00000000000..3b1a040051b --- /dev/null +++ b/usr/share/bash-completion/completions/_gsctl @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash --stdout". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash --stdout 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_gup b/usr/share/bash-completion/completions/_gup new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_gup @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_helm b/usr/share/bash-completion/completions/_helm new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_helm @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_hexdump b/usr/share/bash-completion/completions/_hexdump index 785f5976cd4..939cfa6656d 100644 --- a/usr/share/bash-completion/completions/_hexdump +++ b/usr/share/bash-completion/completions/_hexdump @@ -3,29 +3,28 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_hexdump() +_comp_cmd_hexdump() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -V | -e | -n | -s) return ;; -f) - _filedir + _comp_compgen_filedir return ;; esac if [[ $cur == -* ]]; then - local opts="$(_parse_help "$1")" - COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + _comp_compgen_help || _comp_compgen_usage return fi - _filedir + _comp_compgen_filedir } && - complete -F _hexdump hexdump hd + complete -F _comp_cmd_hexdump hexdump hd # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_httpx b/usr/share/bash-completion/completions/_httpx new file mode 100644 index 00000000000..e6d2df6aa52 --- /dev/null +++ b/usr/share/bash-completion/completions/_httpx @@ -0,0 +1,15 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "_${cmdname^^}_COMPLETE=bash_source $cmd". +# This pattern is used by programs built with https://click.palletsprojects.com +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + # shellcheck disable=SC2154 + ucname="${cmdname^^}" + ucname=${ucname//-/_} + export "_${ucname}_COMPLETE=bash_source" + "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_hugo b/usr/share/bash-completion/completions/_hugo new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_hugo @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_hwclock b/usr/share/bash-completion/completions/_hwclock index ef437a26e7a..a0fd8315288 100644 --- a/usr/share/bash-completion/completions/_hwclock +++ b/usr/share/bash-completion/completions/_hwclock @@ -3,24 +3,24 @@ # Use of this file is deprecated. Upstream completion is available in # util-linux >= 2.23, use that instead. -_hwclock() +_comp_cmd_hwclock() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -h | --help | -V | --version | --date | --epoch) return ;; -f | --rtc | --adjfile) - _filedir + _comp_compgen_filedir return ;; esac - COMPREPLY=( - $(PATH="$PATH:/sbin" compgen -W '$(_parse_help "$1")' -- "$cur")) + local PATH=$PATH:/sbin + _comp_compgen_help } && - complete -F _hwclock hwclock + complete -F _comp_cmd_hwclock hwclock # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ignite b/usr/share/bash-completion/completions/_ignite new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_ignite @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_incus b/usr/share/bash-completion/completions/_incus new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_incus @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_infracost b/usr/share/bash-completion/completions/_infracost new file mode 100644 index 00000000000..8a0376dd33f --- /dev/null +++ b/usr/share/bash-completion/completions/_infracost @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion --shell bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion --shell bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ionice b/usr/share/bash-completion/completions/_ionice index b0d96a13a77..42fcd39e03c 100644 --- a/usr/share/bash-completion/completions/_ionice +++ b/usr/share/bash-completion/completions/_ionice @@ -3,10 +3,10 @@ # Use of this file is deprecated. Upstream completion is available in # util-linux >= 2.23, use that instead. -_ionice() +_comp_cmd_ionice() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local offset=0 i for ((i = 1; i <= cword; i++)); do @@ -31,30 +31,30 @@ _ionice() done if ((offset > 0)); then - _command_offset $offset + _comp_command_offset $offset return fi case $prev in -c) - COMPREPLY=($(compgen -W '{0..3}' -- "$cur")) + _comp_compgen -- -W '{0..3}' return ;; -n) - COMPREPLY=($(compgen -W '{0..7}' -- "$cur")) + _comp_compgen -- -W '{0..7}' return ;; -p) - _pids + _comp_compgen_pids return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur")) + _comp_compgen_help -- -h return fi } && - complete -F _ionice ionice + complete -F _comp_cmd_ionice ionice # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_istioctl b/usr/share/bash-completion/completions/_istioctl new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_istioctl @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_jungle b/usr/share/bash-completion/completions/_jungle new file mode 100644 index 00000000000..f08ae9140c5 --- /dev/null +++ b/usr/share/bash-completion/completions/_jungle @@ -0,0 +1,16 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "_${cmdname^^}_COMPLETE=source $cmd". +# This pattern is very similar to `completions/_pipenv`, but the value of the +# environment variable is slightly different. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + # shellcheck disable=SC2154 + ucname="${cmdname^^}" + ucname=${ucname//-/_} + export "_${ucname}_COMPLETE=source" + "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_k3s b/usr/share/bash-completion/completions/_k3s new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_k3s @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_keyring b/usr/share/bash-completion/completions/_keyring new file mode 100644 index 00000000000..4dcc58f33d2 --- /dev/null +++ b/usr/share/bash-completion/completions/_keyring @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd --print-completion bash". +# For example, many Python programs using https://github.com/iterative/shtab do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" --print-completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kn b/usr/share/bash-completion/completions/_kn new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_kn @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kontena b/usr/share/bash-completion/completions/_kontena new file mode 100644 index 00000000000..94918febe9a --- /dev/null +++ b/usr/share/bash-completion/completions/_kontena @@ -0,0 +1,14 @@ +# 3rd party completion loader for kontena -*- shell-script -*- +# +# This serves as a fallback in case the completion is not installed otherwise. + +# To avoid sourcing an empty string with `. "$(...)"` on failing to obtain the +# path, we assign the output to a variable `_comp_cmd_kontena__completion_path` +# and test it before sourcing. The variable is removed on successful loading +# but left on a failure for the debugging purpose. +_comp_cmd_kontena__completion_path=$("$1" whoami --bash-completion-path 2>/dev/null) && + [[ -r $_comp_cmd_kontena__completion_path ]] && + . "$_comp_cmd_kontena__completion_path" && + unset -v _comp_cmd_kontena__completion_path + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kool b/usr/share/bash-completion/completions/_kool new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_kool @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kratos b/usr/share/bash-completion/completions/_kratos new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_kratos @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kubeadm b/usr/share/bash-completion/completions/_kubeadm new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_kubeadm @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kubectl b/usr/share/bash-completion/completions/_kubectl new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_kubectl @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_kubescape b/usr/share/bash-completion/completions/_kubescape new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_kubescape @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_lefthook b/usr/share/bash-completion/completions/_lefthook new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_lefthook @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_linkerd b/usr/share/bash-completion/completions/_linkerd new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_linkerd @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_look b/usr/share/bash-completion/completions/_look index 9788dec5a06..20613ff6d6d 100644 --- a/usr/share/bash-completion/completions/_look +++ b/usr/share/bash-completion/completions/_look @@ -3,15 +3,15 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_look() +_comp_cmd_look() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return if ((cword == 1)); then - COMPREPLY=($(compgen -W '$(look "$cur" 2>/dev/null)' -- "$cur")) + _comp_compgen_split -- "$(look "$cur" 2>/dev/null)" fi } && - complete -F _look -o default look + complete -F _comp_cmd_look -o default look # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mattermost b/usr/share/bash-completion/completions/_mattermost new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_mattermost @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mdbook b/usr/share/bash-completion/completions/_mdbook new file mode 100644 index 00000000000..fe326883e3d --- /dev/null +++ b/usr/share/bash-completion/completions/_mdbook @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_metalctl b/usr/share/bash-completion/completions/_metalctl new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_metalctl @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_minikube b/usr/share/bash-completion/completions/_minikube new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_minikube @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mise b/usr/share/bash-completion/completions/_mise new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_mise @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mmctl b/usr/share/bash-completion/completions/_mmctl new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_mmctl @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mock b/usr/share/bash-completion/completions/_mock index b468148d16b..df778a890c9 100644 --- a/usr/share/bash-completion/completions/_mock +++ b/usr/share/bash-completion/completions/_mock @@ -3,10 +3,10 @@ # Use of this file is deprecated. Upstream completion is available in # mock > 1.1.0, use that instead. -_mock() +_comp_cmd_mock() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return local plugins='tmpfs root_cache yum_cache bind_mount ccache' local cfgdir=/etc/mock count=0 i @@ -27,43 +27,45 @@ _mock() return ;; -r | --root) - COMPREPLY=($(compgen -W "$(command ls $cfgdir)" -- "$cur")) - COMPREPLY=(${COMPREPLY[@]/%.cfg/}) + _comp_compgen_split -- "$(command ls "$cfgdir")" && + COMPREPLY=("${COMPREPLY[@]/%.cfg/}") return ;; --configdir | --resultdir) - _filedir -d + _comp_compgen_filedir -d return ;; --spec) - _filedir spec + _comp_compgen_filedir spec return ;; --target) + # Case-insensitive BRE to match "compatible archs" + local regex_header='[cC][oO][mM][pP][aA][tT][iI][bB][lL][eE][[:space:]]\{1,\}[aA][rR][cC][hH][sS]' + # Yep, compatible archs, not compatible build archs # (e.g. ix86 chroot builds in x86_64 mock host) # This would actually depend on what the target root # can be used to build for... - COMPREPLY=($(compgen -W "$(command rpm --showrc | - command sed -ne 's/^\s*compatible\s\s*archs\s*:\s*\(.*\)/\1/i p')" \ - -- "$cur")) + _comp_compgen_split -- "$(command rpm --showrc | command sed -ne \ + "s/^[[:space:]]*${regex_header}[[:space:]]*:[[:space:]]*\(.*\)/\1/p")" return ;; --enable-plugin | --disable-plugin) - COMPREPLY=($(compgen -W "$plugins" -- "$cur")) + _comp_compgen -- -W "$plugins" return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace else - _filedir '@(?(no)src.r|s)pm' + _comp_compgen_filedir '@(?(no)src.r|s)pm' fi } && - complete -F _mock mock + complete -F _comp_cmd_mock mock # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_modules b/usr/share/bash-completion/completions/_modules index 4f7c4d481cf..830ddfedca6 100644 --- a/usr/share/bash-completion/completions/_modules +++ b/usr/share/bash-completion/completions/_modules @@ -19,67 +19,66 @@ # Test for existence of /etc/profile.d/modules.sh too because we may end up # being sourced before it and thus before the `module' alias has been defined. -[ -f /etc/profile.d/modules.sh ] || return 1 +[[ -f /etc/profile.d/modules.sh ]] || return 1 -_module_list() +_comp_cmd_module__compgen_list() { - local modules="$(command sed 's/:/ /g' <<<$LOADEDMODULES | sort)" - compgen -W "$modules" -- $1 + local modules="$(command sed 's/:/ /g' <<<"$LOADEDMODULES" | sort)" + _comp_compgen -- -W "$modules" } -_module_path() +_comp_cmd_module__compgen_path() { - local modules="$(command sed 's/:/ /g' <<<$MODULEPATH | sort)" - compgen -W "$modules" -- $1 + local modules="$(command sed 's/:/ /g' <<<"$MODULEPATH" | sort)" + _comp_compgen -- -W "$modules" } -_module_avail() +_comp_cmd_module__compgen_avail() { local modules="$( module avail 2>&1 | command grep -E -v '^(-|$)' | xargs printf '%s\n' | command sed -e 's/(default)//g' | sort )" - - compgen -W "$modules" -- $1 + _comp_compgen -- -W "$modules" } # A completion function for the module alias -_module() +_comp_cmd_module() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return if ((cword == 1)); then # First parameter on line -- we expect it to be a mode selection local options options="$(module help 2>&1 | command grep -E '^[[:space:]]*\+' | - awk '{print $2}' | command sed -e 's/|/ /g' | sort)" + _comp_awk '{print $2}' | command sed -e 's/|/ /g' | sort)" - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" elif ((cword == 2)); then case $prev in add | display | help | load | show | whatis) - COMPREPLY=($(_module_avail "$cur")) + _comp_cmd_module__compgen_avail ;; rm | switch | swap | unload | update) - COMPREPLY=($(_module_list "$cur")) + _comp_cmd_module__compgen_list ;; unuse) - COMPREPLY=($(_module_path "$cur")) + _comp_cmd_module__compgen_path ;; esac elif ((cword == 3)); then case ${words[1]} in swap | switch) - COMPREPLY=($(_module_avail "$cur")) + _comp_cmd_module__compgen_avail ;; esac fi } && - complete -F _module -o default module + complete -F _comp_cmd_module -o default module # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_moldy b/usr/share/bash-completion/completions/_moldy new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_moldy @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mount b/usr/share/bash-completion/completions/_mount index 85f5490771a..ab385f11288 100644 --- a/usr/share/bash-completion/completions/_mount +++ b/usr/share/bash-completion/completions/_mount @@ -14,16 +14,16 @@ fi # query the server for a list of all available exports and complete on # that instead. # -_mount() +_comp_cmd_mount() { - local cur prev words cword - _init_completion -n : || return + local cur prev words cword comp_args + _comp_initialize -n : -- "$@" || return local sm host case $prev in -t | --types) - _fstypes + _comp_compgen_fstypes return ;; esac @@ -33,8 +33,9 @@ _mount() if [[ $cur == *:* ]]; then for sm in "$(type -P showmount)" {,/usr}/{,s}bin/showmount; do [[ -x $sm ]] || continue - COMPREPLY=($(compgen -W "$("$sm" -e ${cur%%:*} | - awk 'NR>1 {print $1}')" -- "${cur#*:}")) + _comp_compgen -c "${cur#*:}" split -- "$( + "$sm" -e ${cur%%:*} | _comp_awk 'NR>1 {print $1}' + )" return done fi @@ -42,24 +43,30 @@ _mount() if [[ $cur == //* ]]; then host=${cur#//} host=${host%%/*} - if [[ -n $host ]]; then - COMPREPLY=($(compgen -P "//$host" -W \ - "$(smbclient -d 0 -NL $host 2>/dev/null | + if [[ $host ]]; then + _comp_compgen -c "${cur#//"$host"}" split -P "//$host" -- "$( + smbclient -d 0 -NL "$host" 2>/dev/null | command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' | - command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p')" \ - -- "${cur#//$host}")) + command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' + )" fi elif [[ -r /etc/vfstab ]]; then # Solaris - COMPREPLY=($(compgen -W "$(awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' /etc/vfstab)" -- "$cur")) + _comp_compgen_split -- "$( + _comp_awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' /etc/vfstab + )" elif [[ ! -e /etc/fstab ]]; then # probably Cygwin - COMPREPLY=($(compgen -W "$($1 | awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}')" -- "$cur")) + _comp_compgen_split -- "$( + "$1" | _comp_awk '! /^[ \t]*#/ {if ($3 ~ /\//) print $3}' + )" else # probably BSD - COMPREPLY=($(compgen -W "$(awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab)" -- "$cur")) + _comp_compgen_split -- "$( + _comp_awk '! /^[ \t]*#/ {if ($2 ~ /\//) print $2}' /etc/fstab + )" fi } && - complete -F _mount -o default -o dirnames mount + complete -F _comp_cmd_mount -o default -o dirnames mount # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_mount.linux b/usr/share/bash-completion/completions/_mount.linux index f40865ea770..3d4c30794b4 100644 --- a/usr/share/bash-completion/completions/_mount.linux +++ b/usr/share/bash-completion/completions/_mount.linux @@ -3,12 +3,12 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.28, use that instead. -_mount() +_comp_cmd_mount() { - local cur prev words cword - _init_completion -n =: || return + local cur prev words cword comp_args + _comp_initialize -n =: -- "$@" || return - local split=false + local split="" case "$prev" in -t | --types) # find /lib/modules/$(uname -r)/ -type f -path '*/fs/*.ko' -printf '%f\n' | cut -d. -f1 @@ -16,38 +16,33 @@ _mount() if [[ $cur == ?*,* ]]; then prev="${cur%,*}" cur="${cur##*,}" - split=true + split=set fi - COMPREPLY=($(compgen -W 'auto adfs affs autofs btrfs cifs coda - cramfs davfs debugfs devpts efs ext2 ext3 ext4 fuse hfs hfsplus - hpfs iso9660 jffs2 jfs minix msdos ncpfs nfs nfs4 ntfs ntfs-3g - proc qnx4 ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs - udf ufs umsdos usbfs vfat xfs' -- "$cur")) - _fstypes - $split && COMPREPLY=(${COMPREPLY[@]/#/$prev,}) + _comp_compgen -- -W 'auto adfs affs autofs btrfs cifs coda cramfs + davfs debugfs devpts efs ext2 ext3 ext4 fuse hfs hfsplus hpfs + iso9660 jffs2 jfs minix msdos ncpfs nfs nfs4 ntfs ntfs-3g proc + qnx4 ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf + ufs umsdos usbfs vfat xfs' + _comp_compgen -a fstypes + [[ $split ]] && ((${#COMPREPLY[@]})) && + _comp_compgen -Rv COMPREPLY -- -P "$prev," -W '"${COMPREPLY[@]}"' return ;; --bind | -B | --rbind | -R) - _filedir -d + _comp_compgen_filedir -d return ;; -p | --pass-fd) - COMPREPLY=($(compgen -W '{0..9}')) + _comp_compgen -R -- -W '{0..9}' compopt -o nospace return ;; -L) - COMPREPLY=($( - cd "/dev/disk/by-label/" 2>/dev/null || return - compgen -f -- "$cur" - )) + _comp_compgen -C "/dev/disk/by-label/" -- -f return ;; -U) - COMPREPLY=($( - cd "/dev/disk/by-uuid/" 2>/dev/null || return - compgen -f -- "$cur" - )) + _comp_compgen -C "/dev/disk/by-uuid/" -- -f return ;; -O | --test-opts) @@ -74,149 +69,152 @@ _mount() if [[ $cur == ?*,* ]]; then prev="${cur%,*}" cur="${cur##*,}" - split=true + split=set fi # no completion if $cur is opt=smth [[ $cur == *=* ]] && return # mount options - COMPREPLY=($(compgen -W 'loop {,a}sync {,no}atime {,no}auto + _comp_compgen -- -W 'loop {,a}sync {,no}atime {,no}auto {,fs,def,root}context= defaults {,no}dev {,no}diratime dirsync {,no}exec group {,no}iversion {,no}mand _netdev nofail {,no}relatime {,no}strictatime {,no}suid owner remount ro rw - {,no}user users' -- "$cur")) + {,no}user users' case "$fstype" in adfs | auto) - COMPREPLY+=($(compgen -W '{u,g}id= {own,oth}mask=' -- "$cur")) + _comp_compgen -a -- -W '{u,g}id= {own,oth}mask=' ;;& affs | auto) - COMPREPLY+=($(compgen -W '{u,g}id= set{u,g}id= mode= protect - usemp verbose prefix= volume= reserved= root= bs= - {,no,usr,grp}quota' -- "$cur")) + _comp_compgen -a -- -W '{u,g}id= set{u,g}id= mode= protect + usemp verbose prefix= volume= reserved= root= bs= + {,no,usr,grp}quota' ;;& btrfs | auto) - COMPREPLY+=($(compgen -W 'degraded subvol= subvolid= device= - nodatasum nodatacow nobarrier max_inline= alloc_start= - thread_pool= compress= compress-force= ssd noacl notreelog - flushoncommit metadata_ratio= {,no}space_cache clear_cache - user_subvol_rm_allowed autodefrag inode_cache' -- "$cur")) + _comp_compgen -a -- -W 'degraded subvol= subvolid= device= + nodatasum nodatacow nobarrier max_inline= alloc_start= + thread_pool= compress= compress-force= ssd noacl + notreelog flushoncommit metadata_ratio= + {,no}space_cache clear_cache user_subvol_rm_allowed + autodefrag inode_cache' ;;& cifs | auto) - COMPREPLY+=($(compgen -W 'user= password= credentials= {u,g}id= - force{u,g}id port= servern= netbiosname= {file,dir}_mode= - ip= domain= guest iocharset {,no}setuids {,no,dyn}perm - directio {,no}mapchars {,no}intr hard soft noacl nocase sec= - nobrl sfu {,no}serverino nounix nouser_xattr {r,w}size= - rwpidforward backup{u,g}id cache=' -- "$cur")) + _comp_compgen -a -- -W 'user= password= credentials= + {u,g}id= force{u,g}id port= servern= netbiosname= + {file,dir}_mode= ip= domain= guest iocharset + {,no}setuids {,no,dyn}perm directio {,no}mapchars + {,no}intr hard soft noacl nocase sec= nobrl sfu + {,no}serverino nounix nouser_xattr {r,w}size= + rwpidforward backup{u,g}id cache=' ;;& davfs | auto) - COMPREPLY+=($(compgen -W 'conf= {file,dir}_mode= {u,g}id= - username=' -- "$cur")) + _comp_compgen -a -- -W 'conf= {file,dir}_mode= {u,g}id= + username=' ;;& ext[2-4] | auto) - COMPREPLY+=($(compgen -W '{,no}acl bsddf minixdf check= debug - errors= {,no}grpid {bsd,sysv}groups {,no,usr,grp}quota - nobh nouid32 oldalloc orlov res{u,g}id= sb= - {,no}user_xattr' -- "$cur")) + _comp_compgen -a -- -W '{,no}acl bsddf minixdf check= debug + errors= {,no}grpid {bsd,sysv}groups {,no,usr,grp}quota + nobh nouid32 oldalloc orlov res{u,g}id= sb= + {,no}user_xattr' ;;& ext[34] | auto) - COMPREPLY+=($(compgen -W 'journal= journal_dev= norecovery - noload data= barrier= commit=' -- "$cur")) + _comp_compgen -a -- -W 'journal= journal_dev= norecovery + noload data= barrier= commit=' ;;& ext4 | auto) - COMPREPLY+=($(compgen -W 'journal_checksum journal_async_commit - nobarrier inode_readahead= stripe= {,no}delalloc abort - {max,min}_batch_time= journal_ioprio= {,no}auto_da_alloc - {,no}discard nouid32 resize {,no}block_validity - dioread_{,no}lock max_dir_size_kb= i_version' -- "$cur")) + _comp_compgen -a -- -W 'journal_checksum + journal_async_commit nobarrier inode_readahead= stripe= + {,no}delalloc abort {max,min}_batch_time= + journal_ioprio= {,no}auto_da_alloc {,no}discard nouid32 + resize {,no}block_validity dioread_{,no}lock + max_dir_size_kb= i_version' ;;& msdos | umsdos | vfat | auto) - COMPREPLY+=($(compgen -W 'blocksize= {u,g}id= {u,d,f}mask= - allow_utime= check= codepage= conv= cvf_format= cvf_option= - debug fat= iocharset= tz= quiet showexec sys_immutable flush - usefree {,no}dots dotsOK=' -- "$cur")) + _comp_compgen -a -- -W 'blocksize= {u,g}id= {u,d,f}mask= + allow_utime= check= codepage= conv= cvf_format= + cvf_option= debug fat= iocharset= tz= quiet showexec + sys_immutable flush usefree {,no}dots dotsOK=' ;;& vfat | auto) - COMPREPLY+=($(compgen -W 'uni_xlate posix nonumtail utf8 - shortname=' -- "$cur")) + _comp_compgen -a -- -W 'uni_xlate posix nonumtail utf8 + shortname=' ;;& iso9660 | auto) - COMPREPLY+=($(compgen -W 'norock nojoliet check= {u,g}id= map= - mode= unhide block= conv= cruft session= sbsector= - iocharset= utf8' -- "$cur")) + _comp_compgen -a -- -W 'norock nojoliet check= {u,g}id= + map= mode= unhide block= conv= cruft session= sbsector= + iocharset= utf8' ;;& jffs2 | auto) - COMPREPLY+=($(compgen -W 'compr= rp_size=' -- "$cur")) + _comp_compgen -a -- -W 'compr= rp_size=' ;;& jfs | auto) - COMPREPLY+=($(compgen -W 'iocharset= resize= {,no}integrity - errors= {,no,usr,grp}quota' -- "$cur")) + _comp_compgen -a -- -W 'iocharset= resize= {,no}integrity + errors= {,no,usr,grp}quota' ;;& nfs | nfs4 | auto) - COMPREPLY+=($(compgen -W 'soft hard timeo= retrans= {r,w}size= - {,no}ac acreg{min,max}= acdir{min,max}= actimeo= bg fg - retry= sec= {,no}sharecache {,no}resvport lookupcache= - proto= port= {,no}intr {,no}cto {,nfs}vers= ' -- "$cur")) + _comp_compgen -a -- -W 'soft hard timeo= retrans= {r,w}size= + {,no}ac acreg{min,max}= acdir{min,max}= actimeo= bg fg + retry= sec= {,no}sharecache {,no}resvport lookupcache= + proto= port= {,no}intr {,no}cto {,nfs}vers=' ;;& nfs | auto) - COMPREPLY+=($(compgen -W 'udp tcp rdma mount{port,proto,host}= - mountvers= namlen={,no}lock {,no}acl {,no}rdirplus - {,no}fsc' -- "$cur")) + _comp_compgen -a -- -W 'udp tcp rdma mount{port,proto,host}= + mountvers= namlen={,no}lock {,no}acl {,no}rdirplus + {,no}fsc' ;;& nfs4 | auto) - COMPREPLY+=($(compgen -W 'clientaddr= {,no}migration' \ - -- "$cur")) + _comp_compgen -a -- -W 'clientaddr= {,no}migration' ;;& ntfs-3g) - COMPREPLY+=($(compgen -W '{u,g}id= {u,f,d}mask= usermapping= - permissions inherit locale= force {,no}recover - ignore_case remove_hiberfile show_sys_files - hide_{hid,dot}_files windows_names allow_other max_read= - silent no_def_opts streams_interface= user_xattr efs_raw - {,no}compression debug no_detach' -- "$cur")) + _comp_compgen -a -- -W '{u,g}id= {u,f,d}mask= usermapping= + permissions inherit locale= force {,no}recover + ignore_case remove_hiberfile show_sys_files + hide_{hid,dot}_files windows_names allow_other + max_read= silent no_def_opts streams_interface= + user_xattr efs_raw {,no}compression debug no_detach' ;;& proc | auto) - COMPREPLY+=($(compgen -W '{u,g}id=' -- "$cur")) + _comp_compgen -a -- -W '{u,g}id=' ;;& reiserfs | auto) - COMPREPLY+=($(compgen -W 'conv hash= {,no_un}hashed_relocation - noborder nolog notail replayonly resize= user_xattr acl - barrier=' -- "$cur")) + _comp_compgen -a -- -W 'conv hash= + {,no_un}hashed_relocation noborder nolog notail + replayonly resize= user_xattr acl barrier=' ;;& tmpfs | auto) - COMPREPLY+=($(compgen -W 'size= nr_blocks= nr_inodes= mode= - {u,g}id= mpol=' -- "$cur")) + _comp_compgen -a -- -W 'size= nr_blocks= nr_inodes= mode= + {u,g}id= mpol=' ;;& udf | auto) - COMPREPLY+=($(compgen -W '{u,g}id= umask= unhide undelete - nostrict iocharset bs= novrs session= anchor= volume= - partition= lastblock= fileset= rootdir=' -- "$cur")) + _comp_compgen -a -- -W '{u,g}id= umask= unhide undelete + nostrict iocharset bs= novrs session= anchor= volume= + partition= lastblock= fileset= rootdir=' ;;& usbfs | auto) - COMPREPLY+=($(compgen -W 'dev{u,g}id= devmode= bus{u,g}id= - busmode= list{u,g}id= listmode=' -- "$cur")) + _comp_compgen -a -- -W 'dev{u,g}id= devmode= bus{u,g}id= + busmode= list{u,g}id= listmode=' ;;& xfs | auto) - COMPREPLY+=($(compgen -W 'allocsize= {,no}attr2 barrier dmapi - {,no}grpid {bsd,sysv}groups ihashsize= {,no}ikeep - inode{32,64} {,no}largeio logbufs= logbsize= logdev= - rtdev= mtpt= noalign norecovery nouuid osyncisosync - {u,g,p}qnoenforce {,u,usr,g,grp,p,prj}quota sunit= swidth= - swalloc' -- "$cur")) + _comp_compgen -a -- -W 'allocsize= {,no}attr2 barrier dmapi + {,no}grpid {bsd,sysv}groups ihashsize= {,no}ikeep + inode{32,64} {,no}largeio logbufs= logbsize= logdev= + rtdev= mtpt= noalign norecovery nouuid osyncisosync + {u,g,p}qnoenforce {,u,usr,g,grp,p,prj}quota sunit= + swidth= swalloc' ;;& esac # COMP_WORDBREAKS is a real pain in the ass - prev="${prev##*[$COMP_WORDBREAKS]}" - $split && COMPREPLY=(${COMPREPLY[@]/#/"$prev,"}) + prev="${prev##*["$COMP_WORDBREAKS"]}" + [[ $split ]] && ((${COMPREPLY[@]})) && + _comp_compgen -Rv COMPREPLY -- -P "$prev," -W '"${COMPREPLY[@]}"' [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--version --help --verbose --all --fork - --fake --internal-only -l --no-mtab --no-canonicalize --pass-fd -s + _comp_compgen -- -W '--version --help --verbose --all --fork --fake + --internal-only -l --no-mtab --no-canonicalize --pass-fd -s --read-only --rw -L -U --types --test-opts --options --bind --rbind - --move' -- "$cur")) + --move' [[ ${COMPREPLY-} ]] && return fi @@ -227,8 +225,9 @@ _mount() if [[ $cur == *:* ]]; then for sm in "$(type -P showmount)" {,/usr}/{,s}bin/showmount; do [[ -x $sm ]] || continue - COMPREPLY=($(compgen -W "$("$sm" -e ${cur%%:*} | - awk 'NR>1 {print $1}')" -- "${cur#*:}")) + _comp_compgen -c "${cur#*:}" split -- "$( + "$sm" -e ${cur%%:*} | _comp_awk 'NR>1 {print $1}' + )" return done fi @@ -236,17 +235,17 @@ _mount() if [[ $cur == //* ]]; then host=${cur#//} host=${host%%/*} - if [[ -n $host ]]; then - COMPREPLY=($(compgen -P "//$host" -W \ - "$(smbclient -d 0 -NL $host 2>/dev/null | + if [[ $host ]]; then + _comp_compgen -c "${cur#//"$host"}" split -P "//$host" -- "$( + smbclient -d 0 -NL "$host" 2>/dev/null | command sed -ne '/^[[:blank:]]*Sharename/,/^$/p' | - command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p')" \ - -- "${cur#//$host}")) + command sed -ne '3,$s|^[^A-Za-z]*\([^[:blank:]]*\).*$|/\1|p' + )" fi fi - _filedir + _comp_compgen -a filedir } && - complete -F _mount mount + complete -F _comp_cmd_mount mount # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_multi-gitter b/usr/share/bash-completion/completions/_multi-gitter new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_multi-gitter @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_newgrp b/usr/share/bash-completion/completions/_newgrp index a2dc3edaed6..7e866720df0 100644 --- a/usr/share/bash-completion/completions/_newgrp +++ b/usr/share/bash-completion/completions/_newgrp @@ -3,17 +3,17 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_newgrp() +_comp_cmd_newgrp() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return if [[ $cur == "-" ]]; then COMPREPLY=(-) else - _allowed_groups "$cur" + _comp_compgen_allowed_groups fi } && - complete -F _newgrp newgrp + complete -F _comp_cmd_newgrp newgrp # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_nfpm b/usr/share/bash-completion/completions/_nfpm new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_nfpm @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_nmcli b/usr/share/bash-completion/completions/_nmcli index eac285b08b2..835db9924f3 100644 --- a/usr/share/bash-completion/completions/_nmcli +++ b/usr/share/bash-completion/completions/_nmcli @@ -3,83 +3,76 @@ # Use of this file is deprecated. Upstream completion is available in # NetworkManager >= 0.9.8.0, use that instead. -_nmcli_list() +_comp_cmd_nmcli__con_id() { - COMPREPLY=($(compgen -W '$1' -- "$cur")) + _comp_compgen_split -l -- "$(nmcli con list 2>/dev/null | + tail -n +2 | _comp_awk -F ' {2,}' '{print $1}')" } -_nmcli_con_id() +_comp_cmd_nmcli__con_uuid() { - local IFS=$'\n' - COMPREPLY=($(compgen -W "$(nmcli con list 2>/dev/null | - tail -n +2 | awk -F ' {2,}' '{print $1 }')" -- "$cur")) + _comp_compgen_split -- "$(nmcli con list 2>/dev/null | + tail -n +2 | _comp_awk -F ' {2,}' '{print $2}')" } -_nmcli_con_uuid() +_comp_cmd_nmcli__ap_ssid() { - COMPREPLY=($(compgen -W "$(nmcli con list 2>/dev/null | - tail -n +2 | awk -F ' {2,}' '{print $2}')" -- "$cur")) + _comp_compgen_split -l -- "$(nmcli dev wifi list 2>/dev/null | + tail -n +2 | _comp_awk -F ' {2,}' '{print $1}')" } -_nmcli_ap_ssid() +_comp_cmd_nmcli__ap_bssid() { - local IFS=$'\n' - COMPREPLY=($(compgen -W "$(nmcli dev wifi list 2>/dev/null | - tail -n +2 | awk -F ' {2,}' '{print $1}')" -- "$cur")) + _comp_compgen_split -- "$(nmcli dev wifi list 2>/dev/null | + tail -n +2 | _comp_awk -F ' {2,}' '{print $2}')" } -_nmcli_ab_bssid() +_comp_cmd_nmcli() { - COMPREPLY=($(compgen -W "$(nmcli dev wifi list 2>/dev/null | - tail -n +2 | awk -F ' {2,}' '{print $2}')" -- "$cur")) -} - -_nmcli() -{ - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -m | --mode) - COMPREPLY=($(compgen -W 'tabular multiline' -- "$cur")) + _comp_compgen -- -W 'tabular multiline' return ;; -f | --fields) - COMPREPLY=($(compgen -W 'all common' -- "$cur")) + _comp_compgen -- -W 'all common' return ;; -e | --escape) - _nmcli_list "yes no" + _comp_compgen -- -W "yes no" return ;; id) - _nmcli_con_id + _comp_cmd_nmcli__con_id return ;; uuid) - _nmcli_con_uuid + _comp_cmd_nmcli__con_uuid return ;; iface) - _available_interfaces + _comp_compgen_available_interfaces return ;; bssid) - _nmcli_ab_bssid + _comp_cmd_nmcli__ap_bssid return ;; wep-key-type) - _nmcli_list "key phrase" + _comp_compgen -- -W "key phrase" return ;; esac if ((cword == 1)); then if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--terse --pretty --mode --fields - --escape --version --help' -- "$cur")) + _comp_compgen -- -W '--terse --pretty --mode --fields --escape + --version --help' else - COMPREPLY=($(compgen -W "nm con dev" -- "$cur")) + _comp_compgen -- -W "nm con dev" fi else local object=${words[1]} @@ -89,71 +82,67 @@ _nmcli() nm) case $command in enable) - _nmcli_list "true false" + _comp_compgen -- -W "true false" return ;; sleep) - _nmcli_list "true false" + _comp_compgen -- -W "true false" return ;; wifi) - _nmcli_list "on off" + _comp_compgen -- -W "on off" return ;; wwan) - _nmcli_list "on off" + _comp_compgen -- -W "on off" return ;; wimax) - _nmcli_list "on off" + _comp_compgen -- -W "on off" return ;; esac - COMPREPLY=($(compgen -W 'status permissions enable sleep - wifi wwan wimax' -- "$cur")) + _comp_compgen -- -W 'status permissions enable sleep wifi wwan + wimax' ;; con) case $command in list) - COMPREPLY=($(compgen -W 'id uuid' -- "$cur")) + _comp_compgen -- -W 'id uuid' return ;; up) if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--nowait --timeout' \ - -- "$cur")) + _comp_compgen -- -W '--nowait --timeout' else - COMPREPLY=($(compgen -W 'id uuid iface ap nsp' \ - -- "$cur")) + _comp_compgen -- -W 'id uuid iface ap nsp' fi return ;; down) - COMPREPLY=($(compgen -W 'id uuid' -- "$cur")) + _comp_compgen -- -W 'id uuid' return ;; delete) - COMPREPLY=($(compgen -W 'id uuid' -- "$cur")) + _comp_compgen -- -W 'id uuid' return ;; esac - COMPREPLY=($(compgen -W 'list status up down delete' \ - -- "$cur")) + _comp_compgen -- -W 'list status up down delete' ;; dev) case $command in list) - COMPREPLY=($(compgen -W 'iface' -- "$cur")) + _comp_compgen -- -W 'iface' return ;; disconnect) if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--nowait --timeout' \ - -- "$cur")) + _comp_compgen -- -W '--nowait --timeout' else - COMPREPLY=($(compgen -W 'iface' -- "$cur")) + _comp_compgen -- -W 'iface' fi return ;; @@ -162,40 +151,37 @@ _nmcli() case $subcommand in list) - COMPREPLY=($(compgen -W 'iface bssid' \ - -- "$cur")) + _comp_compgen -- -W 'iface bssid' return ;; connect) if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--private - --nowait --timeout' -- "$cur")) + _comp_compgen -- -W '--private --nowait + --timeout' else if [[ $prev == "connect" ]]; then - _nmcli_ap_ssid + _comp_cmd_nmcli__ap_ssid else - COMPREPLY=($(compgen -W 'password - wep-key-type iface bssid name' \ - -- "$cur")) + _comp_compgen -- -W 'password + wep-key-type iface bssid name' fi fi return ;; esac - COMPREPLY=($(compgen -W 'list connect' -- "$cur")) + _comp_compgen -- -W 'list connect' return ;; esac - COMPREPLY=($(compgen -W 'status list disconnect wifi' \ - -- "$cur")) + _comp_compgen -- -W 'status list disconnect wifi' ;; esac fi } && - complete -F _nmcli nmcli + complete -F _comp_cmd_nmcli nmcli # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_nomad b/usr/share/bash-completion/completions/_nomad new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_nomad @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_nox b/usr/share/bash-completion/completions/_nox new file mode 100644 index 00000000000..62931090077 --- /dev/null +++ b/usr/share/bash-completion/completions/_nox @@ -0,0 +1,13 @@ +# 3rd party completion loader for argcomplete commands -*- shell-script -*- +# sourced using no args to `register-python-argcomplete`. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + pathcmd=$(type -P -- "$1" 2>/dev/null | command sed 's,/[^/]*$,,') + [[ $pathcmd ]] && PATH=$pathcmd${PATH:+:$PATH} + register-python-argcomplete --shell bash "$1" 2>/dev/null || + register-python-argcomplete3 --shell bash "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_npm b/usr/share/bash-completion/completions/_npm new file mode 100644 index 00000000000..2f485980a1d --- /dev/null +++ b/usr/share/bash-completion/completions/_npm @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_nvm b/usr/share/bash-completion/completions/_nvm new file mode 100644 index 00000000000..e5c2a4649c0 --- /dev/null +++ b/usr/share/bash-completion/completions/_nvm @@ -0,0 +1,8 @@ +# 3rd party completion loader for nvm -*- shell-script -*- +# +# This serves as a fallback in case the completion is not installed otherwise. + +# shellcheck disable=SC1091 +[[ ${NVM_DIR-} && -r $NVM_DIR/bash_completion ]] && . "$NVM_DIR"/bash_completion + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_oc b/usr/share/bash-completion/completions/_oc new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_oc @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_okteto b/usr/share/bash-completion/completions/_okteto new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_okteto @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_op b/usr/share/bash-completion/completions/_op new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_op @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ory b/usr/share/bash-completion/completions/_ory new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_ory @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_packer b/usr/share/bash-completion/completions/_packer new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_packer @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_pip b/usr/share/bash-completion/completions/_pip new file mode 100644 index 00000000000..4439aa7b95f --- /dev/null +++ b/usr/share/bash-completion/completions/_pip @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion --bash". For example, pip uses this +# form of dynamic completions. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion --bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_pip3 b/usr/share/bash-completion/completions/_pip3 new file mode 100644 index 00000000000..4439aa7b95f --- /dev/null +++ b/usr/share/bash-completion/completions/_pip3 @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion --bash". For example, pip uses this +# form of dynamic completions. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion --bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_pipenv b/usr/share/bash-completion/completions/_pipenv new file mode 100644 index 00000000000..e6d2df6aa52 --- /dev/null +++ b/usr/share/bash-completion/completions/_pipenv @@ -0,0 +1,15 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "_${cmdname^^}_COMPLETE=bash_source $cmd". +# This pattern is used by programs built with https://click.palletsprojects.com +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$( + # shellcheck disable=SC2154 + ucname="${cmdname^^}" + ucname=${ucname//-/_} + export "_${ucname}_COMPLETE=bash_source" + "$1" 2>/dev/null +)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_polygon-edge b/usr/share/bash-completion/completions/_polygon-edge new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_polygon-edge @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_pulumi b/usr/share/bash-completion/completions/_pulumi new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_pulumi @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_px b/usr/share/bash-completion/completions/_px new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_px @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_qrpc b/usr/share/bash-completion/completions/_qrpc new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_qrpc @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_random b/usr/share/bash-completion/completions/_random new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_random @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_rclone b/usr/share/bash-completion/completions/_rclone new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_rclone @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_renice b/usr/share/bash-completion/completions/_renice index a4167440e12..06811edc1d9 100644 --- a/usr/share/bash-completion/completions/_renice +++ b/usr/share/bash-completion/completions/_renice @@ -3,10 +3,10 @@ # Use of this file is deprecated on Linux. Upstream completion is # available in util-linux >= 2.23, use that instead. -_renice() +_comp_cmd_renice() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local command=$1 curopt i=0 @@ -15,18 +15,18 @@ _renice() curopt=${words[cword - i]} case "$curopt" in -u) - _allowed_users + _comp_compgen_allowed_users ;; -g) - _pgids + _comp_compgen_pgids ;; -p | "$command") - _pids + _comp_compgen_pids ;; esac ((i++)) done } && - complete -F _renice renice + complete -F _comp_cmd_renice renice # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_repomanage b/usr/share/bash-completion/completions/_repomanage index ba0787e7006..3a7c5ad15f1 100644 --- a/usr/share/bash-completion/completions/_repomanage +++ b/usr/share/bash-completion/completions/_repomanage @@ -3,22 +3,22 @@ # Use of this file is deprecated. Upstream completion is available in # yum-utils >= 1.1.24, use that instead. -_repomanage() +_comp_cmd_repomanage() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return [[ $prev == -@([hk]|-help|-keep) ]] && return - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace else - _filedir -d + _comp_compgen_filedir -d fi } && - complete -F _repomanage repomanage + complete -F _comp_cmd_repomanage repomanage # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_reptyr b/usr/share/bash-completion/completions/_reptyr index 01d61b2ae72..266a5456b66 100644 --- a/usr/share/bash-completion/completions/_reptyr +++ b/usr/share/bash-completion/completions/_reptyr @@ -3,10 +3,10 @@ # Use of this file is deprecated. Upstream completion is available in # reptyr > 0.6.2, use that instead. -_reptyr() +_comp_cmd_reptyr() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -l) @@ -15,12 +15,12 @@ _reptyr() esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help return fi - [[ $prev != +([0-9]) ]] && _pids + [[ $prev != +([0-9]) ]] && _comp_compgen_pids } && - complete -F _reptyr reptyr + complete -F _comp_cmd_reptyr reptyr # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_rfkill b/usr/share/bash-completion/completions/_rfkill index 96a6c09838f..c4733e77de2 100644 --- a/usr/share/bash-completion/completions/_rfkill +++ b/usr/share/bash-completion/completions/_rfkill @@ -3,29 +3,28 @@ # Use of this file is deprecated on systems with util-linux >= 2.31, which # ships completion for the rfkill included with it. -_rfkill() +_comp_cmd_rfkill() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--version' -- "$cur")) + _comp_compgen -- -W '--version' else case $cword in 1) - COMPREPLY=($(compgen -W "help event list block unblock" \ - -- "$cur")) + _comp_compgen -- -W "help event list block unblock" ;; 2) if [[ $prev == block || $prev == unblock ]]; then - COMPREPLY=($(compgen -W "$($1 list | awk -F: \ - '/^[0-9]/ {print $1}') all wifi bluetooth uwb wimax \ - wwan gps" -- "$cur")) + _comp_compgen_split -- " + $("$1" list | _comp_awk -F : '/^[0-9]/ {print $1}') + all wifi bluetooth uwb wimax wwan gps" fi ;; esac fi } && - complete -F _rfkill rfkill + complete -F _comp_cmd_rfkill rfkill # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_rg b/usr/share/bash-completion/completions/_rg new file mode 100644 index 00000000000..41293712bed --- /dev/null +++ b/usr/share/bash-completion/completions/_rg @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd --generate complete-bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" --generate complete-bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_rtcwake b/usr/share/bash-completion/completions/_rtcwake index 4ca452d9ecd..535079e1122 100644 --- a/usr/share/bash-completion/completions/_rtcwake +++ b/usr/share/bash-completion/completions/_rtcwake @@ -3,30 +3,30 @@ # Use of this file is deprecated. Upstream completion is available in # util-linux >= 2.23, use that instead. -_rtcwake() +_comp_cmd_rtcwake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | -h | --version | -V | --seconds | -s | --time | -t) return ;; --mode | -m) - COMPREPLY=($(compgen -W 'standby mem disk on no off' -- "$cur")) + _comp_compgen -- -W 'standby mem disk on no off' return ;; --device | -d) - COMPREPLY=($(command ls -d /dev/rtc?* 2>/dev/null)) - COMPREPLY=($(compgen -W '${COMPREPLY[@]#/dev/}' -- "$cur")) + _comp_expand_glob COMPREPLY '/dev/rtc?*' && + _comp_compgen -- -W '"${COMPREPLY[@]#/dev/}"' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help } && - complete -F _rtcwake rtcwake + complete -F _comp_cmd_rtcwake rtcwake # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ruff b/usr/share/bash-completion/completions/_ruff new file mode 100644 index 00000000000..b5fd1a5381c --- /dev/null +++ b/usr/share/bash-completion/completions/_ruff @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd generate-shell-completion bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" generate-shell-completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_rustup b/usr/share/bash-completion/completions/_rustup new file mode 100644 index 00000000000..1bcf44da7b3 --- /dev/null +++ b/usr/share/bash-completion/completions/_rustup @@ -0,0 +1,7 @@ +# 3rd party completion loader for rustup -*- shell-script -*- +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completions bash rustup 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_skaffold b/usr/share/bash-completion/completions/_skaffold new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_skaffold @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_slackpkg b/usr/share/bash-completion/completions/_slackpkg new file mode 100644 index 00000000000..f8f7810d1a7 --- /dev/null +++ b/usr/share/bash-completion/completions/_slackpkg @@ -0,0 +1,111 @@ +# bash completion for slackpkg(8) -*- shell-script -*- +# options list is based on `grep '\-.*\=.*)' /usr/sbin/slackpkg | cut -f1 -d\)` + +# Use of this file is deprecated. +# Upstream completion is available in slackpkg >= 15.0.4, use that instead. + +_comp_cmd_slackpkg() +{ + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return + + local split="" + if [[ $cur == -?*=* ]]; then + prev="${cur%%?(\\)=*}" + cur="${cur#*=}" + split=set + fi + + case "$prev" in + -delall | -checkmd5 | -checkgpg | -checksize | -postinst | -onoff | \ + -download_all | -dialog | -batch | -only_new_dotnew | \ + -use_includes | -spinning) + _comp_compgen -- -W 'on off' + return + ;; + -default_answer) + _comp_compgen -- -W 'yes no' + return + ;; + -dialog_maxargs | -mirror) + # argument required but no completions available + return + ;; + esac + + [[ $split ]] && return + + if [[ $cur == -* ]]; then + compopt -o nospace + _comp_compgen -- -W '-delall= -checkmd5= -checkgpg= -checksize= + -postinst= -onoff= -download_all= -dialog= -dialog_maxargs= -batch= + -only_new_dotnew= -use_includes= -spinning= -default_answer= + -mirror=' + return + fi + + local confdir="/etc/slackpkg" + local config="$confdir/slackpkg.conf" + + [[ -r $config ]] || return + . "$config" + + local i action + for ((i = 1; i < cword; i++)); do + if [[ ${words[i]} != -* ]]; then + action="${words[i]}" + break + fi + done + + case "$action" in + generate-template | search | file-search) + # argument required but no completions available + return + ;; + install-template | remove-template) + if [[ -e $confdir/templates ]]; then + _comp_compgen -C "$confdir/templates" -- -f -X \ + "!?*.template" && COMPREPLY=("${COMPREPLY[@]%.template}") + fi + return + ;; + remove) + _comp_compgen_filedir + _comp_compgen -a -- -W 'a ap d e f k kde kdei l n t tcl x xap xfce + y' + _comp_compgen -aC /var/log/packages -- -f + return + ;; + install | reinstall | upgrade | blacklist | download) + _comp_compgen_filedir + _comp_compgen -a -- -W 'a ap d e f k kde kdei l n t tcl x xap xfce + y' + _comp_compgen -a split -l -- "$( + cut -f 6 -d\ "${WORKDIR}/pkglist" 2>/dev/null + )" + return + ;; + info) + _comp_compgen_split "$( + cut -f 6 -d\ "${WORKDIR}/pkglist" 2>/dev/null + )" + return + ;; + update) + # we should complete the same as the next `list` + "gpg" + _comp_compgen -- -W 'gpg' + ;& + *) + _comp_compgen -a -- -W 'install reinstall upgrade remove blacklist + download update install-new upgrade-all clean-system new-config + check-updates help generate-template install-template + remove-template search file-search info' + return + ;; + esac + +} && + complete -F _comp_cmd_slackpkg slackpkg + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_ssh-inscribe b/usr/share/bash-completion/completions/_ssh-inscribe new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_ssh-inscribe @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_sshi b/usr/share/bash-completion/completions/_sshi new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_sshi @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_starship b/usr/share/bash-completion/completions/_starship new file mode 100644 index 00000000000..fe326883e3d --- /dev/null +++ b/usr/share/bash-completion/completions/_starship @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_su b/usr/share/bash-completion/completions/_su index 1a03c8f7ec9..3354447cbf5 100644 --- a/usr/share/bash-completion/completions/_su +++ b/usr/share/bash-completion/completions/_su @@ -8,34 +8,32 @@ if [[ $OSTYPE != *linux* ]]; then return fi -_su() +_comp_cmd_su() { # linux-specific completion - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in -s | --shell) - _shells + _comp_compgen_shells return ;; -c | --command | --session-command) - local IFS=$'\n' - compopt -o filenames - COMPREPLY=($(compgen -d -c -- "$cur")) + _comp_compgen_commands return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" --help)' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - COMPREPLY=($(compgen -u -- "$cur")) + _comp_compgen -- -u } && - complete -F _su su + complete -F _comp_cmd_su su # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_svn b/usr/share/bash-completion/completions/_svn index 5d85c2b4b07..862b62c18d2 100644 --- a/usr/share/bash-completion/completions/_svn +++ b/usr/share/bash-completion/completions/_svn @@ -3,10 +3,10 @@ # Use of this file is deprecated. Upstream completion is available in # subversion >= 0.12.0, use that instead. -_svn() +_comp_cmd_svn() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local commands commands='add blame praise annotate ann cat checkout co cleanup commit \ @@ -18,28 +18,27 @@ _svn() if ((cword == 1)); then if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--version' -- "$cur")) + _comp_compgen -- -W '--version' else - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" fi else case $prev in --config-dir) - _filedir -d + _comp_compgen_filedir -d return ;; -F | --file | --targets) - _filedir + _comp_compgen_filedir return ;; --encoding) - _xfunc iconv _iconv_charsets + _comp_compgen -x iconv charsets return ;; --editor-cmd | --diff-cmd | --diff3-cmd) - compopt -o filenames - COMPREPLY=($(compgen -c -- "$cur")) + _comp_compgen_commands return ;; esac @@ -194,17 +193,17 @@ _svn() esac options+=" --help --config-dir" - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" else if [[ $command == @(help|[h?]) ]]; then - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" else - _filedir + _comp_compgen_filedir fi fi fi } && - complete -F _svn svn + complete -F _comp_cmd_svn svn # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_svnadmin b/usr/share/bash-completion/completions/_svnadmin index 654fd3ecd78..6b4a423a9e7 100644 --- a/usr/share/bash-completion/completions/_svnadmin +++ b/usr/share/bash-completion/completions/_svnadmin @@ -3,10 +3,10 @@ # Use of this file is deprecated. Upstream completion is available in # subversion >= 0.12.0, use that instead. -_svnadmin() +_comp_cmd_svnadmin() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local commands commands='create deltify dump help ? hotcopy list-dblogs list-unused-dblogs @@ -14,18 +14,18 @@ _svnadmin() if ((cword == 1)); then if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--version' -- "$cur")) + _comp_compgen -- -W '--version' else - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" fi else case $prev in --config-dir) - _filedir -d + _comp_compgen_filedir -d return ;; --fs-type) - COMPREPLY=($(compgen -W 'fsfs bdb' -- "$cur")) + _comp_compgen -- -W 'fsfs bdb' return ;; esac @@ -62,17 +62,17 @@ _svnadmin() esac options+=" --help" - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" else if [[ $command == @(help|[h?]) ]]; then - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" else - _filedir + _comp_compgen_filedir fi fi fi } && - complete -F _svnadmin -o default svnadmin + complete -F _comp_cmd_svnadmin -o default svnadmin # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_svnlook b/usr/share/bash-completion/completions/_svnlook index 36188a576a9..f0c01df9fbe 100644 --- a/usr/share/bash-completion/completions/_svnlook +++ b/usr/share/bash-completion/completions/_svnlook @@ -3,10 +3,10 @@ # Use of this file is deprecated. Upstream completion is available in # subversion >= 0.12.0, use that instead. -_svnlook() +_comp_cmd_svnlook() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local commands commands='author cat changed date diff dirs-changed help ? h history info @@ -14,9 +14,9 @@ _svnlook() if ((cword == 1)); then if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--version' -- "$cur")) + _comp_compgen -- -W '--version' else - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" fi else local command=${words[1]} @@ -47,17 +47,17 @@ _svnlook() esac options+=" --help" - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" else if [[ $command == @(help|[h?]) ]]; then - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" else - _filedir + _comp_compgen_filedir fi fi fi } && - complete -F _svnlook -o default svnlook + complete -F _comp_cmd_svnlook -o default svnlook # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tanzu b/usr/share/bash-completion/completions/_tanzu new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_tanzu @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tanzu-core b/usr/share/bash-completion/completions/_tanzu-core new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_tanzu-core @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tendermint b/usr/share/bash-completion/completions/_tendermint new file mode 100644 index 00000000000..2f485980a1d --- /dev/null +++ b/usr/share/bash-completion/completions/_tendermint @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_terraform b/usr/share/bash-completion/completions/_terraform new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_terraform @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tkn b/usr/share/bash-completion/completions/_tkn new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_tkn @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tkn-pac b/usr/share/bash-completion/completions/_tkn-pac new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_tkn-pac @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tofu b/usr/share/bash-completion/completions/_tofu new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_tofu @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_tokio-console b/usr/share/bash-completion/completions/_tokio-console new file mode 100644 index 00000000000..c170044dc3f --- /dev/null +++ b/usr/share/bash-completion/completions/_tokio-console @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd gen-completion bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" gen-completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_trivy b/usr/share/bash-completion/completions/_trivy new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_trivy @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_udevadm b/usr/share/bash-completion/completions/_udevadm index 19624be98f9..6a3c351b013 100644 --- a/usr/share/bash-completion/completions/_udevadm +++ b/usr/share/bash-completion/completions/_udevadm @@ -3,75 +3,73 @@ # Use of this file is deprecated. Upstream completion is available in # systemd >= 196, use that instead. -_udevadm() +_comp_cmd_udevadm() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return - local i udevcmd + local i udevcmd="" has_udevcmd="" for ((i = 1; i < cword; i++)); do if [[ ${words[i]} != -* ]]; then udevcmd=${words[i]} + has_udevcmd=set break fi done case $prev in - --help | --version | --property | --children-max | --timeout | --seq-start | \ - --seq-end | --attr-match | --attr-nomatch | --parent-match | --property-match | \ - --tag-match | --subsystem-match | --subsystem-nomatch | --sysname-match | \ - --path) + --help | --version | --property | --children-max | --timeout | \ + --seq-start | --seq-end | --attr-match | --attr-nomatch | \ + --parent-match | --property-match | --tag-match | \ + --subsystem-match | --subsystem-nomatch | --sysname-match | --path) return ;; --log-priority) - COMPREPLY=($(compgen -W 'err info debug' -- "$cur")) + _comp_compgen -- -W 'err info debug' return ;; --query) - COMPREPLY=($(compgen -W 'name symlink path property all' \ - -- "$cur")) + _comp_compgen -- -W 'name symlink path property all' return ;; --name) - cur=${cur:=/dev/} - _filedir + _comp_compgen -c "${cur:-/dev/}" filedir return ;; --device-id-of-file | --exit-if-exists) - _filedir + _comp_compgen_filedir return ;; --action) - COMPREPLY=($(compgen -W 'add change remove' -- "$cur")) + _comp_compgen -- -W 'add change remove' return ;; --type) - COMPREPLY=($(compgen -W 'devices subsystems failed' -- "$cur")) + _comp_compgen -- -W 'devices subsystems failed' return ;; esac - $split && return + [[ $was_split ]] && return - if [[ ! -v udevcmd ]]; then + if [[ ! $has_udevcmd ]]; then case $cur in -*) - COMPREPLY=($(compgen -W '--help --version --debug' -- "$cur")) + _comp_compgen -- -W '--help --version --debug' ;; *) - COMPREPLY=($(compgen -W "$("$1" --help 2>/dev/null | - awk '/^[ \t]/ { print $1 }')" -- "$cur")) + _comp_compgen_split -- "$("$1" --help 2>/dev/null | + _comp_awk '/^[ \t]/ { print $1 }')" ;; esac return fi if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W \ - '$("$1" ${udevcmd-} --help 2>/dev/null | _parse_help -)' -- "$cur")) + _comp_compgen_help -- ${has_udevcmd:+"$udevcmd"} --help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace fi } && - complete -F _udevadm udevadm + complete -F _comp_cmd_udevadm udevadm # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_umount b/usr/share/bash-completion/completions/_umount index 36d5703f6d2..5a453a8bac1 100644 --- a/usr/share/bash-completion/completions/_umount +++ b/usr/share/bash-completion/completions/_umount @@ -11,14 +11,13 @@ fi # umount(8) completion. This relies on the mount point being the third # space-delimited field in the output of mount(8) # -_umount() +_comp_cmd_umount() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - local IFS=$'\n' - COMPREPLY=($(compgen -W '$(mount | cut -d" " -f 3)' -- "$cur")) + _comp_compgen_split -l -- "$(mount | cut -d" " -f 3)" } && - complete -F _umount -o dirnames umount + complete -F _comp_cmd_umount -o dirnames umount # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_umount.linux b/usr/share/bash-completion/completions/_umount.linux index cf8a2595996..ca515c8ccd8 100644 --- a/usr/share/bash-completion/completions/_umount.linux +++ b/usr/share/bash-completion/completions/_umount.linux @@ -6,7 +6,7 @@ # Just like COMPREPLY=(`compgen -W "${COMPREPLY[*]}" -- "$cur"`), only better! # # This will correctly escape special characters in COMPREPLY. -_reply_compgen_array() +_comp_cmd_umount__reply_compgen_array() { # Create the argument for compgen -W by escaping twice. # @@ -15,8 +15,10 @@ _reply_compgen_array() # argument. local i wlist for i in ${!COMPREPLY[*]}; do - local q=$(quote "$(printf %q "${COMPREPLY[i]}")") - wlist+=$q$'\n' + local REPLY + printf -v REPLY %q "${COMPREPLY[i]}" + _comp_quote "$REPLY" + wlist+=$REPLY$'\n' done # We also have to add another round of escaping to $cur. @@ -25,16 +27,14 @@ _reply_compgen_array() ecur=${ecur//\'/\\\'} # Actually generate completions. - local ifs=$IFS - IFS=$'\n' eval 'COMPREPLY=(`compgen -W "$wlist" -- "${ecur}"`)' - IFS=$ifs + _comp_compgen -lc "${ecur}" -- -W "$wlist" } # Unescape strings in the linux fstab(5) format (with octal escapes). -__linux_fstab_unescape() +_comp_cmd_umount__linux_fstab_unescape() { - eval $1="'${!1//\'/\\047}'" - eval $1="'${!1/%\\/\\\\}'" + eval "$1='${!1//\'/\\047}'" + eval "$1='${!1/%\\/\\\\}'" eval "$1=$'${!1}'" } @@ -43,30 +43,25 @@ __linux_fstab_unescape() # Reads a file from stdin in the linux fstab(5) format; as used by /etc/fstab # and /proc/mounts. With 1st arg -L, look for entries by label. # shellcheck disable=SC2120 -_linux_fstab() +_comp_cmd_umount__linux_fstab() { COMPREPLY=() # Read and unescape values into COMPREPLY local fs_spec fs_file fs_other - local ifs="$IFS" while read -r fs_spec fs_file fs_other; do if [[ $fs_spec == [#]* ]]; then continue; fi if [[ ${1-} == -L ]]; then local fs_label=${fs_spec/#LABEL=/} if [[ $fs_label != "$fs_spec" ]]; then - __linux_fstab_unescape fs_label - IFS=$'\0' + _comp_cmd_umount__linux_fstab_unescape fs_label COMPREPLY+=("$fs_label") - IFS=$ifs fi else - __linux_fstab_unescape fs_spec - __linux_fstab_unescape fs_file - IFS=$'\0' + _comp_cmd_umount__linux_fstab_unescape fs_spec + _comp_cmd_umount__linux_fstab_unescape fs_file [[ $fs_spec == */* ]] && COMPREPLY+=("$fs_spec") [[ $fs_file == */* ]] && COMPREPLY+=("$fs_file") - IFS=$ifs fi done @@ -86,37 +81,37 @@ _linux_fstab() local i for i in ${!COMPREPLY[*]}; do [[ ${COMPREPLY[i]} == "$realcur"* ]] && - COMPREPLY+=($(cd "$dircur" 2>/dev/null && - compgen -f -d -P "$dircur" \ - -X "!${COMPREPLY[i]##"$dirrealcur"}" -- "$basecur")) + _comp_compgen -aC "$dircur" -c "$basecur" -- \ + -f -d -P "$dircur" -X "!${COMPREPLY[i]##"$dirrealcur"}" done fi fi - _reply_compgen_array + _comp_cmd_umount__reply_compgen_array } -_umount() +_comp_cmd_umount() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case "$prev" in -t) # FIXME: no - local split=false + local split="" if [[ $cur == ?*,* ]]; then prev="${cur%,*}" cur="${cur##*,}" - split=true + split=set fi - COMPREPLY=($(compgen -W 'adfs affs autofs btrfs cifs coda - cramfs debugfs devpts efs ext2 ext3 ext4 fuse hfs hfsplus hpfs - iso9660 jfs minix msdos ncpfs nfs nfs4 ntfs ntfs-3g proc qnx4 - ramfs reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf ufs - umsdos usbfs vfat xfs' -- "$cur")) - _fstypes - $split && COMPREPLY=(${COMPREPLY[@]/#/$prev,}) + _comp_compgen -- -W 'adfs affs autofs btrfs cifs coda cramfs + debugfs devpts efs ext2 ext3 ext4 fuse hfs hfsplus hpfs iso9660 + jfs minix msdos ncpfs nfs nfs4 ntfs ntfs-3g proc qnx4 ramfs + reiserfs romfs squashfs smbfs sysv tmpfs ubifs udf ufs umsdos + usbfs vfat xfs' + _comp_compgen -a fstypes + [[ $split ]] && ((${#COMPREPLY[@]})) && + _comp_compgen -Rv COMPREPLY -- -P "$prev," -W '"${COMPREPLY[@]}"' return ;; -O) @@ -126,20 +121,19 @@ _umount() esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '-V -h -v -n -r -d -i -a -t -O -f -l - --no-canonicalize --fake' -- "$cur")) + _comp_compgen -- -W '-V -h -v -n -r -d -i -a -t -O -f -l + --no-canonicalize --fake' [[ ${COMPREPLY-} ]] && return fi if [[ -r /proc/mounts ]]; then # Linux /proc/mounts is properly quoted. This is important when # unmounting usb devices with pretty names. - _linux_fstab /dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_vacuum b/usr/share/bash-completion/completions/_vacuum new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_vacuum @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_vault b/usr/share/bash-completion/completions/_vault new file mode 100644 index 00000000000..25abbc20a07 --- /dev/null +++ b/usr/share/bash-completion/completions/_vault @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands -*- shell-script -*- +# supporting their use of as a `complete -C` handler. +# +# This serves as a fallback in case the completion is not installed otherwise. + +type "$1" &>/dev/null && complete -C "\"$1\" 2>/dev/null" "$1" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_virtctl b/usr/share/bash-completion/completions/_virtctl new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_virtctl @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_watchexec b/usr/share/bash-completion/completions/_watchexec new file mode 100644 index 00000000000..95c86c061d6 --- /dev/null +++ b/usr/share/bash-completion/completions/_watchexec @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd --completions bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" --completions bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_xm b/usr/share/bash-completion/completions/_xm index 06b25d3c5aa..7577efd22d2 100644 --- a/usr/share/bash-completion/completions/_xm +++ b/usr/share/bash-completion/completions/_xm @@ -4,26 +4,20 @@ # provided by upstream. It has been replaced with the 'xl' command, for # which upstream provides completion, use that instead. -_xen_domain_names() +_comp_cmd_xm__domain_names() { - COMPREPLY=($(compgen -W "$(xm list 2>/dev/null | - awk '!/Name|Domain-0/ { print $1 }')" -- "$cur")) + _comp_compgen_split -- "$(xm list 2>/dev/null | + _comp_awk '!/Name|Domain-0/ { print $1 }')" } -_xen_domain_ids() +_comp_cmd_xm() { - COMPREPLY=($(compgen -W "$(xm list 2>/dev/null | - awk '!/Name|Domain-0/ { print $2 }')" -- "$cur")) -} - -_xm() -{ - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - # TODO: _split_longopt + # TODO: split longopt - local args command commands options + local REPLY command commands options commands='console vncviewer create new delete destroy domid domname dump-core list mem-max mem-set migrate pause reboot rename reset @@ -37,7 +31,7 @@ _xm() resetpolicy getpolicy shell help' if ((cword == 1)); then - COMPREPLY=($(compgen -W "$commands" -- "$cur")) + _comp_compgen -- -W "$commands" else if [[ $cur == *=* ]]; then prev=${cur/=*/} @@ -78,140 +72,139 @@ _xm() -s --skipdtd -p --paused -c --console_autoconnect' ;; esac - COMPREPLY=($(compgen -W "$options" -- "$cur")) + _comp_compgen -- -W "$options" else case $command in - console | destroy | domname | domid | list | mem-set | mem-max | \ - pause | reboot | rename | shutdown | unpause | vcpu-list | vcpu-pin | \ - vcpu-set | block-list | network-list | vtpm-list) - _count_args - case $args in + console | destroy | domname | domid | list | mem-set | \ + mem-max | pause | reboot | rename | shutdown | unpause | \ + vcpu-list | vcpu-pin | vcpu-set | block-list | \ + network-list | vtpm-list) + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; esac ;; migrate) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; 3) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" ;; esac ;; restore | dry-run | vnet-create) - _filedir + _comp_compgen_filedir ;; save) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; 3) - _filedir + _comp_compgen_filedir ;; esac ;; sysrq) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; 3) - COMPREPLY=($(compgen -W "r s e i u b" -- "$cur")) + _comp_compgen -- -W "r s e i u b" ;; esac ;; block-attach) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; 3) - COMPREPLY=($(compgen -W "phy: file:" -- "$cur")) + _comp_compgen -- -W "phy: file:" ;; 5) - COMPREPLY=($(compgen -W "w r" -- "$cur")) + _comp_compgen -- -W "w r" ;; 6) - _xen_domain_names + _comp_cmd_xm__domain_names ;; esac ;; block-detach) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; 3) - COMPREPLY=($(compgen -W "$(xm block-list $prev \ - 2>/dev/null | awk '!/Vdev/ { print $1 }')" \ - -- "$cur")) + _comp_compgen_split -- "$(xm block-list "$prev" \ + 2>/dev/null | _comp_awk '!/Vdev/ { print $1 }')" ;; esac ;; network-attach) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; *) - COMPREPLY=($(compgen -W "script= ip= mac= bridge= - backend=" -- "$cur")) + _comp_compgen -- -W "script= ip= mac= bridge= + backend=" ;; esac ;; network-detach) - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; 3) - COMPREPLY=($(compgen -W "$(xm network-list $prev \ - 2>/dev/null | awk '!/Idx/ { print $1 }')" \ - -- "$cur")) + _comp_compgen_split -- "$(xm network-list "$prev" \ + 2>/dev/null | _comp_awk '!/Idx/ { print $1 }')" ;; esac ;; sched-credit) case $prev in -d) - _xen_domain_names + _comp_cmd_xm__domain_names return ;; esac ;; create) - _filedir - COMPREPLY+=( - $(compgen -W '$(command ls /etc/xen 2>/dev/null)' \ - -- "$cur")) + _comp_compgen_filedir + _comp_compgen -a split -- "$( + command ls /etc/xen 2>/dev/null + )" ;; new) case $prev in -f | -F | --defconfig | --config) - _filedir + _comp_compgen_filedir return ;; --path) - _filedir -d + _comp_compgen_filedir -d return ;; esac - _count_args - case $args in + _comp_count_args + case $REPLY in 2) - _xen_domain_names + _comp_cmd_xm__domain_names ;; esac ;; @@ -219,6 +212,6 @@ _xm() fi fi } && - complete -F _xm xm + complete -F _comp_cmd_xm xm # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_yq b/usr/share/bash-completion/completions/_yq new file mode 100644 index 00000000000..c357bd9c440 --- /dev/null +++ b/usr/share/bash-completion/completions/_yq @@ -0,0 +1,8 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd shell-completion bash". +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" shell-completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_yum b/usr/share/bash-completion/completions/_yum index 224ea25436c..2899cb37545 100644 --- a/usr/share/bash-completion/completions/_yum +++ b/usr/share/bash-completion/completions/_yum @@ -3,72 +3,79 @@ # Use of this file is deprecated. Upstream completion is available in # yum > 3.2.25, use that instead. -_yum_list() +_comp_cmd_yum__list() { if [[ $1 == all ]]; then # Try to strip in between headings like "Available Packages" # This will obviously only work for English :P - COMPREPLY=($(yum -d 0 -C list $1 "$cur*" 2>/dev/null | - command sed -ne '/^Available /d' -e '/^Installed /d' -e '/^Updated /d' \ - -e 's/[[:space:]].*//p')) + _comp_split COMPREPLY "$(yum -d 0 -C list "$1" "$cur*" 2>/dev/null | + command sed -ne '/^Available /d' -e '/^Installed /d' \ + -e '/^Updated /d' -e 's/[[:space:]].*//p')" else # Drop first line (e.g. "Updated Packages") - COMPREPLY=($(yum -d 0 -C list $1 "$cur*" 2>/dev/null | - command sed -ne 1d -e 's/[[:space:]].*//p')) + _comp_split COMPREPLY "$(yum -d 0 -C list "$1" "$cur*" 2>/dev/null | + command sed -ne 1d -e 's/[[:space:]].*//p')" fi } -_yum_repolist() +_comp_cmd_yum__compgen_repolist() { # -d 0 causes repolist to output nothing as of yum 3.2.22: # http://yum.baseurl.org/ticket/83 # Drop first ("repo id repo name") and last ("repolist: ...") rows - yum --noplugins -C repolist $1 2>/dev/null | - command sed -ne '/^repo\s\s*id/d' -e '/^repolist:/d' -e 's/[[:space:]].*//p' + _comp_compgen_split -- "$( + yum --noplugins -C repolist "$1" 2>/dev/null | + command sed -ne '/^repo[[:space:]]\{1,\}id/d' -e '/^repolist:/d' \ + -e 's/[[:space:]].*//p' + )" } -_yum_plugins() +_comp_cmd_yum__compgen_plugins() { - command ls /usr/lib/yum-plugins/*.py{,c,o} 2>/dev/null | - command sed -ne 's|.*/\([^./]*\)\.py[co]\{0,1\}$|\1|p' | sort -u + local -a files + _comp_expand_glob files '/usr/lib/yum-plugins/*.py{,c,o}' || return + _comp_compgen -U files split -- "$( + printf '%s\n' "${files[@]}" | + command sed -ne 's|.*/\([^./]*\)\.py[co]\{0,1\}$|\1|p' | sort -u + )" } -_yum() +_comp_cmd_yum() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return - local special i - for ((i = 1; i < ${#words[@]} - 1; i++)); do + local special="" i + for ((i = 1; i < cword; i++)); do if [[ ${words[i]} == @(install|update|upgrade|remove|erase|deplist|info) ]]; then special=${words[i]} break fi done - if [[ -v special ]]; then + if [[ $special ]]; then # TODO: install|update|upgrade should not match *src.rpm - if [[ $cur == @(*/|[.~])* && \ + if [[ $cur == @(*/|[.~])* && $special == @(deplist|install|update|upgrade) ]]; then - _filedir rpm + _comp_compgen_filedir rpm return fi case $special in install) - _yum_list available + _comp_cmd_yum__list available return ;; deplist | info) - _yum_list all + _comp_cmd_yum__list all return ;; upgrade | update) - _yum_list updates + _comp_cmd_yum__list updates return ;; remove | erase) - # _rpm_installed_packages is not arch-qualified - _yum_list installed + # _comp_xfunc_rpm_installed_packages is not arch-qualified + _comp_cmd_yum__list installed return ;; esac @@ -76,44 +83,43 @@ _yum() case $prev in list) - COMPREPLY=($(compgen -W 'all available updates installed extras - obsoletes recent' -- "$cur")) + _comp_compgen -- -W 'all available updates installed extras + obsoletes recent' ;; clean) - COMPREPLY=($(compgen -W 'packages headers metadata cache dbcache - all' -- "$cur")) + _comp_compgen -- -W 'packages headers metadata cache dbcache all' ;; repolist) - COMPREPLY=($(compgen -W 'all enabled disabled' -- "$cur")) + _comp_compgen -- -W 'all enabled disabled' ;; localinstall | localupdate) # TODO: should not match *src.rpm - _filedir rpm + _comp_compgen_filedir rpm ;; -d | -e) - COMPREPLY=($(compgen -W '{0..10}' -- "$cur")) + _comp_compgen -- -W '{0..10}' ;; -c) - _filedir + _comp_compgen_filedir ;; --installroot) - _filedir -d + _comp_compgen_filedir -d ;; --enablerepo) - COMPREPLY=($(compgen -W '$(_yum_repolist disabled)' -- "$cur")) + _comp_cmd_yum__compgen_repolist disabled ;; --disablerepo) - COMPREPLY=($(compgen -W '$(_yum_repolist enabled)' -- "$cur")) + _comp_cmd_yum__compgen_repolist enabled ;; --disableexcludes) - COMPREPLY=($(compgen -W '$(_yum_repolist all) all main' \ - -- "$cur")) + _comp_cmd_yum__compgen_repolist all + _comp_compgen -a -- -W "all main" ;; --enableplugin | --disableplugin) - COMPREPLY=($(compgen -W '$(_yum_plugins)' -- "$cur")) + _comp_cmd_yum__compgen_plugins ;; --color) - COMPREPLY=($(compgen -W 'always auto never' -- "$cur")) + _comp_compgen -- -W 'always auto never' ;; -R | -x | --exclude) # argument required but no completions available @@ -124,21 +130,21 @@ _yum() return ;; *) - COMPREPLY=($(compgen -W 'install update check-update upgrade - remove erase list info provides whatprovides clean makecache - groupinstall groupupdate grouplist groupremove groupinfo - search shell resolvedep localinstall localupdate deplist - repolist help' -- "$cur")) + _comp_compgen -- -W 'install update check-update upgrade remove + erase list info provides whatprovides clean makecache + groupinstall groupupdate grouplist groupremove groupinfo search + shell resolvedep localinstall localupdate deplist repolist + help' ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace fi } && - complete -F _yum yum + complete -F _comp_cmd_yum yum # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_zarf b/usr/share/bash-completion/completions/_zarf new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_zarf @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/_zitadel b/usr/share/bash-completion/completions/_zitadel new file mode 100644 index 00000000000..40fc5c37b6c --- /dev/null +++ b/usr/share/bash-completion/completions/_zitadel @@ -0,0 +1,9 @@ +# 3rd party completion loader for commands emitting -*- shell-script -*- +# their completion using "$cmd completion bash". +# For example, many Go programs using https://github.com/spf13/cobra do. +# +# This serves as a fallback in case the completion is not installed otherwise. + +eval -- "$("$1" completion bash 2>/dev/null)" + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/a2x b/usr/share/bash-completion/completions/a2x index b59c7861bfd..ed1a206ba09 100644 --- a/usr/share/bash-completion/completions/a2x +++ b/usr/share/bash-completion/completions/a2x @@ -1,39 +1,41 @@ # a2x(1) completion -*- shell-script -*- -_a2x() +_comp_cmd_a2x() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[aDd]*)' + # shellcheck disable=SC2254 case $prev in --attribute | --asciidoc-opts | --dblatex-opts | --fop-opts | --help | \ - --version | --xsltproc-opts | -!(-*)[ah]) + --version | --xsltproc-opts | -${noargopts}[ah]) return ;; - --destination-dir | --icons-dir | -!(-*)D) - _filedir -d + --destination-dir | --icons-dir | -${noargopts}D) + _comp_compgen_filedir -d return ;; - --doctype | -!(-*)d) - _xfunc asciidoc _asciidoc_doctype + --doctype | -${noargopts}d) + _comp_compgen -x asciidoc doctype return ;; --stylesheet) - _filedir css + _comp_compgen_filedir css return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" --help)' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _a2x a2x + complete -F _comp_cmd_a2x a2x # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/abook b/usr/share/bash-completion/completions/abook index 42197d10d8f..5e4c2f45cde 100644 --- a/usr/share/bash-completion/completions/abook +++ b/usr/share/bash-completion/completions/abook @@ -1,12 +1,12 @@ # abook(1) completion -*- shell-script -*- -_abook() +_comp_cmd_abook() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return # abook only takes options, tabbing after command name adds a single dash - [[ $cword -eq 1 && -z $cur ]] && + [[ $cword -eq 1 && ! $cur ]] && { compopt -o nospace COMPREPLY=("-") @@ -15,35 +15,33 @@ _abook() case $cur in -*) - _longopt "$1" + _comp_complete_longopt "$@" return ;; esac case $prev in --informat) - COMPREPLY=($(compgen -W "$($1 --formats | - command sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" \ - -- "$cur")) + _comp_compgen_split -- "$("$1" --formats | + command sed -n -e 's/^'$'\t''\([a-z]*\).*/\1/p' -e '/^$/q')" ;; --outformat) - COMPREPLY=($(compgen -W "$($1 --formats | - command sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" \ - -- "$cur")) + _comp_compgen_split -- "$("$1" --formats | + command sed -n -e '/^$/,$s/^'$'\t''\([a-z]*\).*/\1/p')" ;; --infile) - COMPREPLY=($(compgen -W stdin -- "$cur")) - _filedir + _comp_compgen -- -W stdin + _comp_compgen -a filedir ;; --outfile) - COMPREPLY=($(compgen -W stdout -- "$cur")) - _filedir + _comp_compgen -- -W stdout + _comp_compgen -a filedir ;; --config | --datafile) - _filedir + _comp_compgen_filedir ;; esac } && - complete -F _abook abook + complete -F _comp_cmd_abook abook # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal b/usr/share/bash-completion/completions/aclocal index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal +++ b/usr/share/bash-completion/completions/aclocal @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.10 b/usr/share/bash-completion/completions/aclocal-1.10 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.10 +++ b/usr/share/bash-completion/completions/aclocal-1.10 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.11 b/usr/share/bash-completion/completions/aclocal-1.11 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.11 +++ b/usr/share/bash-completion/completions/aclocal-1.11 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.12 b/usr/share/bash-completion/completions/aclocal-1.12 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.12 +++ b/usr/share/bash-completion/completions/aclocal-1.12 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.13 b/usr/share/bash-completion/completions/aclocal-1.13 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.13 +++ b/usr/share/bash-completion/completions/aclocal-1.13 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.14 b/usr/share/bash-completion/completions/aclocal-1.14 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.14 +++ b/usr/share/bash-completion/completions/aclocal-1.14 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.15 b/usr/share/bash-completion/completions/aclocal-1.15 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.15 +++ b/usr/share/bash-completion/completions/aclocal-1.15 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aclocal-1.16 b/usr/share/bash-completion/completions/aclocal-1.16 index 010862fb881..b23ff7298cd 100644 --- a/usr/share/bash-completion/completions/aclocal-1.16 +++ b/usr/share/bash-completion/completions/aclocal-1.16 @@ -1,35 +1,35 @@ # aclocal(1) completion -*- shell-script -*- -_aclocal() +_comp_cmd_aclocal() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --print-ac-dir | --version) return ;; --acdir | -I) - _filedir -d + _comp_compgen_filedir -d return ;; --output) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; esac - $split && return + [[ $was_split ]] && return - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace } && - complete -F _aclocal aclocal aclocal-1.1{0..6} + complete -F _comp_cmd_aclocal aclocal aclocal-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/acpi b/usr/share/bash-completion/completions/acpi index f2c38b210d1..3d131da2cb4 100644 --- a/usr/share/bash-completion/completions/acpi +++ b/usr/share/bash-completion/completions/acpi @@ -1,22 +1,24 @@ -# acpi(1) completion -*- shell-script -*- +# acpi(1) completion -*- shell-script -*- -_acpi() +_comp_cmd_acpi() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + local noargopts='!(-*|*[d]*)' + # shellcheck disable=SC2254 case $prev in - --help | --version | -!(-*)[hv]) + --help | --version | -${noargopts}[hv]) return ;; - --directory | -!(-*)d) - _filedir -d + --directory | -${noargopts}d) + _comp_compgen_filedir -d return ;; esac - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help } && - complete -F _acpi acpi + complete -F _comp_cmd_acpi acpi # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/add_members b/usr/share/bash-completion/completions/add_members index efa4f1e2882..d83957ac4c9 100644 --- a/usr/share/bash-completion/completions/add_members +++ b/usr/share/bash-completion/completions/add_members @@ -1,31 +1,34 @@ # mailman add_members completion -*- shell-script -*- -_add_members() +_comp_cmd_add_members() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case $prev in -r | -d | --regular-members-file | --digest-members-file) - _filedir + _comp_compgen_filedir return ;; -w | -a | --welcome-msg | --admin-notify) - COMPREPLY=($(compgen -W 'y n' -- "$cur")) + _comp_compgen -- -W 'y n' return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--regular-members-file --digest-members-file - --welcome-msg --admin-notify --help' -- "$cur")) + _comp_compgen -- -W '--regular-members-file --digest-members-file + --welcome-msg --admin-notify --help' else - _xfunc list_lists _mailman_lists + # Prefer `list_lists` in the same dir as command + local pathcmd + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH + _comp_xfunc list_lists mailman_lists fi } && - complete -F _add_members add_members + complete -F _comp_cmd_add_members add_members # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/alias b/usr/share/bash-completion/completions/alias index 92211d839ef..9a0f3d2255c 100644 --- a/usr/share/bash-completion/completions/alias +++ b/usr/share/bash-completion/completions/alias @@ -1,20 +1,28 @@ # bash alias completion -*- shell-script -*- -_alias() +_comp_cmd_alias() { - local cur prev words cword - _init_completion -n = || return + local cur prev words cword comp_args + _comp_initialize -n = -- "$@" || return - case ${words[@]} in + case "${words[*]}" in + *" -p "*) + return + ;; *[^=]) - COMPREPLY=($(compgen -A alias -- "$cur")) + _comp_compgen -- -A alias ;; *=) - COMPREPLY=("$(alias ${cur%=} 2>/dev/null | command sed \ + COMPREPLY=("$(alias "${cur%=}" 2>/dev/null | command sed \ -e 's|^alias '"$cur"'\(.*\)$|\1|')") ;; esac + + if [[ $cur == -* ]]; then + _comp_compgen_usage -c help -s "$1" + ((${#COMPREPLY[*]} != 1)) || compopt +o nospace + fi } && - complete -F _alias -o nospace alias + complete -F _comp_cmd_alias -o nospace alias # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/alpine b/usr/share/bash-completion/completions/alpine index 319c8d5c737..6844db005f5 100644 --- a/usr/share/bash-completion/completions/alpine +++ b/usr/share/bash-completion/completions/alpine @@ -1,32 +1,32 @@ # pine/alpine completion -*- shell-script -*- -_pine() +_comp_cmd_pine() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -help | -d | -f | -c | -I | -n | -url | -copy_pinerc | -copy_abook) return ;; - -attach | -attachlist | -attach_and_delete | -p | -P | -pinerc | -passfile | -x) - _filedir + -attach | -attachlist | -attach_and_delete | -p | -P | -pinerc | \ + -passfile | -x) + _comp_compgen_filedir return ;; -sort) - COMPREPLY=($(compgen -W 'arrival subject threaded orderedsubject - date from size score to cc' -- "$cur")) + _comp_compgen -- -W 'arrival subject threaded orderedsubject date + from size score to cc' return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur")) + _comp_compgen_help -- -h else - COMPREPLY=($(compgen -W '$(awk "{print \$1}" ~/.addressbook \ - 2>/dev/null)' -- "$cur")) + _comp_compgen_split -- "$(_comp_awk '{print $1}' ~/.addressbook 2>/dev/null)" fi } && - complete -F _pine pine alpine + complete -F _comp_cmd_pine pine alpine # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/alternatives b/usr/share/bash-completion/completions/alternatives index 25d2ce6b469..0d678fcc82a 100644 --- a/usr/share/bash-completion/completions/alternatives +++ b/usr/share/bash-completion/completions/alternatives @@ -1,8 +1,8 @@ # bash completion for update-alternatives -*- shell-script -*- -_installed_alternatives() +_comp_cmd_update_alternatives__installed() { - local admindir + local i admindir # find the admin dir for i in alternatives dpkg/alternatives rpm/alternatives; do [[ -d /var/lib/$i ]] && admindir=/var/lib/$i && break @@ -13,17 +13,17 @@ _installed_alternatives() break fi done - COMPREPLY=($(compgen -W '$(command ls $admindir)' -- "$cur")) + [[ -d $admindir ]] && _comp_compgen_split -- "$(command ls "$admindir")" } -_update_alternatives() +_comp_cmd_update_alternatives() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in --altdir | --admindir) - _filedir -d + _comp_compgen_filedir -d return ;; --help | --usage | --version) @@ -31,7 +31,7 @@ _update_alternatives() ;; esac - local mode args i + local mode="" args i # find which mode to use and how many real args used so far for ((i = 1; i < cword; i++)); do @@ -46,10 +46,10 @@ _update_alternatives() --install) case $args in 1 | 3) - _filedir + _comp_compgen_filedir ;; 2) - _installed_alternatives + _comp_cmd_update_alternatives__installed ;; 4) # priority - no completions @@ -57,13 +57,13 @@ _update_alternatives() *) case $((args % 4)) in 0 | 2) - _filedir + _comp_compgen_filedir ;; 1) - COMPREPLY=($(compgen -W '--slave' -- "$cur")) + _comp_compgen -- -W '--slave' ;; 3) - _installed_alternatives + _comp_cmd_update_alternatives__installed ;; esac ;; @@ -72,21 +72,21 @@ _update_alternatives() --remove | --set) case $args in 1) - _installed_alternatives + _comp_cmd_update_alternatives__installed ;; 2) - _filedir + _comp_compgen_filedir ;; esac ;; --auto | --remove-all | --display | --config) - _installed_alternatives + _comp_cmd_update_alternatives__installed ;; *) - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help ;; esac } && - complete -F _update_alternatives update-alternatives alternatives + complete -F _comp_cmd_update_alternatives update-alternatives alternatives # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/animate b/usr/share/bash-completion/completions/animate index ef7baea96e9..b01633bae49 100644 --- a/usr/share/bash-completion/completions/animate +++ b/usr/share/bash-completion/completions/animate @@ -1,125 +1,118 @@ # bash completion for ImageMagick -*- shell-script -*- -_ImageMagick() +_comp_cmd_convert__common_options() { case $prev in -channel) - COMPREPLY=($(compgen -W 'Red Green Blue Opacity Matte Cyan - Magenta Yellow Black' -- "$cur")) + _comp_compgen -- -W 'Red Green Blue Opacity Matte Cyan Magenta + Yellow Black' return ;; -colormap) - COMPREPLY=($(compgen -W 'shared private' -- "$cur")) + _comp_compgen -- -W 'shared private' return ;; -colorspace) - COMPREPLY=($(compgen -W 'GRAY OHTA RGB Transparent XYZ YCbCr YIQ - YPbPr YUV CMYK' -- "$cur")) + _comp_compgen -- -W 'GRAY OHTA RGB Transparent XYZ YCbCr YIQ YPbPr + YUV CMYK' return ;; -compose) - COMPREPLY=($(compgen -W 'Over In Out Atop Xor Plus Minus Add - Subtract Difference Multiply Bumpmap Copy CopyRed CopyGreen - CopyBlue CopyOpacity' -- "$cur")) + _comp_compgen -- -W 'Over In Out Atop Xor Plus Minus Add Subtract + Difference Multiply Bumpmap Copy CopyRed CopyGreen CopyBlue + CopyOpacity' return ;; -compress) - COMPREPLY=($(compgen -W 'None BZip Fax Group4 JPEG Lossless LZW - RLE Zip' -- "$cur")) + _comp_compgen -- -W 'None BZip Fax Group4 JPEG Lossless LZW RLE + Zip' return ;; -dispose) - COMPREPLY=($(compgen -W 'Undefined None Background Previous' \ - -- "$cur")) + _comp_compgen -- -W 'Undefined None Background Previous' return ;; -encoding) - COMPREPLY=($(compgen -W 'AdobeCustom AdobeExpert AdobeStandard + _comp_compgen -- -W 'AdobeCustom AdobeExpert AdobeStandard AppleRoman BIG5 GB2312 Latin2 None SJIScode Symbol Unicode - Wansung' -- "$cur")) + Wansung' return ;; -endian) - COMPREPLY=($(compgen -W 'MSB LSB' -- "$cur")) + _comp_compgen -- -W 'MSB LSB' return ;; -filter) - COMPREPLY=($(compgen -W 'Point Box Triangle Hermite Hanning - Hamming Blackman Gaussian Quadratic Cubic Catrom Mitchell - Lanczos Bessel Sinc' -- "$cur")) + _comp_compgen -- -W 'Point Box Triangle Hermite Hanning Hamming + Blackman Gaussian Quadratic Cubic Catrom Mitchell Lanczos + Bessel Sinc' return ;; -format) - COMPREPLY=($(compgen -W "$(convert -list format | awk \ - '/ [r-][w-][+-] / { sub("[*]$","",$1); print tolower($1) }')" \ - -- "$cur")) + _comp_compgen_split -- "$(convert -list format | _comp_awk \ + '/ [r-][w-][+-] / { sub("[*]$","",$1); print tolower($1) }')" return ;; -gravity) - COMPREPLY=($(compgen -W 'Northwest North NorthEast West Center - East SouthWest South SouthEast' -- "$cur")) + _comp_compgen -- -W 'Northwest North NorthEast West Center East + SouthWest South SouthEast' return ;; -intent) - COMPREPLY=($(compgen -W 'Absolute Perceptual Relative - Saturation' -- "$cur")) + _comp_compgen -- -W 'Absolute Perceptual Relative Saturation' return ;; -interlace) - COMPREPLY=($(compgen -W 'None Line Plane Partition' -- "$cur")) + _comp_compgen -- -W 'None Line Plane Partition' return ;; -limit) - COMPREPLY=($(compgen -W 'Disk File Map Memory' -- "$cur")) + _comp_compgen -- -W 'Disk File Map Memory' return ;; -list) - COMPREPLY=($(compgen -W 'Delegate Format Magic Module Resource - Type' -- "$cur")) + _comp_compgen -- -W 'Delegate Format Magic Module Resource Type' return ;; -map) - COMPREPLY=($(compgen -W 'best default gray red green blue' \ - -- "$cur")) - _filedir + _comp_compgen -- -W 'best default gray red green blue' + _comp_compgen -a filedir return ;; -noise) - COMPREPLY=($(compgen -W 'Uniform Gaussian Multiplicative - Impulse Laplacian Poisson' -- "$cur")) + _comp_compgen -- -W 'Uniform Gaussian Multiplicative Impulse + Laplacian Poisson' return ;; -preview) - COMPREPLY=($(compgen -W 'Rotate Shear Roll Hue Saturation - Brightness Gamma Spiff Dull Grayscale Quantize Despeckle - ReduceNoise AddNoise Sharpen Blur Treshold EdgeDetect Spread - Shade Raise Segment Solarize Swirl Implode Wave OilPaint - CharcoalDrawing JPEG' -- "$cur")) + _comp_compgen -- -W 'Rotate Shear Roll Hue Saturation Brightness + Gamma Spiff Dull Grayscale Quantize Despeckle ReduceNoise + AddNoise Sharpen Blur Threshold EdgeDetect Spread Shade Raise + Segment Solarize Swirl Implode Wave OilPaint CharcoalDrawing + JPEG' return ;; -mask | -profile | -texture | -tile | -write) - _filedir + _comp_compgen_filedir return ;; -type) - COMPREPLY=($(compgen -W 'Bilevel Grayscale Palette PaletteMatte + _comp_compgen -- -W 'Bilevel Grayscale Palette PaletteMatte TrueColor TrueColorMatte ColorSeparation ColorSeparationlMatte - Optimize' -- "$cur")) + Optimize' return ;; -units) - COMPREPLY=($(compgen -W 'Undefined PixelsPerInch - PixelsPerCentimeter' -- "$cur")) + _comp_compgen -- -W 'Undefined PixelsPerInch PixelsPerCentimeter' return ;; -virtual-pixel) - COMPREPLY=($(compgen -W 'Constant Edge mirror tile' -- "$cur")) + _comp_compgen -- -W 'Constant Edge mirror tile' return ;; -visual) - COMPREPLY=($(compgen -W 'StaticGray GrayScale StaticColor - PseudoColor TrueColor DirectColor defaut visualid' \ - -- "$cur")) + _comp_compgen -- -W 'StaticGray GrayScale StaticColor PseudoColor + TrueColor DirectColor default visualid' return ;; esac @@ -127,198 +120,197 @@ _ImageMagick() return 1 } -_convert() +_comp_cmd_convert() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+adjoin +append +compress +contrast +debug - +dither +endian +gamma +label +map +mask +matte +negate +noise - +page +raise +render +write' -- "$cur")) + _comp_compgen -- -W '+adjoin +append +compress +contrast +debug +dither + +endian +gamma +label +map +mask +matte +negate +noise +page +raise + +render +write' else - _filedir + _comp_compgen_filedir fi } && - complete -F _convert convert + complete -F _comp_cmd_convert convert -_mogrify() +_comp_cmd_mogrify() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+compress +contrast +debug +dither +endian - +gamma +label +map +mask +matte +negate +page +raise' -- "$cur")) + _comp_compgen -- -W '+compress +contrast +debug +dither +endian +gamma + +label +map +mask +matte +negate +page +raise' else - _filedir + _comp_compgen_filedir fi } && - complete -F _mogrify mogrify + complete -F _comp_cmd_mogrify mogrify -_display() +_comp_cmd_display() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+compress +contrast +debug +dither +endian - +gamma +label +map +matte +negate +page +raise +write' -- "$cur")) + _comp_compgen -- -W '+compress +contrast +debug +dither +endian +gamma + +label +map +matte +negate +page +raise +write' else - _filedir + _comp_compgen_filedir fi } && - complete -F _display display + complete -F _comp_cmd_display display -_animate() +_comp_cmd_animate() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+debug +dither +gamma +map +matte' \ - -- "$cur")) + _comp_compgen -- -W '+debug +dither +gamma +map +matte' else - _filedir + _comp_compgen_filedir fi } && - complete -F _animate animate + complete -F _comp_cmd_animate animate -_identify() +_comp_cmd_identify() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+debug' -- "$cur")) + _comp_compgen -- -W '+debug' else - _filedir + _comp_compgen_filedir fi } && - complete -F _identify identify + complete -F _comp_cmd_identify identify -_montage() +_comp_cmd_montage() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+adjoin +compress +debug +dither +endian - +gamma +label +matte +page' -- "$cur")) + _comp_compgen -- -W '+adjoin +compress +debug +dither +endian +gamma + +label +matte +page' else - _filedir + _comp_compgen_filedir fi } && - complete -F _montage montage + complete -F _comp_cmd_montage montage -_composite() +_comp_cmd_composite() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+compress +debug +dither +endian +label - +matte +negate +page +write' -- "$cur")) + _comp_compgen -- -W '+compress +debug +dither +endian +label +matte + +negate +page +write' else - _filedir + _comp_compgen_filedir fi } && - complete -F _composite composite + complete -F _comp_cmd_composite composite -_compare() +_comp_cmd_compare() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+debug' -- "$cur")) + _comp_compgen -- -W '+debug' else - _filedir + _comp_compgen_filedir fi } && - complete -F _compare compare + complete -F _comp_cmd_compare compare -_conjure() +_comp_cmd_conjure() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+debug' -- "$cur")) + _comp_compgen -- -W '+debug' else - _filedir + _comp_compgen_filedir fi } && - complete -F _conjure conjure + complete -F _comp_cmd_conjure conjure -_import() +_comp_cmd_import() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+debug' -- "$cur")) + _comp_compgen -- -W '+debug' else - _filedir + _comp_compgen_filedir fi } && - complete -F _import import + complete -F _comp_cmd_import import -_stream() +_comp_cmd_stream() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - _ImageMagick && return + _comp_cmd_convert__common_options && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -help)' -- "$cur")) + _comp_compgen_help -- -help elif [[ $cur == +* ]]; then - COMPREPLY=($(compgen -W '+debug' -- "$cur")) + _comp_compgen -- -W '+debug' else - _filedir + _comp_compgen_filedir fi } && - complete -F _stream stream + complete -F _comp_cmd_stream stream # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/ant b/usr/share/bash-completion/completions/ant index 197c0e96fbc..e4f9f298714 100644 --- a/usr/share/bash-completion/completions/ant +++ b/usr/share/bash-completion/completions/ant @@ -1,6 +1,6 @@ # bash completion for ant and phing -*- shell-script -*- -_ant_parse_targets() +_comp_cmd_ant__targets() { local line basedir @@ -9,9 +9,9 @@ _ant_parse_targets() # parse buildfile for targets while read -rd '>' line; do if [[ $line =~ \<(target|extension-point)[[:space:]].*name=[\"\']([^\"\']+) ]]; then - targets+=" ${BASH_REMATCH[2]}" + REPLY+=("${BASH_REMATCH[2]}") fi - done <$1 + done <"$1" # parse imports while read -rd '>' line; do @@ -19,39 +19,39 @@ _ant_parse_targets() local imported_buildfile imported_buildfile="${basedir}/${BASH_REMATCH[1]}" if [[ -f $imported_buildfile ]]; then - _ant_parse_targets $imported_buildfile + "$FUNCNAME" "$imported_buildfile" fi fi - done <$1 + done <"$1" } -_ant() +_comp_cmd_ant() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -h | -help | --h | --help | -projecthelp | -p | -version | -diagnostics) return ;; -buildfile | -file | -f) - _filedir 'xml' + _comp_compgen_filedir 'xml' return ;; -logfile | -l) - [[ $1 != *phing || $prev != -l ]] && _filedir + [[ $1 != *phing || $prev != -l ]] && _comp_compgen_filedir return ;; -propertyfile) - _filedir properties + _comp_compgen_filedir properties return ;; -nice) - COMPREPLY=($(compgen -W '{1..10}' -- "$cur")) + _comp_compgen -- -W '{1..10}' return ;; -lib) - _filedir -d + _comp_compgen_filedir -d return ;; -logger | -listener | -inputhandler | -main | -find | -s) @@ -64,8 +64,7 @@ _ant() elif [[ $cur == -* ]]; then # The /dev/null && - complete -C complete-ant-cmd.pl -F _ant ant || : + complete -F _comp_cmd_ant ant phing +if type complete-ant-cmd.pl &>/dev/null; then + complete -C complete-ant-cmd.pl -F _comp_cmd_ant ant +fi # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/apache2ctl b/usr/share/bash-completion/completions/apache2ctl index 980b3c58c84..08077888c99 100644 --- a/usr/share/bash-completion/completions/apache2ctl +++ b/usr/share/bash-completion/completions/apache2ctl @@ -1,16 +1,16 @@ # apache2ctl(1) completion -*- shell-script -*- -_apache2ctl() +_comp_cmd_apache2ctl() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local APWORDS - APWORDS=$($1 2>&1 >/dev/null | awk 'NR<2 { print $3; exit }' | + APWORDS=$("$1" 2>&1 >/dev/null | _comp_awk 'NR<2 { print $3; exit }' | tr "|" " ") - COMPREPLY=($(compgen -W "$APWORDS" -- "$cur")) + _comp_compgen -- -W "$APWORDS" } && - complete -F _apache2ctl apache2ctl + complete -F _comp_cmd_apache2ctl apache2ctl # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/appdata-validate b/usr/share/bash-completion/completions/appdata-validate index 03d8cc9a064..1b6149e4376 100644 --- a/usr/share/bash-completion/completions/appdata-validate +++ b/usr/share/bash-completion/completions/appdata-validate @@ -1,32 +1,31 @@ # appdata-validate(1) completion -*- shell-script -*- -_appdata_validate() +_comp_cmd_appdata_validate() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case $prev in -h | --help | --version) return ;; --output-format) - COMPREPLY=($(compgen -W "$($1 --help | - command sed -ne 's/--output-format.*\[\(.*\)\]/\1/' -e 's/|/ /gp')" \ - -- "$cur")) + _comp_compgen_split -- "$("$1" --help | command sed -ne \ + 's/--output-format.*\[\(.*\)\]/\1/' -e 's/|/ /gp')" return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir appdata.xml + _comp_compgen_filedir appdata.xml } && - complete -F _appdata_validate appdata-validate + complete -F _comp_cmd_appdata_validate appdata-validate # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/apropos b/usr/share/bash-completion/completions/apropos index 81d06f513ed..b405f0842b0 100644 --- a/usr/share/bash-completion/completions/apropos +++ b/usr/share/bash-completion/completions/apropos @@ -1,86 +1,95 @@ # man(1) completion -*- shell-script -*- -_man() +_comp_cmd_man() { - local cur prev words cword split - _init_completion -s -n : || return + local cur prev words cword was_split comp_args + _comp_initialize -s -n : -- "$@" || return - local comprsuffix=".@([glx]z|bz2|lzma|Z)" - local manext="@([0-9lnp]|[0-9][px]|man|3?(gl|pm))?($comprsuffix)" - local mansect="@([0-9lnp]|[0-9][px]|3?(gl|pm))" + local comprsuffix=".@([glx]z|bz2|lzma|Z|zst)" + local manext="@([0-9]*([a-z])|[lnp]|man)?($comprsuffix)" + local mansect="@([0-9]*([a-z])|[lnp])" + local noargopts='!(-*|*[ClMSsPpLmerRE]*)' + # shellcheck disable=SC2254 case $prev in - --config-file | -!(-*)C) - _filedir conf + --config-file | -${noargopts}C) + _comp_compgen_filedir conf return ;; - --local-file | -!(-*)l) - _filedir "$manext" + --local-file | -${noargopts}l) + _comp_compgen_filedir "$manext" return ;; - --manpath | -!(-*)M) - _filedir -d + --manpath | -${noargopts}M) + _comp_compgen_filedir -d return ;; - --pager | -!(-*)P) - compopt -o filenames - COMPREPLY=($(compgen -c -- "$cur")) + --sections | -${noargopts}[Ss]) + _comp_delimited : -W '{1..9}' return ;; - --preprocessor | -!(-*)p) - COMPREPLY=($(compgen -W 'e p t g r v' -- "$cur")) + --pager | -${noargopts}P) + _comp_compgen_commands + return + ;; + --preprocessor | -${noargopts}p) + _comp_compgen -- -W 'e p t g r v' return ;; --locale | --systems | --extension | --prompt | --recode | --encoding | \ - -!(-*)[LmerRE]) + -${noargopts}[LmerRE]) return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - local opts=$(_parse_help "$1" -h) - COMPREPLY=($(compgen -W '${opts:-$(_parse_usage "$1")}' -- "$cur")) + _comp_compgen_help -- -h || _comp_compgen_usage [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi # file based completion if parameter looks like a path - if [[ $cur == @(*/|[.~])* ]]; then - _filedir "$manext" + if _comp_looks_like_path "$cur"; then + _comp_compgen_filedir "$manext" return fi local manpath=$(manpath 2>/dev/null || command man -w 2>/dev/null) - [[ -z $manpath ]] && manpath="/usr/share/man:/usr/local/share/man" + if [[ ! $manpath ]]; then + # Note: Both "manpath" and "man -w" may be unavailable, in + # which case we determine the man paths based on the + # environment variable MANPATH. + manpath=:${MANPATH-}: + # Note: An empty path (represented by two consecutive colons + # or a preceding/trailing colon) represents the system man + # paths. + manpath=${manpath//::/':/usr/share/man:/usr/local/share/man:'} + manpath=${manpath:1:-1} + fi # determine manual section to search local sect # shellcheck disable=SC2053 [[ $prev == $mansect ]] && sect=$prev || sect='*' - _expand || return - - manpath=$manpath: - if [[ -n $cur ]]; then - manpath="${manpath//://*man$sect/$cur* } ${manpath//://*cat$sect/$cur* }" - else - manpath="${manpath//://*man$sect/ } ${manpath//://*cat$sect/ }" - fi - - local IFS=$' \t\n' reset=$(shopt -p failglob) - shopt -u failglob - # redirect stderr for when path doesn't exist - COMPREPLY=($(eval command ls "$manpath" 2>/dev/null)) - $reset + _comp_split -F : manpath "$manpath" + if ((${#manpath[@]})); then + local manfiles + _comp_compgen -Rv manfiles -- -S "/*man$sect/$cur*" -W '"${manpath[@]}"' + _comp_compgen -aRv manfiles -- -S "/*cat$sect/$cur*" -W '"${manpath[@]}"' - if ((${#COMPREPLY[@]} != 0)); then - # weed out directory path names and paths to man pages - COMPREPLY=(${COMPREPLY[@]##*/?(:)}) - # strip suffix from man pages - COMPREPLY=(${COMPREPLY[@]%$comprsuffix}) - COMPREPLY=($(compgen -W '${COMPREPLY[@]%.*}' -- "${cur//\\\\/}")) + local IFS= + if _comp_expand_glob COMPREPLY '${manfiles[@]}'; then + # weed out directory path names and paths to man pages (empty + # elements will be removed by the later `compgen -X ''`) + COMPREPLY=("${COMPREPLY[@]##*/?(:)}") + # strip suffix from man pages + COMPREPLY=("${COMPREPLY[@]%$comprsuffix}") + _comp_compgen -c "${cur//\\\\/}" -- -W '"${COMPREPLY[@]%.*}"' -X '' + fi + _comp_unlocal IFS fi # shellcheck disable=SC2053 @@ -88,14 +97,14 @@ _man() # File based completion for the rest, prepending ./ if needed # (man 1.6f needs that for man pages in current dir) local i start=${#COMPREPLY[@]} - _filedir "$manext" + _comp_compgen -a filedir "$manext" for ((i = start; i < ${#COMPREPLY[@]}; i++)); do [[ ${COMPREPLY[i]} == */* ]] || COMPREPLY[i]=./${COMPREPLY[i]} done fi - __ltrim_colon_completions "$cur" + _comp_ltrim_colon_completions "$cur" } && - complete -F _man man apropos whatis + complete -F _comp_cmd_man man apropos whatis # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/apt-build b/usr/share/bash-completion/completions/apt-build index 713f4c3948c..5327780de7f 100644 --- a/usr/share/bash-completion/completions/apt-build +++ b/usr/share/bash-completion/completions/apt-build @@ -1,26 +1,25 @@ # Debian apt-build(1) completion -*- shell-script -*- -_apt_build() +_comp_cmd_apt_build() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - local special i - for ((i = 1; i < ${#words[@]} - 1; i++)); do + local special="" i + for ((i = 1; i < cword; i++)); do if [[ ${words[i]} == @(install|remove|source|info|clean) ]]; then special=${words[i]} break fi done - if [[ -v special ]]; then + if [[ $special ]]; then case $special in install | source | info) - COMPREPLY=($(_xfunc apt-cache _apt_cache_packages)) + _comp_compgen -x apt-cache packages ;; remove) - COMPREPLY=( - $(_xfunc dpkg _comp_dpkg_installed_packages "$cur")) + _comp_compgen -x dpkg installed_packages ;; esac return @@ -28,7 +27,7 @@ _apt_build() case $prev in --patch | --build-dir | --repository-dir) - _filedir + _comp_compgen_filedir return ;; -h | --help) @@ -37,18 +36,17 @@ _apt_build() esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--help --show-upgraded -u --build-dir + _comp_compgen -- -W '--help --show-upgraded -u --build-dir --repository-dir --build-only --build-command --reinstall --rebuild --remove-builddep --no-wrapper --purge --patch --patch-strip -p - --yes -y --version -v --no-source' -- "$cur")) + --yes -y --version -v --no-source' else - COMPREPLY=($(compgen -W 'update upgrade install remove source - dist-upgrade world clean info clean-build update-repository' \ - -- "$cur")) + _comp_compgen -- -W 'update upgrade install remove source dist-upgrade + world clean info clean-build update-repository' fi } && - complete -F _apt_build apt-build + complete -F _comp_cmd_apt_build apt-build # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/apt-cache b/usr/share/bash-completion/completions/apt-cache index 61aa07bee31..1f47d7df9b1 100644 --- a/usr/share/bash-completion/completions/apt-cache +++ b/usr/share/bash-completion/completions/apt-cache @@ -1,32 +1,69 @@ # Debian apt-cache(8) completion -*- shell-script -*- # List APT binary packages +# @since 2.12 +_comp_xfunc_apt_cache_compgen_packages() +{ + _comp_cmd_apt_cache__compgen_packages apt-cache +} + +# List APT binary packages +# @param $1 Name of executable +_comp_cmd_apt_cache__compgen_packages() +{ + _comp_compgen_split -- "$("$1" --no-generate pkgnames "$cur" 2>/dev/null)" +} + +# List APT source packages +# @since 2.12 +_comp_xfunc_apt_cache_compgen_sources() +{ + _comp_cmd_apt_cache__compgen_sources apt-cache +} + +# List APT source packages +# @param $1 Name of executable +_comp_cmd_apt_cache__compgen_sources() +{ + _comp_compgen_split -- "$("$1" dumpavail | + _comp_awk '$1 == "Source:" { print $2 }' | sort -u)" +} + +# List APT binary packages +# @deprecated 2.12 _apt_cache_packages() { - apt-cache --no-generate pkgnames "$cur" 2>/dev/null || : + local packages + _comp_compgen -v packages -i apt-cache packages apt-cache && + printf '%s\n' "${packages[@]}" } # List APT source packages +# @deprecated 2.12 _apt_cache_sources() { - compgen -W "$(apt-cache dumpavail | - awk '$1 == "Source:" { print $2 }' | sort -u)" -- "$1" + local sources + _comp_compgen -v sources -c "$1" -i apt-cache sources apt-cache && + printf '%s\n' "${sources[@]}" } # List APT source packages +# @deprecated 2.12 _apt_cache_src_packages() { - compgen -W '$(_apt_cache_sources "$cur")' -- "$cur" + local sources + _comp_compgen -v sources -i apt-cache sources apt-cache && + printf '%s\n' "${sources[@]}" } -_apt_cache() +_comp_cmd_apt_cache() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - local special ispecial + local special="" ispecial if [[ $cur != show ]]; then - for ((ispecial = 1; ispecial < ${#words[@]} - 1; ispecial++)); do + for ((ispecial = 1; ispecial < ${#words[@]}; ispecial++)); do if [[ ${words[ispecial]} == @(add|depends|dotty|madison|policy|rdepends|show?(pkg|src|)) ]]; then special=${words[ispecial]} break @@ -34,27 +71,34 @@ _apt_cache() done fi - if [[ -v special && $ispecial -lt $cword ]]; then + if [[ $special && $ispecial -lt $cword ]]; then case $special in add) - _filedir + _comp_compgen_filedir ;; showsrc) - COMPREPLY=($(_apt_cache_sources "$cur")) + _comp_cmd_apt_cache__compgen_sources "$1" ;; *) - COMPREPLY=($(_apt_cache_packages)) + _comp_cmd_apt_cache__compgen_packages "$1" ;; esac return fi + local noargopts='!(-*|*[cps]*)' + # shellcheck disable=SC2254 case $prev in - --config-file | --pkg-cache | --src-cache | -!(-*)[cps]) - _filedir + --config-file | --pkg-cache | --src-cache | -${noargopts}[cps]) + _comp_compgen_filedir + return + ;; + --with-source) + _comp_compgen_filedir '@(deb|dsc|changes)' + _comp_compgen -a -- -f -o plusdirs -X '!?(*/)@(Sources|Packages)' return ;; search) @@ -65,21 +109,19 @@ _apt_cache() esac if [[ $cur == -* ]]; then - - COMPREPLY=($(compgen -W '-h -v -p -s -q -i -f -a -g -c -o --help - --version --pkg-cache --src-cache --quiet --important --full - --all-versions --no-all-versions --generate --no-generate - --names-only --all-names --recurse --config-file --option - --installed' -- "$cur")) - elif [[ ! -v special ]]; then - - COMPREPLY=($(compgen -W 'add gencaches show showpkg showsrc stats - dump dumpavail unmet search search depends rdepends pkgnames - dotty xvcg policy madison' -- "$cur")) - + _comp_compgen -- -W '--pkg-cache --src-cache --quiet --important + --no-pre-depends --no-depends --no-recommends --no-suggests + --no-conflicts --no-breaks --no-replaces --no-enhances --implicit + --full --all-versions --no-all-versions --generate --no-generate + --names-only --all-names --recurse --installed --with-source + --help --version --config-file --option' + elif [[ ! $special ]]; then + _comp_compgen -- -W 'gencaches showpkg stats showsrc dump dumpavail + unmet show search depends rdepends pkgnames dotty xvcg policy + madison' fi } && - complete -F _apt_cache apt-cache + complete -F _comp_cmd_apt_cache apt-cache # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/apt-get b/usr/share/bash-completion/completions/apt-get index 4aee2639791..4c62b257266 100644 --- a/usr/share/bash-completion/completions/apt-get +++ b/usr/share/bash-completion/completions/apt-get @@ -1,83 +1,93 @@ # Debian apt-get(8) completion -*- shell-script -*- -_apt_get() +# @since 2.12 +_comp_xfunc_apt_get_compgen_installed_packages() { - local cur prev words cword package - _init_completion -n ':=' || return + if [[ -f /etc/debian_version ]]; then + # Debian system + _comp_compgen -x dpkg installed_packages + else + # assume RPM based + _comp_compgen -x rpm installed_packages + fi +} - local special i - for ((i = 1; i < ${#words[@]} - 1; i++)); do - if [[ ${words[i]} == @(install|remove|autoremove|purge|source|build-dep|download|changelog) ]]; then +_comp_cmd_apt_get() +{ + local cur prev words cword comp_args package + _comp_initialize -n ':=' -- "$@" || return + + local special="" i + for ((i = 1; i < cword; i++)); do + if [[ ${words[i]} == @(install|remove|auto?(-)remove|purge|source|build-dep|download|changelog) ]]; then special=${words[i]} break fi done - if [[ -v special ]]; then + if [[ $special ]]; then case $special in - remove | autoremove | purge) - if [[ -f /etc/debian_version ]]; then - # Debian system - COMPREPLY=($( - _xfunc dpkg _comp_dpkg_installed_packages $cur - )) - else - # assume RPM based - _xfunc rpm _rpm_installed_packages - fi + remove | auto?(-)remove | purge) + _comp_xfunc_apt_get_compgen_installed_packages ;; source) - COMPREPLY=($(_xfunc apt-cache _apt_cache_packages) - $(compgen -W "$(apt-cache dumpavail | - awk '$1 == "Source:" { print $2 }' | sort -u)" -- "$cur")) + # Prefer `apt-cache` in the same dir as command + local pathcmd + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH + _comp_compgen -x apt-cache packages + _comp_compgen -a split -- "$(apt-cache dumpavail | + _comp_awk '$1 == "Source:" { print $2 }' | sort -u)" ;; - install) - if [[ $cur == */* ]]; then - _filedir deb + install | reinstall) + if _comp_looks_like_path "$cur"; then + _comp_compgen_filedir deb return elif [[ $cur == *=* ]]; then package="${cur%%=*}" cur="${cur#*=}" - COMPREPLY=($(IFS=$'\n' compgen -W "$( + _comp_compgen_split -l -- "$( apt-cache --no-generate madison "$package" 2>/dev/null | while IFS=' |' read -r _ version _; do echo "$version" done - )" \ - -- "$cur")) - __ltrim_colon_completions "$cur" + )" + _comp_ltrim_colon_completions "$cur" return fi ;;& build-dep) - _filedir -d - [[ $cur != */* ]] || return + _comp_compgen_filedir -d + _comp_looks_like_path "$cur" && return ;;& *) - COMPREPLY+=($(_xfunc apt-cache _apt_cache_packages)) + _comp_compgen -ax apt-cache packages ;; esac return fi + local noargopts='!(-*|*[eoct]*)' + # shellcheck disable=SC2254 case $prev in - --help | --version | --option | -!(-*)[hvo]) + --error-on | --help | --version | --option | -${noargopts}[ehvo]) return ;; - --config-file | -!(-*)c) - _filedir + --config-file | -${noargopts}c) + _comp_compgen_filedir return ;; - --target-release | --default-release | -!(-*)t) - COMPREPLY=($(compgen -W "$(apt-cache policy | command sed -ne \ - 's/^ *release.*[ ,]o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p')" \ - -- "$cur")) + --target-release | --default-release | -${noargopts}t) + # Prefer `apt-cache` in the same dir as command + local pathcmd + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH + _comp_compgen_split -- "$(apt-cache policy | command sed -ne \ + 's/^ *release.*[ ,]o=\(Debian\|Ubuntu\),a=\(\w*\).*/\2/p')" return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--no-install-recommends --install-suggests + _comp_compgen -- -W '--no-install-recommends --install-suggests --download-only --fix-broken --ignore-missing --fix-missing --no-download --quiet --simulate --just-print --dry-run --recon --no-act --yes --assume-yes --assume-no --no-show-upgraded @@ -89,16 +99,15 @@ _apt_get() --trivial-only --no-remove --auto-remove --autoremove --only-source --diff-only --dsc-only --tar-only --arch-only --indep-only --allow-unauthenticated --no-allow-insecure-repositories - --allow-releaseinfo-change --show-progress --with-source --help - --version --config-file --option' -- "$cur")) + --allow-releaseinfo-change --show-progress --with-source --error-on + --help --version --config-file --option' else - COMPREPLY=($(compgen -W 'update upgrade dist-upgrade - dselect-upgrade install remove purge source build-dep check - download clean autoclean autoremove changelog indextargets' \ - -- "$cur")) + _comp_compgen -- -W 'update upgrade dist-upgrade dselect-upgrade + install reinstall remove purge source build-dep satisfy check + download clean autoclean autoremove changelog indextargets' fi } && - complete -F _apt_get apt-get + complete -F _comp_cmd_apt_get apt-get # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/apt-mark b/usr/share/bash-completion/completions/apt-mark new file mode 100644 index 00000000000..7ef3f7680f4 --- /dev/null +++ b/usr/share/bash-completion/completions/apt-mark @@ -0,0 +1,64 @@ +# Debian apt-mark(8) completion -*- shell-script -*- + +_comp_cmd_apt_mark() +{ + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + + local special="" i + for ((i = 1; i < cword; i++)); do + if [[ ${words[i]} == @(auto|manual|minimize-manual|showauto|showmanual|hold|unhold|showhold|install|remove|deinstall|purge|showinstall|showremove|showpurge) ]]; then + special=${words[i]} + break + fi + done + + if [[ $special ]]; then + case $special in + auto | manual | unhold) + local -A showcmds=([auto]=manual [manual]=auto [unhold]=hold) + local showcmd=${showcmds[$special]} + _comp_compgen_split -- "$("$1" "show$showcmd" 2>/dev/null)" + return + ;; + minimize-manual) + return + ;; + *) + _comp_compgen -x apt-get installed_packages + ;; + esac + return + fi + + local noargopts='!(-*|*[ocf]*)' + # shellcheck disable=SC2254 + case $prev in + --help | --version | --option | -${noargopts}[hvo]) + return + ;; + --config-file | -${noargopts}c) + _comp_compgen_filedir conf + return + ;; + --file | -${noargopts}f) + _comp_compgen_filedir + return + ;; + esac + + [[ $was_split ]] && return + + if [[ $cur == -* ]]; then + _comp_compgen -- -W '--file= --help --version --config-file --option' + [[ ${COMPREPLY-} == *= ]] && compopt -o nospace + else + _comp_compgen -- -W 'auto manual minimize-manual showauto showmanual + hold unhold showhold install remove purge showinstall showremove + showpurge' + fi + +} && + complete -F _comp_cmd_apt_mark apt-mark + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aptitude b/usr/share/bash-completion/completions/aptitude index e5ea16360df..827395a02ba 100644 --- a/usr/share/bash-completion/completions/aptitude +++ b/usr/share/bash-completion/completions/aptitude @@ -1,24 +1,11 @@ # Debian aptitude(1) completion -*- shell-script -*- -_have grep-status && { - _comp_dpkg_hold_packages() - { - grep-status -P -e "^$1" -a -FStatus 'hold' -n -s Package - } -} || { - _comp_dpkg_hold_packages() - { - command grep -B 2 'hold' /var/lib/dpkg/status | - awk "/Package: $1/ { print \$2 }" - } -} - -_aptitude() +_comp_cmd_aptitude() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - local special i + local special="" i for ((i = 1; i < ${#words[@]} - 1; i++)); do if [[ ${words[i]} == @(@(|re)install|@(|un)hold|@(|un)markauto|@(dist|full|safe)-upgrade|download|show|forbid-version|purge|remove|changelog|why@(|-not)|keep@(|-all)|build-dep|@(add|remove)-user-tag|versions) ]]; then special=${words[i]} @@ -26,65 +13,65 @@ _aptitude() fi done - if [[ -v special ]]; then + if [[ $special ]]; then case $special in install | hold | markauto | unmarkauto | dist-upgrade | full-upgrade | \ safe-upgrade | download | show | changelog | why | why-not | build-dep | \ add-user-tag | remove-user-tag | versions) - COMPREPLY=($(_xfunc apt-cache _apt_cache_packages)) + _comp_compgen -x apt-cache packages return ;; purge | remove | reinstall | forbid-version) - COMPREPLY=( - $(_xfunc dpkg _comp_dpkg_installed_packages "$cur")) + _comp_compgen -x dpkg installed_packages return ;; unhold) - COMPREPLY=($(_comp_dpkg_hold_packages "$cur")) + _comp_compgen -x dpkg held_packages return ;; esac fi + local noargopts='!(-*|*[SwFoOt]*)' + # shellcheck disable=SC2254 case $prev in # don't complete anything if these options are found autoclean | clean | forget-new | search | upgrade | update | keep-all) return ;; - -!(-*)S) - _filedir + -${noargopts}S) + _comp_compgen_filedir return ;; - --display-format | --width | -!(-*)[wFo]) + --display-format | --width | -${noargopts}[wFo]) return ;; - --sort | -!(-*)O) - COMPREPLY=($(compgen -W 'installsize installsizechange debsize - name priority version' -- "$cur")) + --sort | -${noargopts}O) + _comp_compgen -- -W 'installsize installsizechange debsize name + priority version' return ;; - --target-release | --default-release | -!(-*)t) - COMPREPLY=($(apt-cache policy | - command grep "release.o=Debian,a=$cur" | - command sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2>/dev/null)) + --target-release | --default-release | -${noargopts}t) + _comp_compgen_split -l -- "$(apt-cache policy | + command sed -ne 's/.*release.o=Debian,a=\([_[:alnum:]]*\).*/\1/p')" return ;; esac if [[ $cur == -* ]]; then - local opts=" $($1 --help 2>&1 | command sed -e \ - 's/--with(out)-recommends/--without-recommends\n--with-recommends/' | - _parse_help - | tr '\n' ' ') " + _comp_compgen -R help - <<<"$("$1" --help 2>&1 | command sed -e \ + 's/--with(out)-recommends/--without-recommends\n--with-recommends/')" + ((${#COMPREPLY[@]})) || return 0 # Exclude some mutually exclusive options + local exclude_flags="" for i in "${words[@]}"; do - [[ $i == -u ]] && opts=${opts/ -i / } - [[ $i == -i ]] && opts=${opts/ -u / } + [[ $i == -u ]] && exclude_flags+=i + [[ $i == -i ]] && exclude_flags+=u done # Do known short -> long replacements; at least up to 0.8.12, --help # outputs mostly only short ones. - COMPREPLY=($opts) for i in "${!COMPREPLY[@]}"; do case ${COMPREPLY[i]} in -h) COMPREPLY[i]=--help ;; @@ -104,16 +91,17 @@ _aptitude() esac done - COMPREPLY=($(compgen -W '${COMPREPLY[@]}' -- "$cur")) + _comp_compgen -- -W '"${COMPREPLY[@]}"' \ + ${exclude_flags:+-X "-[$exclude_flags]"} else - COMPREPLY=($(compgen -W 'update upgrade safe-upgrade forget-new - clean autoclean install reinstall remove hold unhold purge markauto + _comp_compgen -- -W 'update upgrade safe-upgrade forget-new clean + autoclean install reinstall remove hold unhold purge markauto unmarkauto why why-not dist-upgrade full-upgrade download search show forbid-version changelog keep keep-all build-dep add-user-tag - remove-user-tag versions' -- "$cur")) + remove-user-tag versions' fi } && - complete -F _aptitude -o default aptitude aptitude-curses + complete -F _comp_cmd_aptitude -o default aptitude aptitude-curses # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aptitude-curses b/usr/share/bash-completion/completions/aptitude-curses index e5ea16360df..827395a02ba 100644 --- a/usr/share/bash-completion/completions/aptitude-curses +++ b/usr/share/bash-completion/completions/aptitude-curses @@ -1,24 +1,11 @@ # Debian aptitude(1) completion -*- shell-script -*- -_have grep-status && { - _comp_dpkg_hold_packages() - { - grep-status -P -e "^$1" -a -FStatus 'hold' -n -s Package - } -} || { - _comp_dpkg_hold_packages() - { - command grep -B 2 'hold' /var/lib/dpkg/status | - awk "/Package: $1/ { print \$2 }" - } -} - -_aptitude() +_comp_cmd_aptitude() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - local special i + local special="" i for ((i = 1; i < ${#words[@]} - 1; i++)); do if [[ ${words[i]} == @(@(|re)install|@(|un)hold|@(|un)markauto|@(dist|full|safe)-upgrade|download|show|forbid-version|purge|remove|changelog|why@(|-not)|keep@(|-all)|build-dep|@(add|remove)-user-tag|versions) ]]; then special=${words[i]} @@ -26,65 +13,65 @@ _aptitude() fi done - if [[ -v special ]]; then + if [[ $special ]]; then case $special in install | hold | markauto | unmarkauto | dist-upgrade | full-upgrade | \ safe-upgrade | download | show | changelog | why | why-not | build-dep | \ add-user-tag | remove-user-tag | versions) - COMPREPLY=($(_xfunc apt-cache _apt_cache_packages)) + _comp_compgen -x apt-cache packages return ;; purge | remove | reinstall | forbid-version) - COMPREPLY=( - $(_xfunc dpkg _comp_dpkg_installed_packages "$cur")) + _comp_compgen -x dpkg installed_packages return ;; unhold) - COMPREPLY=($(_comp_dpkg_hold_packages "$cur")) + _comp_compgen -x dpkg held_packages return ;; esac fi + local noargopts='!(-*|*[SwFoOt]*)' + # shellcheck disable=SC2254 case $prev in # don't complete anything if these options are found autoclean | clean | forget-new | search | upgrade | update | keep-all) return ;; - -!(-*)S) - _filedir + -${noargopts}S) + _comp_compgen_filedir return ;; - --display-format | --width | -!(-*)[wFo]) + --display-format | --width | -${noargopts}[wFo]) return ;; - --sort | -!(-*)O) - COMPREPLY=($(compgen -W 'installsize installsizechange debsize - name priority version' -- "$cur")) + --sort | -${noargopts}O) + _comp_compgen -- -W 'installsize installsizechange debsize name + priority version' return ;; - --target-release | --default-release | -!(-*)t) - COMPREPLY=($(apt-cache policy | - command grep "release.o=Debian,a=$cur" | - command sed -e "s/.*a=\(\w*\).*/\1/" | uniq 2>/dev/null)) + --target-release | --default-release | -${noargopts}t) + _comp_compgen_split -l -- "$(apt-cache policy | + command sed -ne 's/.*release.o=Debian,a=\([_[:alnum:]]*\).*/\1/p')" return ;; esac if [[ $cur == -* ]]; then - local opts=" $($1 --help 2>&1 | command sed -e \ - 's/--with(out)-recommends/--without-recommends\n--with-recommends/' | - _parse_help - | tr '\n' ' ') " + _comp_compgen -R help - <<<"$("$1" --help 2>&1 | command sed -e \ + 's/--with(out)-recommends/--without-recommends\n--with-recommends/')" + ((${#COMPREPLY[@]})) || return 0 # Exclude some mutually exclusive options + local exclude_flags="" for i in "${words[@]}"; do - [[ $i == -u ]] && opts=${opts/ -i / } - [[ $i == -i ]] && opts=${opts/ -u / } + [[ $i == -u ]] && exclude_flags+=i + [[ $i == -i ]] && exclude_flags+=u done # Do known short -> long replacements; at least up to 0.8.12, --help # outputs mostly only short ones. - COMPREPLY=($opts) for i in "${!COMPREPLY[@]}"; do case ${COMPREPLY[i]} in -h) COMPREPLY[i]=--help ;; @@ -104,16 +91,17 @@ _aptitude() esac done - COMPREPLY=($(compgen -W '${COMPREPLY[@]}' -- "$cur")) + _comp_compgen -- -W '"${COMPREPLY[@]}"' \ + ${exclude_flags:+-X "-[$exclude_flags]"} else - COMPREPLY=($(compgen -W 'update upgrade safe-upgrade forget-new - clean autoclean install reinstall remove hold unhold purge markauto + _comp_compgen -- -W 'update upgrade safe-upgrade forget-new clean + autoclean install reinstall remove hold unhold purge markauto unmarkauto why why-not dist-upgrade full-upgrade download search show forbid-version changelog keep keep-all build-dep add-user-tag - remove-user-tag versions' -- "$cur")) + remove-user-tag versions' fi } && - complete -F _aptitude -o default aptitude aptitude-curses + complete -F _comp_cmd_aptitude -o default aptitude aptitude-curses # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/arch b/usr/share/bash-completion/completions/arch index afeed05d498..e03056fba4e 100644 --- a/usr/share/bash-completion/completions/arch +++ b/usr/share/bash-completion/completions/arch @@ -2,27 +2,27 @@ # Try to detect whether this is the mailman "arch" to avoid installing # it for the coreutils/util-linux-ng one. -_have mailmanctl && - _arch() +_comp_have_command mailmanctl && + _comp_cmd_arch() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case $prev in -w | -g | -d | --welcome-msg | --goodbye-msg | --digest) - COMPREPLY=($(compgen -W 'y n' -- "$cur")) + _comp_compgen -- -W 'y n' return ;; --file) - _filedir + _comp_compgen_filedir return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help else local args=$cword for ((i = 1; i < cword; i++)); do @@ -32,15 +32,18 @@ _have mailmanctl && done case $args in 1) - _xfunc list_lists _mailman_lists + # Prefer `list_lists` in the same dir as command + local pathcmd + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH + _comp_compgen -x list_lists mailman_lists ;; 2) - _filedir + _comp_compgen_filedir ;; esac fi } && - complete -F _arch arch + complete -F _comp_cmd_arch arch # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/arm-koji b/usr/share/bash-completion/completions/arm-koji index 8efef9a7fae..8ee43906c0d 100644 --- a/usr/share/bash-completion/completions/arm-koji +++ b/usr/share/bash-completion/completions/arm-koji @@ -1,74 +1,76 @@ # koji completion -*- shell-script -*- -_koji_search() +_comp_cmd_koji__search() { - COMPREPLY+=($(compgen -W \ - '$("$1" -q search $2 "$cur*" 2>/dev/null)' -- "$cur")) + _comp_compgen -a split -- "$("$1" -q search "$2" "$cur*" 2>/dev/null)" } -_koji_build() +_comp_cmd_koji__build() { - _koji_search "$1" build + _comp_cmd_koji__search "$1" build } -_koji_package() +_comp_cmd_koji__package() { - _koji_search "$1" package + _comp_cmd_koji__search "$1" package } -_koji_user() +_comp_cmd_koji__user() { - _koji_search "$1" user + _comp_cmd_koji__search "$1" user } -_koji_tag() +_comp_cmd_koji__tag() { - COMPREPLY+=($(compgen -W '$("$1" -q list-tags 2>/dev/null)' -- "$cur")) + _comp_compgen -a split -- "$("$1" -q list-tags 2>/dev/null)" } -_koji_target() +_comp_cmd_koji__target() { - COMPREPLY+=($(compgen -W '$("$1" -q list-targets 2>/dev/null | - awk "{ print \$1 }")' -- "$cur")) + _comp_compgen -a split -- "$("$1" -q list-targets 2>/dev/null | + _comp_awk '{ print $1 }')" } -_koji() +_comp_cmd_koji() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return - local commandix command + local commandix command="" has_command="" for ((commandix = 1; commandix < cword; commandix++)); do if [[ ${words[commandix]} != -* ]]; then command=${words[commandix]} + has_command=set break fi done + local noargopts='!(-*|*[co]*)' + # shellcheck disable=SC2254 case $prev in - --help | --help-commands | -!(-*)h*) + --help | --help-commands | -${noargopts}h*) return ;; - --config | --keytab | -!(-*)[co]) - _filedir + --config | --keytab | -${noargopts}[co]) + _comp_compgen_filedir return ;; --runas | --user | --editor | --by) - _koji_user "$1" + _comp_cmd_koji__user "$1" return ;; --authtype) - COMPREPLY=($(compgen -W 'noauth ssl password kerberos' -- "$cur")) + _comp_compgen -- -W 'noauth ssl password kerberos' return ;; --topdir) - _filedir -d + _comp_compgen_filedir -d return ;; --type) case ${command-} in latest-pkg | list-tagged) - COMPREPLY=($(compgen -W 'maven' -- "$cur")) + _comp_compgen -- -W 'maven' ;; esac return @@ -76,39 +78,38 @@ _koji() --name) case ${command-} in list-targets) - _koji_target "$1" + _comp_cmd_koji__target "$1" ;; esac return ;; --owner) - _koji_user "$1" + _comp_cmd_koji__user "$1" return ;; --tag | --latestfrom) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" return ;; --package) - _koji_package "$1" + _comp_cmd_koji__package "$1" return ;; --build) - _koji_build "$1" + _comp_cmd_koji__build "$1" return ;; --build-target) - _koji_target "$1" + _comp_cmd_koji__target "$1" return ;; esac - $split && return + [[ $was_split ]] && return - if [[ -v command ]]; then + if [[ $has_command ]]; then if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W \ - '$(_parse_help "$1" "$command --help")' -- "$cur")) + _comp_compgen_help -- "$command" --help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi @@ -123,108 +124,108 @@ _koji() build | maven-build | win-build) case $nth in 1) - _koji_target "$1" + _comp_cmd_koji__target "$1" ;; 2) - _filedir src.rpm + _comp_compgen_filedir src.rpm ;; esac ;; cancel) - _koji_build "$1" + _comp_cmd_koji__build "$1" ;; chain-build) case $nth in 1) - _koji_target "$1" + _comp_cmd_koji__target "$1" ;; esac ;; download-build) case $nth in 1) - _koji_build "$1" + _comp_cmd_koji__build "$1" ;; esac ;; import-comps) case $nth in 1) - _filedir xml + _comp_compgen_filedir xml ;; 2) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; esac ;; latest-by-tag) - _koji_package "$1" + _comp_cmd_koji__package "$1" ;; latest-pkg | list-groups | list-tag-inheritance | show-groups) case $nth in 1) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; esac ;; list-tagged) case $nth in 1) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; 2) - _koji_package "$1" + _comp_cmd_koji__package "$1" ;; esac ;; list-untagged) case $nth in 1) - _koji_package "$1" + _comp_cmd_koji__package "$1" ;; esac ;; move-pkg) case $nth in 1 | 2) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; *) - _koji_package "$1" + _comp_cmd_koji__package "$1" ;; esac ;; search) case $nth in 1) - COMPREPLY=($(compgen -W 'package build tag target - user host rpm' -- "$cur")) + _comp_compgen -- -W 'package build tag target user host + rpm' ;; esac ;; tag-pkg | untag-pkg) case $nth in 1) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; *) - _koji_package "$1" + _comp_cmd_koji__package "$1" ;; esac ;; taginfo) - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; wait-repo) case $nth in 1) for ((i = commandix + 1; i < cword; i++)); do if [[ ${words[i]} == --target ]]; then - _koji_target "$1" + _comp_cmd_koji__target "$1" return fi done - _koji_tag "$1" + _comp_cmd_koji__tag "$1" ;; esac ;; @@ -233,13 +234,13 @@ _koji() fi if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace - elif [[ ! -v command ]]; then - COMPREPLY=($(compgen -W '$("$1" --help-commands 2>/dev/null | \ - awk "/^( +|\t)/ { print \$1 }")' -- "$cur")) + elif [[ ! $has_command ]]; then + _comp_compgen_split -- "$("$1" --help-commands 2>/dev/null | + _comp_awk '/^( +|\t)/ { print $1 }')" fi } && - complete -F _koji koji arm-koji ppc-koji s390-koji sparc-koji + complete -F _comp_cmd_koji koji arm-koji ppc-koji s390-koji sparc-koji # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/arp b/usr/share/bash-completion/completions/arp index 922e800aaed..3d1669ad3bb 100644 --- a/usr/share/bash-completion/completions/arp +++ b/usr/share/bash-completion/completions/arp @@ -1,43 +1,45 @@ -# arp(8) completion -*- shell-script -*- +# arp(8) completion -*- shell-script -*- -_arp() +_comp_cmd_arp() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return + local noargopts='!(-*|*[iApfHt]*)' + # shellcheck disable=SC2254 case $prev in - --device | -!(-*)i) - _available_interfaces -a + --device | -${noargopts}i) + _comp_compgen_available_interfaces -a return ;; - --protocol | -!(-*)[Ap]) + --protocol | -${noargopts}[Ap]) # TODO protocol/address family return ;; - --file | -!(-*)f) - _filedir + --file | -${noargopts}f) + _comp_compgen_filedir return ;; - --hw-type | -!(-*)[Ht]) + --hw-type | -${noargopts}[Ht]) # TODO: parse from --help output? - COMPREPLY=($(compgen -W 'ash ether ax25 netrom rose arcnet \ - dlci fddi hippi irda x25 eui64' -- "$cur")) + _comp_compgen -- -W 'ash ether ax25 netrom rose arcnet dlci fddi + hippi irda x25 eui64' return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help || _comp_compgen_usage return fi - local args - _count_args "" "@(--device|--protocol|--file|--hw-type|-!(-*)[iApfHt])" - case $args in + local REPLY + _comp_count_args -a "@(--device|--protocol|--file|--hw-type|-${noargopts}[iApfHt])" + case $REPLY in 1) local ips=$("$1" -an | command sed -ne \ 's/.*(\([0-9]\{1,3\}\(\.[0-9]\{1,3\}\)\{3\}\)).*/\1/p') - COMPREPLY=($(compgen -W '$ips' -- "$cur")) + _comp_compgen -- -W '$ips' ;; 2) # TODO if -d mode: "pub"; if not -f mode: hw_addr @@ -54,6 +56,6 @@ _arp() ;; esac } && - complete -F _arp arp + complete -F _comp_cmd_arp arp # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/arping b/usr/share/bash-completion/completions/arping index 57e1e19b471..c69fc2d266d 100644 --- a/usr/share/bash-completion/completions/arping +++ b/usr/share/bash-completion/completions/arping @@ -1,31 +1,31 @@ # arping(8) completion -*- shell-script -*- -_arping() +_comp_cmd_arping() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*c | -*w) return ;; -*I) - _available_interfaces -a + _comp_compgen_available_interfaces -a return ;; -*s) - _ip_addresses + _comp_compgen_ip_addresses return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" -h)' -- "$cur")) + _comp_compgen_help -- -h return fi - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" } && - complete -F _arping arping + complete -F _comp_cmd_arping arping # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/arpspoof b/usr/share/bash-completion/completions/arpspoof index d1a1373593b..8939f2d5ed4 100644 --- a/usr/share/bash-completion/completions/arpspoof +++ b/usr/share/bash-completion/completions/arpspoof @@ -1,28 +1,28 @@ # arpspoof completion -*- shell-script -*- -_arpspoof() +_comp_cmd_arpspoof() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -i) - _available_interfaces -a + _comp_compgen_available_interfaces -a return ;; -t) - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur")) + _comp_compgen_usage else - _known_hosts_real -- "$cur" + _comp_compgen_known_hosts -- "$cur" fi } && - complete -F _arpspoof arpspoof + complete -F _comp_cmd_arpspoof arpspoof # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/asciidoc b/usr/share/bash-completion/completions/asciidoc index 1ea4abf2e96..7e77857237d 100644 --- a/usr/share/bash-completion/completions/asciidoc +++ b/usr/share/bash-completion/completions/asciidoc @@ -1,52 +1,60 @@ # asciidoc(1) completion -*- shell-script -*- +# @since 2.12 +_comp_xfunc_asciidoc_compgen_doctype() +{ + _comp_compgen -- -W 'article book manpage' +} + +# @deprecated 2.12 _asciidoc_doctype() { - COMPREPLY+=($(compgen -W 'article book manpage' -- "$cur")) + _comp_compgen -ax asciidoc doctype } -_asciidoc() +_comp_cmd_asciidoc() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[abfdo]*)' + # shellcheck disable=SC2254 case $prev in - --attribute | -!(-*)a) + --attribute | -${noargopts}a) return ;; - --backend | -!(-*)b) - COMPREPLY=($(compgen -W 'docbook html4 xhtml11' -- "$cur")) + --backend | -${noargopts}b) + _comp_compgen -- -W 'docbook html4 xhtml11' return ;; - --conf-file | -!(-*)f) - _filedir conf + --conf-file | -${noargopts}f) + _comp_compgen_filedir conf return ;; - --doctype | -!(-*)d) - _asciidoc_doctype + --doctype | -${noargopts}d) + _comp_xfunc_asciidoc_compgen_doctype return ;; - --help | -!(-*)h) - COMPREPLY=($(compgen -W 'manpage syntax topics' -- "$cur")) + --help | -${noargopts}h) + _comp_compgen -- -W 'manpage syntax topics' return ;; - --out-file | -!(-*)o) - _filedir + --out-file | -${noargopts}o) + _comp_compgen_filedir return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" "--help manpage")' \ - -- "$cur")) + _comp_compgen_help -- --help manpage [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _asciidoc asciidoc asciidoc.py + complete -F _comp_cmd_asciidoc asciidoc asciidoc.py # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/asciidoc.py b/usr/share/bash-completion/completions/asciidoc.py index 1ea4abf2e96..7e77857237d 100644 --- a/usr/share/bash-completion/completions/asciidoc.py +++ b/usr/share/bash-completion/completions/asciidoc.py @@ -1,52 +1,60 @@ # asciidoc(1) completion -*- shell-script -*- +# @since 2.12 +_comp_xfunc_asciidoc_compgen_doctype() +{ + _comp_compgen -- -W 'article book manpage' +} + +# @deprecated 2.12 _asciidoc_doctype() { - COMPREPLY+=($(compgen -W 'article book manpage' -- "$cur")) + _comp_compgen -ax asciidoc doctype } -_asciidoc() +_comp_cmd_asciidoc() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[abfdo]*)' + # shellcheck disable=SC2254 case $prev in - --attribute | -!(-*)a) + --attribute | -${noargopts}a) return ;; - --backend | -!(-*)b) - COMPREPLY=($(compgen -W 'docbook html4 xhtml11' -- "$cur")) + --backend | -${noargopts}b) + _comp_compgen -- -W 'docbook html4 xhtml11' return ;; - --conf-file | -!(-*)f) - _filedir conf + --conf-file | -${noargopts}f) + _comp_compgen_filedir conf return ;; - --doctype | -!(-*)d) - _asciidoc_doctype + --doctype | -${noargopts}d) + _comp_xfunc_asciidoc_compgen_doctype return ;; - --help | -!(-*)h) - COMPREPLY=($(compgen -W 'manpage syntax topics' -- "$cur")) + --help | -${noargopts}h) + _comp_compgen -- -W 'manpage syntax topics' return ;; - --out-file | -!(-*)o) - _filedir + --out-file | -${noargopts}o) + _comp_compgen_filedir return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1" "--help manpage")' \ - -- "$cur")) + _comp_compgen_help -- --help manpage [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _asciidoc asciidoc asciidoc.py + complete -F _comp_cmd_asciidoc asciidoc asciidoc.py # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/aspell b/usr/share/bash-completion/completions/aspell index e080a07d3bb..89dae17a650 100644 --- a/usr/share/bash-completion/completions/aspell +++ b/usr/share/bash-completion/completions/aspell @@ -1,65 +1,66 @@ # bash completion for aspell -*- shell-script -*- -_aspell_dictionary() +_comp_cmd_aspell__dictionary() { - local datadir aspell=${1:-aspell} - datadir=$($aspell config data-dir 2>/dev/null || echo /usr/lib/aspell) + local datadir aspell=$1 + datadir=$("$aspell" config data-dir 2>/dev/null || echo /usr/lib/aspell) # First, get aliases (dicts dump does not list them) - COMPREPLY=($(printf '%s\n' $datadir/*.alias)) - COMPREPLY=("${COMPREPLY[@]%.alias}") - COMPREPLY=("${COMPREPLY[@]#$datadir/}") + if _comp_expand_glob COMPREPLY '"$datadir"/*.alias'; then + COMPREPLY=("${COMPREPLY[@]%.alias}") + COMPREPLY=("${COMPREPLY[@]#$datadir/}") + fi # Then, add the canonical dicts - COMPREPLY+=($($aspell dicts 2>/dev/null)) - COMPREPLY=($(compgen -X '\*' -W '${COMPREPLY[@]}' -- "$cur")) + _comp_split -a COMPREPLY "$("$aspell" dicts 2>/dev/null)" + ((${#COMPREPLY[@]})) && + _comp_compgen -- -X '\*' -W '"${COMPREPLY[@]}"' } -_aspell() +_comp_cmd_aspell() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case $prev in -c | -p | check | --conf | --personal | --repl | --per-conf) - _filedir + _comp_compgen_filedir return ;; --conf-dir | --data-dir | --dict-dir | --home-dir | --local-data-dir | --prefix) - _filedir -d + _comp_compgen_filedir -d return ;; dump | create | merge) - COMPREPLY=($(compgen -W 'master personal repl' -- "$cur")) + _comp_compgen -- -W 'master personal repl' return ;; --mode) - COMPREPLY=($(compgen -W "$($1 modes 2>/dev/null | - awk '{ print $1 }')" -- "$cur")) + _comp_compgen_split -- "$("$1" modes 2>/dev/null | + _comp_awk '{ print $1 }')" return ;; --sug-mode) - COMPREPLY=($(compgen -W 'ultra fast normal bad-speller' \ - -- "$cur")) + _comp_compgen -- -W 'ultra fast normal bad-speller' return ;; --keymapping) - COMPREPLY=($(compgen -W 'aspell ispell' -- "$cur")) + _comp_compgen -- -W 'aspell ispell' return ;; -d | --master) - _aspell_dictionary "$1" + _comp_cmd_aspell__dictionary "$1" return ;; --add-filter | --rem-filter) - COMPREPLY=($(compgen -W "$($1 filters 2>/dev/null | - awk '{ print $1 }')" -- "$cur")) + _comp_compgen_split -- "$("$1" filters 2>/dev/null | + _comp_awk '{ print $1 }')" return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--conf= --conf-dir= --data-dir= --dict-dir= + _comp_compgen -- -W '--conf= --conf-dir= --data-dir= --dict-dir= --encoding= --add-filter= --rem-filter= --mode= --add-extra-dicts= --rem-extra-dicts= --home-dir= --ignore= --ignore-accents --dont-ignore-accents --ignore-case --dont-ignore-case @@ -76,13 +77,13 @@ _aspell() --add-tex-command= --rem-tex-command= --tex-check-comments --dont-tex-check-comments --add-tex-extension --rem-tex-extension --add-sgml-check= --rem-sgml-check= --add-sgml-extension - --rem-sgml-extension' -- "$cur")) + --rem-sgml-extension' [[ ${COMPREPLY-} == *= ]] && compopt -o nospace else - COMPREPLY=($(compgen -W 'usage help check pipe list config soundslike - filter version dump create merge' -- "$cur")) + _comp_compgen -- -W 'usage help check pipe list config soundslike + filter version dump create merge' fi } && - complete -F _aspell aspell + complete -F _comp_cmd_aspell aspell # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autoconf b/usr/share/bash-completion/completions/autoconf index b51e797e001..ac27886c486 100644 --- a/usr/share/bash-completion/completions/autoconf +++ b/usr/share/bash-completion/completions/autoconf @@ -1,40 +1,40 @@ # autoconf(1) completion -*- shell-script -*- -_autoconf() +_comp_cmd_autoconf() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | -h | --version | -V | --trace | -t) return ;; --output | -o) - _filedir + _comp_compgen_filedir return ;; --warnings | -W) local cats=(cross obsolete syntax) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --prepend-include | -B | --include | -I) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir '@(ac|in)' + _comp_compgen_filedir '@(ac|in)' } && - complete -F _autoconf autoconf + complete -F _comp_cmd_autoconf autoconf # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autoheader b/usr/share/bash-completion/completions/autoheader index 9b0f0dc9410..ef43a5cd5a8 100644 --- a/usr/share/bash-completion/completions/autoheader +++ b/usr/share/bash-completion/completions/autoheader @@ -1,9 +1,9 @@ # autoreconf(1) completion -*- shell-script -*- -_autoreconf() +_comp_cmd_autoreconf() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | -h | --version | -V) @@ -12,30 +12,30 @@ _autoreconf() --warnings | -W) local cats=(cross gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --prepend-include | -B | --include | -I) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi if [[ $1 == *autoheader ]]; then - _filedir '@(ac|in)' + _comp_compgen_filedir '@(ac|in)' else - _filedir -d + _comp_compgen_filedir -d fi } && - complete -F _autoreconf autoreconf autoheader + complete -F _comp_cmd_autoreconf autoreconf autoheader # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake b/usr/share/bash-completion/completions/automake index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake +++ b/usr/share/bash-completion/completions/automake @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.10 b/usr/share/bash-completion/completions/automake-1.10 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.10 +++ b/usr/share/bash-completion/completions/automake-1.10 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.11 b/usr/share/bash-completion/completions/automake-1.11 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.11 +++ b/usr/share/bash-completion/completions/automake-1.11 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.12 b/usr/share/bash-completion/completions/automake-1.12 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.12 +++ b/usr/share/bash-completion/completions/automake-1.12 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.13 b/usr/share/bash-completion/completions/automake-1.13 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.13 +++ b/usr/share/bash-completion/completions/automake-1.13 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.14 b/usr/share/bash-completion/completions/automake-1.14 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.14 +++ b/usr/share/bash-completion/completions/automake-1.14 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.15 b/usr/share/bash-completion/completions/automake-1.15 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.15 +++ b/usr/share/bash-completion/completions/automake-1.15 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/automake-1.16 b/usr/share/bash-completion/completions/automake-1.16 index 5fe5f4f86d7..e20ab4fb456 100644 --- a/usr/share/bash-completion/completions/automake-1.16 +++ b/usr/share/bash-completion/completions/automake-1.16 @@ -1,9 +1,9 @@ # automake(1) completion -*- shell-script -*- -_automake() +_comp_cmd_automake() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | --version) @@ -11,26 +11,26 @@ _automake() ;; --warnings | -W) local cats=(gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --libdir) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi - _filedir + _comp_compgen_filedir } && - complete -F _automake automake automake-1.1{0..6} + complete -F _comp_cmd_automake automake automake-1.1{0..6} # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autoreconf b/usr/share/bash-completion/completions/autoreconf index 9b0f0dc9410..ef43a5cd5a8 100644 --- a/usr/share/bash-completion/completions/autoreconf +++ b/usr/share/bash-completion/completions/autoreconf @@ -1,9 +1,9 @@ # autoreconf(1) completion -*- shell-script -*- -_autoreconf() +_comp_cmd_autoreconf() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return case "$prev" in --help | -h | --version | -V) @@ -12,30 +12,30 @@ _autoreconf() --warnings | -W) local cats=(cross gnu obsolete override portability syntax unsupported) - COMPREPLY=($(compgen -W \ - '${cats[@]} ${cats[@]/#/no-} all none error' -- "$cur")) + _comp_compgen -- -W '"${cats[@]}" "${cats[@]/#/no-}" all none + error' return ;; --prepend-include | -B | --include | -I) - _filedir -d + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi if [[ $1 == *autoheader ]]; then - _filedir '@(ac|in)' + _comp_compgen_filedir '@(ac|in)' else - _filedir -d + _comp_compgen_filedir -d fi } && - complete -F _autoreconf autoreconf autoheader + complete -F _comp_cmd_autoreconf autoreconf autoheader # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autorpm b/usr/share/bash-completion/completions/autorpm index d55322ab819..3e67091029e 100644 --- a/usr/share/bash-completion/completions/autorpm +++ b/usr/share/bash-completion/completions/autorpm @@ -1,14 +1,14 @@ # autorpm(8) completion -*- shell-script -*- -_autorpm() +_comp_cmd_autorpm() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return - COMPREPLY=($(compgen -W '--notty --debug --help --version auto add - fullinfo info help install list remove set' -- "$cur")) + _comp_compgen -- -W '--notty --debug --help --version auto add fullinfo + info help install list remove set' } && - complete -F _autorpm autorpm + complete -F _comp_cmd_autorpm autorpm # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autoscan b/usr/share/bash-completion/completions/autoscan index e0071437197..fe48b56e2c5 100644 --- a/usr/share/bash-completion/completions/autoscan +++ b/usr/share/bash-completion/completions/autoscan @@ -1,34 +1,36 @@ # autoscan(1) completion -*- shell-script -*- -_autoscan() +_comp_cmd_autoscan() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[BI]*)' + # shellcheck disable=SC2254 case "$prev" in - --help | --version | -!(-*)[hV]) + --help | --version | -${noargopts}[hV]) return ;; - --prepend-include | --include | -!(-*)[BI]) - _filedir -d + --prepend-include | --include | -${noargopts}[BI]) + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi if [[ $1 == *autoupdate ]]; then - _filedir '@(ac|in)' + _comp_compgen_filedir '@(ac|in)' else - _filedir -d + _comp_compgen_filedir -d fi } && - complete -F _autoscan autoscan autoupdate + complete -F _comp_cmd_autoscan autoscan autoupdate # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autossh b/usr/share/bash-completion/completions/autossh index 907c0390fc9..561dd0709fd 100644 --- a/usr/share/bash-completion/completions/autossh +++ b/usr/share/bash-completion/completions/autossh @@ -1,195 +1,229 @@ # ssh(1) completion -*- shell-script -*- -_ssh_queries() +_comp_cmd_ssh__compgen_queries() { - COMPREPLY+=($(compgen -W \ - "cipher cipher-auth help mac kex key key-cert key-plain key-sig - protocol-version compression sig - ciphers macs kexalgorithms pubkeyacceptedkeytypes - hostkeyalgorithms hostbasedkeytypes hostbasedacceptedkeytypes" \ - -- "${cur,,}")) + local -a queries + _comp_compgen -v queries -i ssh query "$1" help || + queries=(cipher cipher-auth mac kex key key-cert key-plain key-sig + protocol-version compression sig ciphers macs kexalgorithms + pubkeyacceptedkeytypes hostkeyalgorithms hostbasedkeytypes + hostbasedacceptedkeytypes) + _comp_compgen -c "${cur,,}" -U queries -- -W '"${queries[@]}" help' } +# @since 2.12 +_comp_xfunc_ssh_compgen_query() +{ + _comp_cmd_ssh__compgen_query ssh "$1" +} + +# @deprecated 2.12 use _comp_xfunc_ssh_compgen_query _ssh_query() { - ${1:-ssh} -Q $2 2>/dev/null + local -a queries=() + _comp_compgen -v queries -i ssh query "${1:-ssh}" "$2" && + printf "%s\n" "${queries[@]}" } -_ssh_ciphers() +_comp_cmd_ssh__compgen_query() { - local ciphers='$(_ssh_query "$1" cipher)' - [[ $ciphers ]] || ciphers="3des-cbc aes128-cbc aes192-cbc aes256-cbc - aes128-ctr aes192-ctr aes256-ctr arcfour128 arcfour256 arcfour - blowfish-cbc cast128-cbc" - COMPREPLY+=($(compgen -W "$ciphers" -- "$cur")) + _comp_compgen_split -- "$("$1" -Q "$2" 2>/dev/null)" } -_ssh_macs() +_comp_cmd_ssh__compgen_ciphers() { - local macs='$(_ssh_query "$1" mac)' - [[ $macs ]] || macs="hmac-md5 hmac-sha1 umac-64@openssh.com hmac-ripemd160 - hmac-sha1-96 hmac-md5-96" - COMPREPLY+=($(compgen -W "$macs" -- "$cur")) + local -a queries + _comp_compgen -v queries -i ssh query "$1" cipher || + queries=(3des-cbc aes128-cbc aes192-cbc aes256-cbc aes128-ctr + aes192-ctr aes256-ctr arcfour128 arcfour256 arcfour blowfish-cbc + cast128-cbc) + _comp_compgen -U queries -- -W '"${queries[@]}"' } -_ssh_options() +_comp_cmd_ssh__compgen_macs() { - local opts=( - AddKeysToAgent AddressFamily BatchMode BindAddress CanonicalDomains - CanonicalizeFallbackLocal CanonicalizeHostname CanonicalizeMaxDots - CanonicalizePermittedCNAMEs CASignatureAlgorithms CertificateFile - ChallengeResponseAuthentication CheckHostIP Ciphers ClearAllForwardings - Compression ConnectionAttempts ConnectTimeout ControlMaster ControlPath - ControlPersist DynamicForward EnableSSHKeysign EscapeChar - ExitOnForwardFailure FingerprintHash ForwardAgent ForwardX11 - ForwardX11Timeout ForwardX11Trusted GatewayPorts GlobalKnownHostsFile - GSSAPIAuthentication GSSAPIClientIdentity GSSAPIDelegateCredentials - GSSAPIKeyExchange GSSAPIRenewalForcesRekey GSSAPIServerIdentity - GSSAPITrustDns HashKnownHosts Host HostbasedAuthentication - HostbasedKeyTypes HostKeyAlgorithms HostKeyAlias HostName + local -a queries + _comp_compgen -v queries -i ssh query "$1" mac || + queries=(hmac-md5 hmac-sha1 umac-64@openssh.com hmac-ripemd160 + hmac-sha1-96 hmac-md5-96) + _comp_compgen -U queries -- -W '"${queries[@]}"' +} + +# @since 2.12 +_comp_xfunc_ssh_compgen_options() +{ + # curl --silent https://raw.githubusercontent.com/openssh/openssh-portable/master/ssh_config.5 | _comp_awk '$1==".It" && $2=="Cm" && $3!="Host" && $3!="Match" {print " "$3}' | sort + local _opts=( + AddKeysToAgent AddressFamily BatchMode BindAddress BindInterface + CanonicalDomains CanonicalizeFallbackLocal CanonicalizeHostname + CanonicalizeMaxDots CanonicalizePermittedCNAMEs CASignatureAlgorithms + CertificateFile ChallengeResponseAuthentication CheckHostIP Ciphers + ClearAllForwardings Compression ConnectionAttempts ConnectTimeout + ControlMaster ControlPath ControlPersist DynamicForward + EnableSSHKeysign EscapeChar ExitOnForwardFailure FingerprintHash + ForwardAgent ForwardX11 ForwardX11Timeout ForwardX11Trusted + GatewayPorts GlobalKnownHostsFile GSSAPIAuthentication + GSSAPIDelegateCredentials HashKnownHosts HostbasedAuthentication + HostbasedKeyTypes HostKeyAlgorithms HostKeyAlias Hostname IdentitiesOnly IdentityAgent IdentityFile IgnoreUnknown Include IPQoS KbdInteractiveAuthentication KbdInteractiveDevices KexAlgorithms LocalCommand LocalForward LogLevel MACs NoHostAuthenticationForLocalhost NumberOfPasswordPrompts PasswordAuthentication PermitLocalCommand PKCS11Provider Port PreferredAuthentications ProxyCommand ProxyJump ProxyUseFdpass - PubkeyAcceptedKeyTypes PubkeyAuthentication RekeyLimit RemoteCommand - RemoteForward RequestTTY RevokedHostKeys SendEnv ServerAliveCountMax - ServerAliveInterval SmartcardDevice StreamLocalBindMask - StreamLocalBindUnlink StrictHostKeyChecking SyslogFacility TCPKeepAlive - Tunnel TunnelDevice UpdateHostKeys UsePrivilegedPort User - UserKnownHostsFile VerifyHostKeyDNS VisualHostKey XAuthLocation) - local protocols=$(_ssh_query "$1" protocol-version) - if [[ -z $protocols || $protocols == *1* ]]; then - opts+=(Cipher CompressionLevel Protocol RhostsRSAAuthentication + PubkeyAcceptedAlgorithms PubkeyAuthentication RekeyLimit RemoteCommand + RemoteForward RequestTTY RequiredRSASize RevokedHostKeys + SecurityKeyProvider SendEnv ServerAliveCountMax ServerAliveInterval + SetEnv StreamLocalBindMask StreamLocalBindUnlink StrictHostKeyChecking + SyslogFacility TCPKeepAlive Tunnel TunnelDevice UpdateHostKeys User + UserKnownHostsFile VerifyHostKeyDNS VisualHostKey XAuthLocation + ) + # Selected old ones + _opts+=( + GSSAPIKeyExchange GSSAPIRenewalForcesRekey GSSAPIServerIdentity + GSSAPITrustDns PubkeyAcceptedKeyTypes SmartcardDevice UsePrivilegedPort + ) + local -a protocols + _comp_compgen -v protocols -i ssh query ssh protocol-version + if [[ ${protocols[*]-} == *1* ]]; then + _opts+=(Cipher CompressionLevel Protocol RhostsRSAAuthentication RSAAuthentication) fi + _comp_unlocal protocols compopt -o nospace - local IFS=$' \t\n' reset=$(shopt -p nocasematch) - shopt -s nocasematch - local option - COMPREPLY=($(for option in "${opts[@]}"; do - [[ $option == "$cur"* ]] && printf '%s=\n' "$option" - done)) - $reset + _comp_compgen_split -l -- "$( + shopt -s nocasematch + local option + for option in "${_opts[@]}"; do + [[ $option == "$cur"* ]] && printf '%s=\n' "$option" + done + )" } +_comp_deprecate_func 2.12 _ssh_options _comp_xfunc_ssh_compgen_options + # Complete a ssh suboption (like ForwardAgent=y) -# Two parameters: the string to complete including the equal sign, and -# the ssh executable to invoke (optional). +# @param $1 the ssh executable to invoke +# @param $2 the string to complete including the equal sign # Not all suboptions are completed. # Doesn't handle comma-separated lists. -_ssh_suboption() +_comp_cmd_ssh__compgen_suboption() { # Split into subopt and subval - local prev=${1%%=*} cur=${1#*=} + local _prev=${2%%=*} cur=${2#*=} - case ${prev,,} in + case ${_prev,,} in batchmode | canonicaldomains | canonicalizefallbacklocal | \ challengeresponseauthentication | checkhostip | \ - clearallforwardings | controlpersist | compression | enablesshkeysign | \ - exitonforwardfailure | forwardagent | forwardx11 | forwardx11trusted | \ - gatewayports | gssapiauthentication | gssapikeyexchange | \ - gssapidelegatecredentials | gssapirenewalforcesrekey | gssapitrustdns | \ - hashknownhosts | hostbasedauthentication | identitiesonly | \ - kbdinteractiveauthentication | kbdinteractivedevices | \ - nohostauthenticationforlocalhost | passwordauthentication | permitlocalcommand | \ - proxyusefdpass | pubkeyauthentication | rhostsrsaauthentication | \ + clearallforwardings | controlpersist | compression | \ + enablesshkeysign | exitonforwardfailure | forwardagent | \ + forwardx11 | forwardx11trusted | gatewayports | \ + gssapiauthentication | gssapikeyexchange | \ + gssapidelegatecredentials | gssapirenewalforcesrekey | \ + gssapitrustdns | hashknownhosts | hostbasedauthentication | \ + identitiesonly | kbdinteractiveauthentication | \ + kbdinteractivedevices | nohostauthenticationforlocalhost | \ + passwordauthentication | permitlocalcommand | proxyusefdpass | \ + pubkeyauthentication | rhostsrsaauthentication | \ rsaauthentication | streamlocalbindunlink | \ tcpkeepalive | useprivilegedport | visualhostkey) - COMPREPLY=($(compgen -W 'yes no' -- "$cur")) + _comp_compgen -- -W 'yes no' ;; addkeystoagent) - COMPREPLY=($(compgen -W 'yes ask confirm no' -- "$cur")) + _comp_compgen -- -W 'yes ask confirm no' ;; addressfamily) - COMPREPLY=($(compgen -W 'any inet inet6' -- "$cur")) + _comp_compgen -- -W 'any inet inet6' ;; bindaddress) - _ip_addresses + _comp_compgen_ip_addresses ;; canonicalizehostname) - COMPREPLY=($(compgen -W 'yes no always' -- "$cur")) + _comp_compgen -- -W 'yes no always' ;; identityfile) - _ssh_identityfile + _comp_xfunc_ssh_compgen_identityfile ;; - *file | identityagent | include | controlpath | revokedhostkeys | xauthlocation) - _filedir + *file | identityagent | include | controlpath | revokedhostkeys | \ + xauthlocation) + _comp_compgen_filedir ;; casignaturealgorithms) - COMPREPLY=($(compgen -W '$(_ssh_query "$2" sig)' -- "$cur")) + _comp_cmd_ssh__compgen_query "$1" sig ;; cipher) - COMPREPLY=($(compgen -W 'blowfish des 3des' -- "$cur")) + _comp_compgen -- -W 'blowfish des 3des' ;; ciphers) - _ssh_ciphers "$2" + _comp_cmd_ssh__compgen_ciphers "$1" ;; controlmaster) - COMPREPLY=($(compgen -W 'yes ask auto autoask no' -- "$cur")) + _comp_compgen -- -W 'yes ask auto autoask no' ;; compressionlevel) - COMPREPLY=($(compgen -W '{1..9}' -- "$cur")) + _comp_compgen -- -W '{1..9}' ;; fingerprinthash) - COMPREPLY=($(compgen -W 'md5 sha256' -- "$cur")) + _comp_compgen -- -W 'md5 sha256' ;; ipqos) - COMPREPLY=($(compgen -W 'af1{1..4} af2{2..3} af3{1..3} af4{1..3} - cs{0..7} ef lowdelay throughput reliability' -- "$cur")) + _comp_compgen -- -W 'af1{1..4} af2{2..3} af3{1..3} af4{1..3} + cs{0..7} ef lowdelay throughput reliability' ;; hostbasedkeytypes | hostkeyalgorithms) - COMPREPLY=($(compgen -W '$(_ssh_query "$2" key)' -- "$cur")) + _comp_cmd_ssh__compgen_query "$1" key ;; kexalgorithms) - COMPREPLY=($(compgen -W '$(_ssh_query "$2" kex)' -- "$cur")) + _comp_cmd_ssh__compgen_query "$1" kex ;; loglevel) - COMPREPLY=($(compgen -W 'QUIET FATAL ERROR INFO VERBOSE DEBUG{,1,2,3}' -- "$cur")) + _comp_compgen -- -W 'QUIET FATAL ERROR INFO VERBOSE DEBUG{,1,2,3}' ;; macs) - _ssh_macs "$2" + _comp_cmd_ssh__compgen_macs "$1" ;; pkcs11provider) - _filedir so + _comp_compgen_filedir so ;; preferredauthentications) - COMPREPLY=($(compgen -W 'gssapi-with-mic host-based publickey - keyboard-interactive password' -- "$cur")) + _comp_compgen -- -W 'gssapi-with-mic host-based publickey + keyboard-interactive password' ;; protocol) - local protocols=($(_ssh_query "$2" protocol-version)) - [[ $protocols ]] || protocols=(1 2) + local -a protocols + _comp_compgen -v protocols -i ssh query "$1" protocol-version + [[ ${protocols-} ]] || protocols=(1 2) if ((${#protocols[@]} > 1)); then - COMPREPLY=($(compgen -W '${protocols[@]}' -- "$cur")) + _comp_compgen -- -W '"${protocols[@]}"' fi ;; proxyjump) - _known_hosts_real -a ${configfile:+-F "$configfile"} -- "$cur" + _comp_compgen_known_hosts -a ${configfile:+-F "$configfile"} -- "$cur" ;; proxycommand | remotecommand | localcommand) - COMPREPLY=($(compgen -c -- "$cur")) + _comp_compgen_commands ;; - pubkeyacceptedkeytypes) - COMPREPLY=($(compgen -W '$(_ssh_query "$2" key)' -- "$cur")) + pubkeyacceptedalgorithms | pubkeyacceptedkeytypes) + _comp_cmd_ssh__compgen_query "$1" key ;; requesttty) - COMPREPLY=($(compgen -W 'no yes force auto' -- "$cur")) + _comp_compgen -- -W 'no yes force auto' + ;; + requiredrsasize) + _comp_compgen -- -W '1024 2048 3072 4096 7680 15360' ;; stricthostkeychecking) - COMPREPLY=($(compgen -W 'accept-new ask no off' -- "$cur")) + _comp_compgen -- -W 'accept-new ask no off' ;; syslogfacility) - COMPREPLY=($(compgen -W 'DAEMON USER AUTH LOCAL{0..7}' -- "$cur")) + _comp_compgen -- -W 'DAEMON USER AUTH LOCAL{0..7}' ;; tunnel) - COMPREPLY=($(compgen -W 'yes no point-to-point ethernet' \ - -- "$cur")) + _comp_compgen -- -W 'yes no point-to-point ethernet' ;; updatehostkeys | verifyhostkeydns) - COMPREPLY=($(compgen -W 'yes no ask' -- "$cur")) + _comp_compgen -- -W 'yes no ask' ;; esac return 0 @@ -198,28 +232,46 @@ _ssh_suboption() # Try to complete -o SubOptions= # # Returns 0 if the completion was handled or non-zero otherwise. -_ssh_suboption_check() +# @since 2.12 +_comp_xfunc_ssh_compgen_suboption_check() +{ + _comp_cmd_ssh__compgen_suboption_check ssh +} + +# @param $1 the ssh executable to invoke +_comp_cmd_ssh__compgen_suboption_check() { # Get prev and cur words without splitting on = - local cureq=$(_get_cword :=) preveq=$(_get_pword :=) - if [[ $cureq == *=* && $preveq == -*o ]]; then - _ssh_suboption $cureq "$1" + local cur prev + _comp_get_words -n := cur prev + if [[ $cur == *=* && $prev == -*o ]]; then + _comp_unlocal prev + _comp_cmd_ssh__compgen_suboption "$1" "$cur" return $? fi return 1 } +# @deprecated 2.12 use `_comp_xfunc_ssh_compgen_suboption_check` instead +_ssh_suboption_check() +{ + _comp_cmd_ssh__compgen_suboption_check "${1:-ssh}" +} + # Search COMP_WORDS for '-F configfile' or '-Fconfigfile' argument -_ssh_configfile() +# @var[out] configfile Found configfile, if any +_comp_cmd_ssh__configfile() { + configfile="" set -- "${words[@]}" while (($# > 0)); do if [[ $1 == -F* ]]; then + local REPLY if ((${#1} > 2)); then - configfile="$(dequote "${1:2}")" + _comp_dequote "${1:2}" && configfile=$REPLY else shift - [[ ${1-} ]] && configfile="$(dequote "$1")" + [[ ${1-} ]] && _comp_dequote "$1" && configfile=$REPLY fi break fi @@ -228,79 +280,86 @@ _ssh_configfile() } # With $1 set, look for public key files, else private +# @since 2.12 # shellcheck disable=SC2120 -_ssh_identityfile() +_comp_xfunc_ssh_compgen_identityfile() { - [[ -z $cur && -d ~/.ssh ]] && cur=~/.ssh/id - _filedir - if ((${#COMPREPLY[@]} > 0)); then - COMPREPLY=($(compgen -W '${COMPREPLY[@]}' \ - -X "${1:+!}*.pub" -- "$cur")) - fi + local cur=$cur tmp + [[ ! $cur && -d ~/.ssh ]] && cur=~/.ssh/id + _comp_compgen -v tmp -c "$cur" filedir && + _comp_compgen -U tmp -- -W '"${tmp[@]}"' -X "${1:+!}*.pub" } -_ssh() +_comp_deprecate_func 2.12 _ssh_identityfile _comp_xfunc_ssh_compgen_identityfile + +_comp_cmd_ssh() { - local cur prev words cword - _init_completion -n : || return + local cur prev words cword comp_args + _comp_initialize -n : -- "$@" || return local configfile - _ssh_configfile + _comp_cmd_ssh__configfile - _ssh_suboption_check "$1" && return + _comp_cmd_ssh__compgen_suboption_check "$1" && return local ipvx + # Keep cases sorted the same they're in ssh's usage message + # (but do group ones with same arg completion) case $prev in + -*B) + _comp_compgen_available_interfaces -a + return + ;; -*b) - _ip_addresses + _comp_compgen_ip_addresses return ;; -*c) - _ssh_ciphers "$1" + _comp_cmd_ssh__compgen_ciphers "$1" return ;; -*[DeLpRW]) return ;; -*[EFS]) - _filedir + _comp_compgen_filedir return ;; - -*i) - _ssh_identityfile + -*I) + _comp_compgen_filedir so return ;; - -*I) - _filedir so + -*i) + _comp_xfunc_ssh_compgen_identityfile return ;; -*J) - _known_hosts_real -a ${configfile:+-F "$configfile"} -- "$cur" + _comp_compgen_known_hosts -a ${configfile:+-F "$configfile"} -- "$cur" return ;; -*l) - COMPREPLY=($(compgen -u -- "$cur")) + _comp_compgen -- -u return ;; -*m) - _ssh_macs "$1" + _comp_cmd_ssh__compgen_macs "$1" return ;; -*O) - COMPREPLY=($(compgen -W 'check forward cancel exit stop' -- "$cur")) + _comp_compgen -- -W 'check forward cancel exit stop' return ;; -*o) - _ssh_options "$1" + _comp_xfunc_ssh_compgen_options "$1" return ;; -*Q) - _ssh_queries "$1" + _comp_cmd_ssh__compgen_queries "$1" return ;; -*w) - _available_interfaces + _comp_compgen_available_interfaces return ;; -*4*) @@ -312,67 +371,71 @@ _ssh() esac if [[ $cur == -F* ]]; then - cur=${cur#-F} - _filedir + _comp_compgen -c "${cur#-F}" filedir # Prefix completions with '-F' COMPREPLY=("${COMPREPLY[@]/#/-F}") - cur=-F$cur # Restore cur elif [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur")) + _comp_compgen_usage else - _known_hosts_real ${ipvx-} -a ${configfile:+-F "$configfile"} -- "$cur" - - local args - _count_args - if ((args > 1)); then + local REPLY + # Keep glob sort in sync with cases above + _comp_count_args -n "=" -a "-*[BbcDeLpRWEFSIiJlmOoQw]" + if ((REPLY > 1)); then compopt -o filenames - COMPREPLY+=($(compgen -c -- "$cur")) + _comp_compgen_commands + else + _comp_compgen_known_hosts ${ipvx-} -a ${configfile:+-F "$configfile"} \ + -- "$cur" fi fi } && - shopt -u hostcomplete && complete -F _ssh ssh slogin autossh sidedoor + shopt -u hostcomplete && + complete -F _comp_cmd_ssh ssh slogin autossh sidedoor # sftp(1) completion # -_sftp() +_comp_cmd_sftp() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local configfile - _ssh_configfile + _comp_cmd_ssh__configfile - _ssh_suboption_check && return + # Prefer `ssh` from same dir for resolving options, etc + local pathcmd + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH - local ipvx + _comp_xfunc_ssh_compgen_suboption_check && return + + local ipvx= case $prev in -*[BDlPRs]) return ;; -*[bF]) - _filedir + _comp_compgen_filedir return ;; -*i) - _ssh_identityfile + _comp_xfunc_ssh_compgen_identityfile return ;; -*c) - _ssh_ciphers + _comp_cmd_ssh__compgen_ciphers return ;; -*J) - _known_hosts_real -a ${configfile:+-F "$configfile"} -- "$cur" + _comp_compgen_known_hosts -a ${configfile:+-F "$configfile"} -- "$cur" return ;; -*o) - _ssh_options + _comp_xfunc_ssh_compgen_options return ;; -*S) - compopt -o filenames - COMPREPLY=($(compgen -c -- "$cur")) + _comp_compgen_commands return ;; -*4*) @@ -384,100 +447,119 @@ _sftp() esac if [[ $cur == -F* ]]; then - cur=${cur#-F} - _filedir + _comp_compgen -c "${cur#-F}" filedir # Prefix completions with '-F' COMPREPLY=("${COMPREPLY[@]/#/-F}") - cur=-F$cur # Restore cur elif [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur")) + _comp_compgen_usage else - _known_hosts_real ${ipvx-} -a ${configfile:+-F "$configfile"} -- "$cur" + _comp_compgen_known_hosts ${ipvx:+"$ipvx"} -a ${configfile:+-F "$configfile"} -- "$cur" fi } && - shopt -u hostcomplete && complete -F _sftp sftp + shopt -u hostcomplete && complete -F _comp_cmd_sftp sftp # things we want to backslash escape in scp paths # shellcheck disable=SC2089 -_scp_path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]' +_comp_cmd_scp__path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]' # Complete remote files with ssh. If the first arg is -d, complete on dirs # only. Returns paths escaped with three backslashes. +# @since 2.12 # shellcheck disable=SC2120 -_scp_remote_files() +_comp_xfunc_scp_compgen_remote_files() { - local IFS=$'\n' - # remove backslash escape from the first colon - cur=${cur/\\:/:} + local cur=${cur/\\:/:} - local userhost=${cur%%?(\\):*} - local path=${cur#*:} + local _userhost=${cur%%?(\\):*} + local _path=${cur#*:} # unescape (3 backslashes to 1 for chars we escaped) # shellcheck disable=SC2090 - path=$(command sed -e 's/\\\\\\\('$_scp_path_esc'\)/\\\1/g' <<<"$path") + _path=$(command sed -e 's/\\\\\\\('"$_comp_cmd_scp__path_esc"'\)/\\\1/g' <<<"$_path") # default to home dir of specified user on remote host - if [[ -z $path ]]; then - path=$(ssh -o 'Batchmode yes' $userhost pwd 2>/dev/null) + if [[ ! $_path ]]; then + _path=$(ssh -o 'Batchmode yes' "$_userhost" pwd 2>/dev/null) fi - local files - if [[ $1 == -d ]]; then + local _files + if [[ ${1-} == -d ]]; then # escape problematic characters; remove non-dirs # shellcheck disable=SC2090 - files=$(ssh -o 'Batchmode yes' $userhost \ - command ls -aF1dL "$path*" 2>/dev/null | - command sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e '/[^\/]$/d') + _files=$(ssh -o 'Batchmode yes' "$_userhost" \ + command ls -aF1dL "$_path*" 2>/dev/null | + command sed -e 's/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e '/[^\/]$/d') else # escape problematic characters; remove executables, aliases, pipes # and sockets; add space at end of file names # shellcheck disable=SC2090 - files=$(ssh -o 'Batchmode yes' $userhost \ - command ls -aF1dL "$path*" 2>/dev/null | - command sed -e 's/'$_scp_path_esc'/\\\\\\&/g' -e 's/[*@|=]$//g' \ + _files=$(ssh -o 'Batchmode yes' "$_userhost" \ + command ls -aF1dL "$_path*" 2>/dev/null | + command sed -e 's/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e 's/[*@|=]$//g' \ -e 's/[^\/]$/& /g') fi - COMPREPLY+=($files) + _comp_compgen -R split -l -- "$_files" } -# This approach is used instead of _filedir to get a space appended -# after local file/dir completions, and -o nospace retained for others. -# If first arg is -d, complete on directory names only. The next arg is -# an optional prefix to add to returned completions. -_scp_local_files() +# @deprecated 2.12 use `_comp_compgen -ax ssh remote_files` instead +_scp_remote_files() { - local IFS=$'\n' + _comp_compgen -ax scp remote_files +} - local dirsonly=false +# This approach is used instead of _comp_compgen_filedir to get a space +# appended after local file/dir completions, and -o nospace retained for +# others. If first arg is -d, complete on directory names only. The next arg +# is an optional prefix to add to returned completions. +# @since 2.12 +_comp_xfunc_scp_compgen_local_files() +{ + local _dirsonly="" if [[ ${1-} == -d ]]; then - dirsonly=true + _dirsonly=set shift fi - if $dirsonly; then - COMPREPLY+=($(command ls -aF1dL $cur* 2>/dev/null | - command sed -e "s/$_scp_path_esc/\\\\&/g" -e '/[^\/]$/d' -e "s/^/${1-}/")) + local files + _comp_expand_glob files '"$cur"*' || return 0 + if [[ $_dirsonly ]]; then + _comp_compgen -U files split -l -- "$( + command ls -aF1dL "${files[@]}" 2>/dev/null | + command sed -e "s/$_comp_cmd_scp__path_esc/\\\\&/g" \ + -e '/[^\/]$/d' -e "s/^/${1-}/" + )" else - COMPREPLY+=($(command ls -aF1dL $cur* 2>/dev/null | - command sed -e "s/$_scp_path_esc/\\\\&/g" -e 's/[*@|=]$//g' \ - -e 's/[^\/]$/& /g' -e "s/^/${1-}/")) + _comp_compgen -U files split -l -- "$( + command ls -aF1dL "${files[@]}" 2>/dev/null | + command sed -e "s/$_comp_cmd_scp__path_esc/\\\\&/g" \ + -e 's/[*@|=]$//g' -e 's/[^\/]$/& /g' -e "s/^/${1-}/" + )" fi } +# @deprecated 2.12 +_scp_local_files() +{ + _comp_compgen -ax scp local_files "$@" +} + # scp(1) completion # -_scp() +_comp_cmd_scp() { - local cur prev words cword - _init_completion -n : || return + local cur prev words cword comp_args + _comp_initialize -n : -- "$@" || return local configfile - _ssh_configfile + _comp_cmd_ssh__configfile - _ssh_suboption_check && { - COMPREPLY=("${COMPREPLY[@]/%/ }") + # Prefer `ssh` from same dir for resolving options, remote files, etc + local pathcmd + pathcmd=$(type -P -- "$1") && local PATH=${pathcmd%/*}:$PATH + + _comp_xfunc_ssh_compgen_suboption_check && { + ((${#COMPREPLY[@]})) && COMPREPLY=("${COMPREPLY[@]/%/ }") return } @@ -485,34 +567,34 @@ _scp() case $prev in -*c) - _ssh_ciphers + _comp_cmd_ssh__compgen_ciphers COMPREPLY=("${COMPREPLY[@]/%/ }") return ;; -*F) - _filedir + _comp_compgen_filedir compopt +o nospace return ;; -*i) - _ssh_identityfile + _comp_xfunc_ssh_compgen_identityfile compopt +o nospace return ;; -*J) - _known_hosts_real -a ${configfile:+-F "$configfile"} -- "$cur" + _comp_compgen_known_hosts -a ${configfile:+-F "$configfile"} -- "$cur" return ;; -*[lP]) return ;; -*o) - _ssh_options + _comp_xfunc_ssh_compgen_options return ;; -*S) - compopt +o nospace -o filenames - COMPREPLY=($(compgen -c -- "$cur")) + compopt +o nospace + _comp_compgen_commands return ;; -*4*) @@ -523,12 +605,12 @@ _scp() ;; esac - _expand || return + _comp_expand || return case $cur in !(*:*)/* | [.~]*) ;; # looks like a path *:*) - _scp_remote_files + _comp_xfunc_scp_compgen_remote_files return ;; esac @@ -541,23 +623,21 @@ _scp() else case $cur in -*) - COMPREPLY=($(compgen -W '$(_parse_usage "${words[0]}")' \ - -- "$cur")) + _comp_compgen_usage COMPREPLY=("${COMPREPLY[@]/%/ }") return ;; - */* | [.~]*) - # not a known host, pass through - ;; *) - _known_hosts_real ${ipvx-} -c -a \ - ${configfile:+-F "$configfile"} -- "$cur" + if ! _comp_looks_like_path "$cur"; then + _comp_compgen_known_hosts ${ipvx-} -c -a \ + ${configfile:+-F "$configfile"} -- "$cur" + fi ;; esac fi - _scp_local_files "${prefix-}" + _comp_compgen -ax scp local_files "${prefix-}" } && - complete -F _scp -o nospace scp + complete -F _comp_cmd_scp -o nospace scp # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/autoupdate b/usr/share/bash-completion/completions/autoupdate index e0071437197..fe48b56e2c5 100644 --- a/usr/share/bash-completion/completions/autoupdate +++ b/usr/share/bash-completion/completions/autoupdate @@ -1,34 +1,36 @@ # autoscan(1) completion -*- shell-script -*- -_autoscan() +_comp_cmd_autoscan() { - local cur prev words cword split - _init_completion -s || return + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + local noargopts='!(-*|*[BI]*)' + # shellcheck disable=SC2254 case "$prev" in - --help | --version | -!(-*)[hV]) + --help | --version | -${noargopts}[hV]) return ;; - --prepend-include | --include | -!(-*)[BI]) - _filedir -d + --prepend-include | --include | -${noargopts}[BI]) + _comp_compgen_filedir -d return ;; esac - $split && return + [[ $was_split ]] && return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_help "$1")' -- "$cur")) + _comp_compgen_help [[ ${COMPREPLY-} == *= ]] && compopt -o nospace return fi if [[ $1 == *autoupdate ]]; then - _filedir '@(ac|in)' + _comp_compgen_filedir '@(ac|in)' else - _filedir -d + _comp_compgen_filedir -d fi } && - complete -F _autoscan autoscan autoupdate + complete -F _comp_cmd_autoscan autoscan autoupdate # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/avahi-browse b/usr/share/bash-completion/completions/avahi-browse new file mode 100644 index 00000000000..8e4ece76f7c --- /dev/null +++ b/usr/share/bash-completion/completions/avahi-browse @@ -0,0 +1,42 @@ +# bash completion for avahi-browse(1) -*- shell-script -*- + +_comp_cmd_avahi_browse() +{ + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + + local noargopts='!(-*|*[D]*)' + # shellcheck disable=SC2254 + case $prev in + --domain | -${noargopts}D) + return + ;; + --help | --version | -${noargopts}[hV]*) + return + ;; + esac + + [[ $was_split ]] && return + + if [[ $cur == -* ]]; then + _comp_compgen_help + [[ ${COMPREPLY-} != *= ]] || compopt -o nospace + return + fi + + # Complete service types except with -a/-D/-b + [[ $1 != *-domains ]] || return + local word + for word in "${words[@]}"; do + case $word in + --all | --browse-domains | --dump-db | -${noargopts}[aDb]*) + return + ;; + esac + done + _comp_compgen_split -- "$("$1" --dump-db --no-db-lookup)" + +} && + complete -F _comp_cmd_avahi_browse avahi-browse avahi-browse-domains + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/avahi-browse-domains b/usr/share/bash-completion/completions/avahi-browse-domains new file mode 100644 index 00000000000..8e4ece76f7c --- /dev/null +++ b/usr/share/bash-completion/completions/avahi-browse-domains @@ -0,0 +1,42 @@ +# bash completion for avahi-browse(1) -*- shell-script -*- + +_comp_cmd_avahi_browse() +{ + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + + local noargopts='!(-*|*[D]*)' + # shellcheck disable=SC2254 + case $prev in + --domain | -${noargopts}D) + return + ;; + --help | --version | -${noargopts}[hV]*) + return + ;; + esac + + [[ $was_split ]] && return + + if [[ $cur == -* ]]; then + _comp_compgen_help + [[ ${COMPREPLY-} != *= ]] || compopt -o nospace + return + fi + + # Complete service types except with -a/-D/-b + [[ $1 != *-domains ]] || return + local word + for word in "${words[@]}"; do + case $word in + --all | --browse-domains | --dump-db | -${noargopts}[aDb]*) + return + ;; + esac + done + _comp_compgen_split -- "$("$1" --dump-db --no-db-lookup)" + +} && + complete -F _comp_cmd_avahi_browse avahi-browse avahi-browse-domains + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/avctrl b/usr/share/bash-completion/completions/avctrl index 89c24e470d0..2bb27557b9a 100644 --- a/usr/share/bash-completion/completions/avctrl +++ b/usr/share/bash-completion/completions/avctrl @@ -1,20 +1,20 @@ # avctrl completion -*- shell-script -*- -_avctrl() +_comp_cmd_avctrl() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '--help --quiet' -- "$cur")) + _comp_compgen -- -W '--help --quiet' else - local args - _count_args - if ((args == 1)); then - COMPREPLY=($(compgen -W 'discover switch' -- "$cur")) + local REPLY + _comp_count_args + if ((REPLY == 1)); then + _comp_compgen -- -W 'discover switch' fi fi } && - complete -F _avctrl avctrl + complete -F _comp_cmd_avctrl avctrl # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/b2sum b/usr/share/bash-completion/completions/b2sum new file mode 100644 index 00000000000..adef1cd4a8c --- /dev/null +++ b/usr/share/bash-completion/completions/b2sum @@ -0,0 +1,38 @@ +# bash completion for sha256(1) and friends -*- shell-script -*- + +_comp_cmd_sha256sum() +{ + local cur prev words cword was_split comp_args + _comp_initialize -s -- "$@" || return + + case $prev in + -h | --help | --version) + return + ;; + esac + + [[ $was_split ]] && return + + if [[ $cur == -* ]]; then + _comp_complete_longopt "$@" + return + fi + + local sumtype=${1##*/} + sumtype=${sumtype%sum} + + local opt + for opt in "${words[@]}"; do + if [[ $opt == -@(c|-check) ]]; then + _comp_compgen_filedir "$sumtype" + return + fi + done + + local files + _comp_compgen -v files filedir && + _comp_compgen -- -X "*.$sumtype" -W '"${files[@]}"' +} && + complete -F _comp_cmd_sha256sum b2sum md5sum sha{,1,224,256,384,512}sum + +# ex: filetype=sh diff --git a/usr/share/bash-completion/completions/badblocks b/usr/share/bash-completion/completions/badblocks index 29c4e00d6c1..14e4e05ee83 100644 --- a/usr/share/bash-completion/completions/badblocks +++ b/usr/share/bash-completion/completions/badblocks @@ -1,29 +1,30 @@ # badblocks(8) completion -*- shell-script -*- -_badblocks() +_comp_cmd_badblocks() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*[bcedpt]) return ;; -*[io]) - _filedir + _comp_compgen_filedir return ;; esac if [[ $cur == -* ]]; then # Filter out -w (dangerous) and -X (internal use) - COMPREPLY=($(compgen -X -[wX] -W '$(_parse_usage "$1")' -- "$cur")) + _comp_compgen -R usage + ((${#COMPREPLY[@]})) && + _comp_compgen -- -X '-[wX]' -W '"${COMPREPLY[@]}"' return fi - cur=${cur:=/dev/} - _filedir + _comp_compgen -c "${cur:-/dev/}" filedir } && - complete -F _badblocks badblocks + complete -F _comp_cmd_badblocks badblocks # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/bind b/usr/share/bash-completion/completions/bind index 2ee428b214e..12d2343dd9e 100644 --- a/usr/share/bash-completion/completions/bind +++ b/usr/share/bash-completion/completions/bind @@ -1,36 +1,36 @@ # bash bind completion -*- shell-script -*- -_bind() +_comp_cmd_bind() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return case $prev in -*[lpPsSvVrxX]) return ;; -*m) - COMPREPLY=($(compgen -W "emacs emacs-standard emacs-meta - emacs-ctlx vi vi-move vi-command vi-insert" -- "$cur")) + _comp_compgen -- -W "emacs emacs-standard emacs-meta emacs-ctlx vi + vi-move vi-command vi-insert" return ;; -*f) - _filedir + _comp_compgen_filedir return ;; -*[qu]) - COMPREPLY=($(compgen -W '$("$1" -l)' -- "$cur")) + _comp_compgen_split -- "$("$1" -l)" return ;; esac if [[ $cur == -* ]]; then - COMPREPLY=($(compgen -W '$(_parse_usage "$1")' -- "$cur")) + _comp_compgen_usage -c help -s "$1" return fi - COMPREPLY=($(compgen -A binding -- "$cur")) + _comp_compgen -- -A binding } && - complete -F _bind bind + complete -F _comp_cmd_bind bind # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/bk b/usr/share/bash-completion/completions/bk index 4e4d140aeb1..e848c04048e 100644 --- a/usr/share/bash-completion/completions/bk +++ b/usr/share/bash-completion/completions/bk @@ -1,18 +1,18 @@ # BitKeeper completion -*- shell-script -*- # adapted from code by Bart Trojanowski -_bk() +_comp_cmd_bk() { - local cur prev words cword - _init_completion || return + local cur prev words cword comp_args + _comp_initialize -- "$@" || return local BKCMDS="$(bk help topics 2>/dev/null | - awk '/^ bk/ { print $2 }' | xargs printf '%s ')" + _comp_awk '/^ bk/ { print $2 }' | xargs printf '%s ')" - COMPREPLY=($(compgen -W "$BKCMDS" -- "$cur")) - _filedir + _comp_compgen -- -W "$BKCMDS" + _comp_compgen -a filedir } && - complete -F _bk bk + complete -F _comp_cmd_bk bk # ex: filetype=sh diff --git a/usr/share/bash-completion/completions/bmake b/usr/share/bash-completion/completions/bmake index 96517c217a4..94e2b73b9de 100644 --- a/usr/share/bash-completion/completions/bmake +++ b/usr/share/bash-completion/completions/bmake @@ -1,135 +1,128 @@ # bash completion for GNU make -*- shell-script -*- -_make_target_extract_script() +# Extract the valid target names starting with PREFIX from the output of +# `make -npq' +# @param mode If this is `-d', the directory names already specified in +# PREFIX are omitted in the output +# @param prefix Prefix of the target names +_comp_cmd_make__extract_targets() { - local mode="$1" - shift + local mode=$1 + local -x prefix=$2 - local prefix="$1" - local prefix_pat=$(command sed 's/[][\,.*^$(){}?+|/]/\\&/g' <<<"$prefix") - local basename=${prefix##*/} - local dirname_len=$((${#prefix} - ${#basename})) + # display mode, only output current path component to the next slash + local -x prefix_replace=$prefix + [[ $mode == -d && $prefix == */* ]] && + prefix_replace=${prefix##*/} - if [[ $mode == -d ]]; then - # display mode, only output current path component to the next slash - local output="\2" - else - # completion mode, output full path to the next slash - local output="\1\2" - fi - - cat <