mirror of
https://github.com/Kitware/CMake.git
synced 2026-02-22 06:59:01 -06:00
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:
@@ -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
|
||||
|
||||
Reference in New Issue
Block a user