Skip to content

Commit 007e641

Browse files
committed
docs(completions): add @since markers to xfuncs
1 parent f4fdc13 commit 007e641

File tree

10 files changed

+18
-0
lines changed

10 files changed

+18
-0
lines changed

completions/apt-cache

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,15 @@
22

33
# List APT binary packages
44
# TODO:API: rework to use vars rather than outputting
5+
# @since 2.12
56
_comp_xfunc_apt_cache_packages()
67
{
78
apt-cache --no-generate pkgnames "$cur" 2>/dev/null || :
89
}
910

1011
# List APT source packages
1112
# TODO:API: rework to use vars rather than outputting
13+
# @since 2.12
1214
_comp_xfunc_apt_cache_sources()
1315
{
1416
compgen -W "$(apt-cache dumpavail |
@@ -17,6 +19,7 @@ _comp_xfunc_apt_cache_sources()
1719

1820
# List APT source packages
1921
# TODO:API: rework to use vars rather than outputting
22+
# @since 2.12
2023
_comp_xfunc_apt_cache_src_packages()
2124
{
2225
compgen -W '$(_comp_xfunc_apt_cache_sources "$cur")' -- "$cur"

completions/apt-get

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# Debian apt-get(8) completion -*- shell-script -*-
22

3+
# @since 2.12
34
_comp_xfunc_apt_get_installed_packages()
45
{
56
if [[ -f /etc/debian_version ]]; then

completions/asciidoc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# asciidoc(1) completion -*- shell-script -*-
22

3+
# @since 2.12
34
_comp_xfunc_asciidoc_doctype()
45
{
56
_comp_compgen -a -- -W 'article book manpage'

completions/cvs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,7 @@ _comp_cmd_cvs__kflags()
3636
_comp_compgen -- -W 'kv kvl k o b v'
3737
}
3838

39+
# @since 2.12
3940
_comp_xfunc_cvs_roots()
4041
{
4142
local -a cvsroots=()

completions/iconv

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# iconv(1) completion -*- shell-script -*-
22

3+
# @since 2.12
34
_comp_xfunc_iconv_charsets()
45
{
56
COMPREPLY+=($(compgen -X ... -W '$("${1:-iconv}" -l | \

completions/list_lists

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# mailman list_lists completion -*- shell-script -*-
22

3+
# @since 2.12
34
_comp_xfunc_list_lists_mailman_lists()
45
{
56
COMPREPLY=($(compgen -W '$(list_lists -b 2>/dev/null)' -- "$cur"))

completions/mysql

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,6 @@
11
# mysql(1) completion -*- shell-script -*-
22

3+
# @since 2.12
34
_comp_xfunc_mysql_character_sets()
45
{
56
local -a charsets

completions/python

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,14 @@
11
# bash completion for python -*- shell-script -*-
22

3+
# @since 2.12
34
_comp_xfunc_python_modules()
45
{
56
COMPREPLY+=($(compgen -W \
67
"$("${1:-python}" "${BASH_SOURCE[0]%/*}/../helpers/python" "$cur" \
78
2>/dev/null)" -- "$cur"))
89
}
910

11+
# @since 2.12
1012
_comp_xfunc_python_warning_actions()
1113
{
1214
COMPREPLY+=($(compgen -W "ignore default all module once error" \

completions/rpm

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
# helper functions
44

5+
# @since 2.12
56
_comp_xfunc_rpm_installed_packages()
67
{
78
if [[ -r /var/log/rpmpkgs &&

completions/ssh

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -10,6 +10,7 @@ _comp_cmd_ssh__queries()
1010
_comp_compgen -ac "${cur,,}" -- -W "$queries help"
1111
}
1212

13+
# @since 2.12
1314
# TODO:API:rework to use vars rather than outputting
1415
_comp_xfunc_ssh_query()
1516
{
@@ -35,6 +36,7 @@ _comp_cmd_ssh__macs()
3536
_comp_compgen -a -- -W "$macs"
3637
}
3738

39+
# @since 2.12
3840
_comp_xfunc_ssh_options()
3941
{
4042
# curl --silent https://raw.githubusercontent.com/openssh/openssh-portable/master/ssh_config.5 | awk '$1==".It" && $2=="Cm" && $3!="Host" && $3!="Match" {print " "$3}' | sort
@@ -215,6 +217,7 @@ _comp_cmd_ssh__suboption()
215217
# Try to complete -o SubOptions=
216218
#
217219
# Returns 0 if the completion was handled or non-zero otherwise.
220+
# @since 2.12
218221
_comp_xfunc_ssh_suboption_check()
219222
{
220223
# Get prev and cur words without splitting on =
@@ -250,6 +253,7 @@ _comp_cmd_ssh__configfile()
250253
}
251254

252255
# With $1 set, look for public key files, else private
256+
# @since 2.12
253257
# shellcheck disable=SC2120
254258
_comp_xfunc_ssh_identityfile()
255259
{
@@ -432,6 +436,7 @@ _comp_cmd_scp__path_esc='[][(){}<>"'"'"',:;^&!$=?`\\|[:space:]]'
432436

433437
# Complete remote files with ssh. If the first arg is -d, complete on dirs
434438
# only. Returns paths escaped with three backslashes.
439+
# @since 2.12
435440
# shellcheck disable=SC2120
436441
_comp_xfunc_ssh_scp_remote_files()
437442
{
@@ -475,6 +480,7 @@ _comp_deprecate_func _scp_remote_files _comp_xfunc_ssh_scp_remote_files
475480
# appended after local file/dir completions, and -o nospace retained for
476481
# others. If first arg is -d, complete on directory names only. The next arg
477482
# is an optional prefix to add to returned completions.
483+
# @since 2.12
478484
_comp_xfunc_ssh_scp_local_files()
479485
{
480486
local IFS=$'\n'

0 commit comments

Comments
 (0)