summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorBrad King <brad.king@kitware.com>2015-04-23 13:04:35 (GMT)
committerCMake Topic Stage <kwrobot@kitware.com>2015-04-23 13:04:35 (GMT)
commitb03063b904648c960b91c63ef1f54b43977b8dc8 (patch)
treea1c09dc03049eda01b6d753e9b28cd0bfb7cd44b
parent195a724c57bfe13f286525e0f8a7f2578768c77e (diff)
parent2ecf168f19096e63c43f3c524d1e43218446e3c3 (diff)
downloadCMake-b03063b904648c960b91c63ef1f54b43977b8dc8.zip
CMake-b03063b904648c960b91c63ef1f54b43977b8dc8.tar.gz
CMake-b03063b904648c960b91c63ef1f54b43977b8dc8.tar.bz2
Merge topic 'bash-completion-updates'
2ecf168f bash-completion: Avoid using _init_completion when not defined
-rw-r--r--Auxiliary/bash-completion/cmake9
-rw-r--r--Auxiliary/bash-completion/cpack9
-rw-r--r--Auxiliary/bash-completion/ctest9
3 files changed, 24 insertions, 3 deletions
diff --git a/Auxiliary/bash-completion/cmake b/Auxiliary/bash-completion/cmake
index 59e0298..557f243 100644
--- a/Auxiliary/bash-completion/cmake
+++ b/Auxiliary/bash-completion/cmake
@@ -3,7 +3,14 @@
_cmake()
{
local cur prev words cword split=false
- _init_completion -n := || return
+ if type -t _init_completion >/dev/null; then
+ _init_completion -n = || return
+ else
+ # manual initialization for older bash completion versions
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ fi
# Workaround for options like -DCMAKE_BUILD_TYPE=Release
local prefix=
diff --git a/Auxiliary/bash-completion/cpack b/Auxiliary/bash-completion/cpack
index 9ab6048..05e0e93 100644
--- a/Auxiliary/bash-completion/cpack
+++ b/Auxiliary/bash-completion/cpack
@@ -3,7 +3,14 @@
_cpack()
{
local cur prev words cword
- _init_completion -n = || return
+ if type -t _init_completion >/dev/null; then
+ _init_completion -n = || return
+ else
+ # manual initialization for older bash completion versions
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ fi
case "$prev" in
-G)
diff --git a/Auxiliary/bash-completion/ctest b/Auxiliary/bash-completion/ctest
index 327e12c..387672a 100644
--- a/Auxiliary/bash-completion/ctest
+++ b/Auxiliary/bash-completion/ctest
@@ -3,7 +3,14 @@
_ctest()
{
local cur prev words cword
- _init_completion -n = || return
+ if type -t _init_completion >/dev/null; then
+ _init_completion -n = || return
+ else
+ # manual initialization for older bash completion versions
+ COMPREPLY=()
+ cur="${COMP_WORDS[COMP_CWORD]}"
+ prev="${COMP_WORDS[COMP_CWORD-1]}"
+ fi
case "$prev" in
-C|--build-config)