Auxiliary: Modernize bash completion for ctest and cpack
This applies a similar modernization as was done in 1ff41ba26e
(Auxiliary: bash-completion: use _comp_initialize, 2024-06-02)
for the cmake executable. The _init_completion function was
deprecated upstream in bash-completion 2.12.
This commit is contained in:
parent
aa72c5e319
commit
3889640e8b
@ -3,7 +3,9 @@
|
||||
_cpack()
|
||||
{
|
||||
local cur prev words cword
|
||||
if type -t _init_completion >/dev/null; then
|
||||
if type -t _comp_initialize >/dev/null; then
|
||||
_comp_initialize -n = || return
|
||||
elif type -t _init_completion >/dev/null; then
|
||||
_init_completion -n = || return
|
||||
else
|
||||
# manual initialization for older bash completion versions
|
||||
|
@ -3,7 +3,9 @@
|
||||
_ctest()
|
||||
{
|
||||
local cur prev words cword
|
||||
if type -t _init_completion >/dev/null; then
|
||||
if type -t _comp_initialize >/dev/null; then
|
||||
_comp_initialize -n = || return
|
||||
elif type -t _init_completion >/dev/null; then
|
||||
_init_completion -n = || return
|
||||
else
|
||||
# manual initialization for older bash completion versions
|
||||
|
Loading…
Reference in New Issue
Block a user