Skip to content

Commit fd8c53e

Browse files
committed
refactor(_signals): rename to _comp_signals
Per current naming convention.
1 parent 0cd3bce commit fd8c53e

File tree

6 files changed

+9
-9
lines changed

6 files changed

+9
-9
lines changed

bash_completion

Lines changed: 1 addition & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1426,8 +1426,7 @@ _comp_compgen_usage()
14261426

14271427
# This function completes on signal names (minus the SIG prefix)
14281428
# @param $1 prefix
1429-
# TODO:API: rename per conventions
1430-
_signals()
1429+
_comp_signals()
14311430
{
14321431
local -a sigs
14331432
_comp_compgen -v sigs -c "SIG${cur#"${1-}"}" -- -P "${1-}" -A signal &&

bash_completion.d/000_bash_completion_compat.bash

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -16,6 +16,7 @@ _comp_deprecate_func 2.12 _get_comp_words_by_ref _comp_get_words
1616
_comp_deprecate_func 2.12 _longopt _comp_longopt
1717
_comp_deprecate_func 2.12 _split_longopt _comp__split_longopt
1818
_comp_deprecate_func 2.12 __ltrim_colon_completions _comp_ltrim_colon_completions
19+
_comp_deprecate_func 2.12 _signals _comp_signals
1920

2021
# Backwards compatibility for compat completions that use have().
2122
# @deprecated 1.90 should no longer be used; generally not needed with

completions/kill

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ _comp_cmd_kill()
77

88
case $prev in
99
-s)
10-
_signals
10+
_comp_signals
1111
return
1212
;;
1313
-l | -n)
@@ -17,7 +17,7 @@ _comp_cmd_kill()
1717

1818
if [[ $cword -eq 1 && $cur == -* ]]; then
1919
# return list of available signals
20-
_signals -
20+
_comp_signals -
2121
_comp_compgen -a help -c help "$1"
2222
else
2323
# return list of available PIDs and jobs

completions/killall

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,7 @@ _comp_cmd_killall()
1414
return
1515
;;
1616
--signal | -${noargopts}s)
17-
_signals
17+
_comp_signals
1818
return
1919
;;
2020
--user | -${noargopts}u)
@@ -27,7 +27,7 @@ _comp_cmd_killall()
2727

2828
if [[ $cur == -* ]]; then
2929
_comp_compgen_help
30-
((cword == 1)) && _signals -
30+
((cword == 1)) && _comp_signals -
3131
return
3232
fi
3333

completions/pgrep

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ _comp_cmd_pgrep()
1212
return
1313
;;
1414
--signal)
15-
_signals
15+
_comp_signals
1616
return
1717
;;
1818
--pidfile | -${noargopts}F)
@@ -51,7 +51,7 @@ _comp_cmd_pgrep()
5151
_comp_compgen_help ||
5252
_comp_compgen_usage - <<<"$("$1" --usage 2>&1 |
5353
command sed -e "s/\[-signal\]//" -e "s/\[-SIGNAL\]//")"
54-
[[ $cword -eq 1 && $1 == *pkill ]] && _signals -
54+
[[ $cword -eq 1 && $1 == *pkill ]] && _comp_signals -
5555
return
5656
fi
5757

completions/timeout

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ _comp_cmd_timeout()
2424
return
2525
;;
2626
--signal | -${noargopts}s)
27-
_signals
27+
_comp_signals
2828
return
2929
;;
3030
esac

0 commit comments

Comments
 (0)