Skip to content

Commit

Permalink
Update 1 package
Browse files Browse the repository at this point in the history
bash-completion (2.14.0-1 -> 2.15.0-1)

Signed-off-by: Git for Windows Build Agent <ci@git-for-windows.build>
  • Loading branch information
Git for Windows Build Agent committed Dec 11, 2024
1 parent e1506c2 commit 0fb6488
Show file tree
Hide file tree
Showing 115 changed files with 1,275 additions and 700 deletions.
342 changes: 232 additions & 110 deletions usr/share/bash-completion/bash_completion

Large diffs are not rendered by default.

Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Linux insmod(8) completion -*- shell-script -*-

# Use of this file is deprecated.
# Upstream completion is available in kmod >= 34, use that instead.

_comp_cmd_insmod()
{
local cur prev words cword comp_args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Linux insmod(8) completion -*- shell-script -*-

# Use of this file is deprecated.
# Upstream completion is available in kmod >= 34, use that instead.

_comp_cmd_insmod()
{
local cur prev words cword comp_args
Expand Down
24 changes: 24 additions & 0 deletions usr/share/bash-completion/completions/_kata-runtime
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 3rd party completion loader for commands using -*- shell-script -*-
# version 1 of the https://cli.urfave.org library.
#
# This serves as a fallback in case the completion is not installed otherwise.

# https://github.com/urfave/cli/blob/v1-maint/docs/v1/manual.md#bash-completion
# https://github.com/urfave/cli/blob/v1-maint/autocomplete/bash_autocomplete
_comp_cmd__urfave_cli_v1()
{
local cur prev words cword comp_args
_comp_initialize -- "$@" || return

local compcmd=("${words[@]:0:cword}")
if [[ $cur == -* ]]; then
compcmd+=("$cur")
fi
compcmd+=(--generate-bash-completion)

_comp_compgen_split -- "$("${compcmd[@]}" 2>/dev/null)"
} &&
complete -o bashdefault -o default -o nospace \
-F _comp_cmd__urfave_cli_v1 "$1"

# ex: filetype=sh
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Linux modinfo(8) completion -*- shell-script -*-

# Use of this file is deprecated.
# Upstream completion is expected to be available in kmod >= 35, use that instead.

_comp_cmd_modinfo()
{
local cur prev words cword was_split comp_args
Expand Down
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
# Linux modprobe(8) completion -*- shell-script -*-

# Use of this file is deprecated.
# Upstream completion is expected to be available in kmod >= 35, use that instead.

_comp_cmd_modprobe()
{
local cur prev words cword was_split comp_args
Expand Down
8 changes: 8 additions & 0 deletions usr/share/bash-completion/completions/_mtr
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# mtr(8) completion -*- shell-script -*-

# Use of this file is deprecated.
# Upstream completion is available in mtr >= 0.88, use that instead.

complete -F _comp_complete_known_hosts mtr

# ex: filetype=sh
9 changes: 9 additions & 0 deletions usr/share/bash-completion/completions/_nerdctl
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions usr/share/bash-completion/completions/_ngrok
Original file line number Diff line number Diff line change
@@ -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
Original file line number Diff line number Diff line change
@@ -1,6 +1,9 @@
# Linux rmmod(8) completion. -*- shell-script -*-
# This completes on a list of all currently installed kernel modules.

# Use of this file is deprecated.
# Upstream completion is available in kmod >= 34, use that instead.

_comp_cmd_rmmod()
{
local cur prev words cword comp_args
Expand Down
24 changes: 24 additions & 0 deletions usr/share/bash-completion/completions/_sops
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 3rd party completion loader for commands using -*- shell-script -*-
# version 1 of the https://cli.urfave.org library.
#
# This serves as a fallback in case the completion is not installed otherwise.

# https://github.com/urfave/cli/blob/v1-maint/docs/v1/manual.md#bash-completion
# https://github.com/urfave/cli/blob/v1-maint/autocomplete/bash_autocomplete
_comp_cmd__urfave_cli_v1()
{
local cur prev words cword comp_args
_comp_initialize -- "$@" || return

local compcmd=("${words[@]:0:cword}")
if [[ $cur == -* ]]; then
compcmd+=("$cur")
fi
compcmd+=(--generate-bash-completion)

_comp_compgen_split -- "$("${compcmd[@]}" 2>/dev/null)"
} &&
complete -o bashdefault -o default -o nospace \
-F _comp_cmd__urfave_cli_v1 "$1"

# ex: filetype=sh
24 changes: 24 additions & 0 deletions usr/share/bash-completion/completions/_todoist
Original file line number Diff line number Diff line change
@@ -0,0 +1,24 @@
# 3rd party completion loader for commands using -*- shell-script -*-
# version 1 of the https://cli.urfave.org library.
#
# This serves as a fallback in case the completion is not installed otherwise.

# https://github.com/urfave/cli/blob/v1-maint/docs/v1/manual.md#bash-completion
# https://github.com/urfave/cli/blob/v1-maint/autocomplete/bash_autocomplete
_comp_cmd__urfave_cli_v1()
{
local cur prev words cword comp_args
_comp_initialize -- "$@" || return

local compcmd=("${words[@]:0:cword}")
if [[ $cur == -* ]]; then
compcmd+=("$cur")
fi
compcmd+=(--generate-bash-completion)

_comp_compgen_split -- "$("${compcmd[@]}" 2>/dev/null)"
} &&
complete -o bashdefault -o default -o nospace \
-F _comp_cmd__urfave_cli_v1 "$1"

# ex: filetype=sh
8 changes: 8 additions & 0 deletions usr/share/bash-completion/completions/_uv
Original file line number Diff line number Diff line change
@@ -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
8 changes: 8 additions & 0 deletions usr/share/bash-completion/completions/_uvx
Original file line number Diff line number Diff line change
@@ -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
7 changes: 6 additions & 1 deletion usr/share/bash-completion/completions/alternatives
Original file line number Diff line number Diff line change
Expand Up @@ -83,7 +83,12 @@ _comp_cmd_update_alternatives()
_comp_cmd_update_alternatives__installed
;;
*)
_comp_compgen_help
_comp_compgen_help - <<<"$(LANG=C "$1" --help 2>&1 | command sed '
/usage:/,/^[[:space:]]*$/{
s/^\([[:space:]]*usage:\)\{0,1\}[[:space:]]*[^[:space:]]*alternatives / /
s/^[[:space:]]*\[\(-.*\)\]/ \1/
}
/common options:/,$s/ --/\n --/g')"
;;
esac
} &&
Expand Down
33 changes: 28 additions & 5 deletions usr/share/bash-completion/completions/autossh
Original file line number Diff line number Diff line change
Expand Up @@ -462,12 +462,30 @@ _comp_cmd_sftp()
# shellcheck disable=SC2089
_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.
# Complete remote files with ssh. Returns paths escaped with three backslashes
# (unless -l option is provided).
# Options:
# -d Complete on dirs only.
# -l Return paths escaped with one backslash instead of three.
# @since 2.12
# shellcheck disable=SC2120
_comp_xfunc_scp_compgen_remote_files()
{
local _dirs_only=""
local _less_escaping=""

local _flag OPTIND=1 OPTARG="" OPTERR=0
while getopts "dl" _flag "$@"; do
case $_flag in
d) _dirs_only=set ;;
l) _less_escaping=set ;;
*)
echo "bash_completion: $FUNCNAME: usage error: $*" >&2
return 1
;;
esac
done

# remove backslash escape from the first colon
local cur=${cur/\\:/:}

Expand All @@ -483,20 +501,25 @@ _comp_xfunc_scp_compgen_remote_files()
_path=$(ssh -o 'Batchmode yes' "$_userhost" pwd 2>/dev/null)
fi

local _escape_replacement='\\\\\\&'
if [[ $_less_escaping ]]; then
_escape_replacement='\\&'
fi

local _files
if [[ ${1-} == -d ]]; then
if [[ $_dirs_only ]]; 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/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e '/[^\/]$/d')
command sed -e 's/'"$_comp_cmd_scp__path_esc"'/'"$_escape_replacement"'/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/'"$_comp_cmd_scp__path_esc"'/\\\\\\&/g' -e 's/[*@|=]$//g' \
command sed -e 's/'"$_comp_cmd_scp__path_esc"'/'"$_escape_replacement"'/g' -e 's/[*@|=]$//g' \
-e 's/[^\/]$/& /g')
fi
_comp_compgen -R split -l -- "$_files"
Expand Down
Loading

0 comments on commit 0fb6488

Please sign in to comment.