summaryrefslogtreecommitdiff
path: root/Docs
diff options
context:
space:
mode:
authorKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-12-23 09:30:24 +0100
committerKévin THIERRY <kevin.thierry@open.eurogiciel.org>2014-12-23 09:30:24 +0100
commit317dbdb79761ef65e45c7358cfc7571c6afa54ad (patch)
treed6e8d59029aea04ca4a0579fb1c19c3e493af78f /Docs
parent297c63fa65327491a2b50e521b661c5835a19fe4 (diff)
downloadcmake-317dbdb79761ef65e45c7358cfc7571c6afa54ad.tar.gz
cmake-317dbdb79761ef65e45c7358cfc7571c6afa54ad.tar.bz2
cmake-317dbdb79761ef65e45c7358cfc7571c6afa54ad.zip
Imported Upstream version 2.8.12.2upstream/2.8.12.2sandbox/kevinthierry/upstream
Diffstat (limited to 'Docs')
-rw-r--r--Docs/CMakeLists.txt5
-rw-r--r--Docs/bash-completion/CMakeLists.txt2
-rw-r--r--Docs/bash-completion/cmake16
-rw-r--r--Docs/bash-completion/cpack10
-rw-r--r--Docs/bash-completion/ctest4
5 files changed, 19 insertions, 18 deletions
diff --git a/Docs/CMakeLists.txt b/Docs/CMakeLists.txt
index a5e91c9d1..34090d234 100644
--- a/Docs/CMakeLists.txt
+++ b/Docs/CMakeLists.txt
@@ -1,4 +1,3 @@
-string(REGEX REPLACE "^/(.*)" "\\1" REL_CMAKE_DATA_DIR "${CMAKE_DATA_DIR}")
-install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${REL_CMAKE_DATA_DIR}/editors/vim)
-install(FILES cmake-mode.el DESTINATION ${REL_CMAKE_DATA_DIR}/editors/emacs)
+install(FILES cmake-help.vim cmake-indent.vim cmake-syntax.vim DESTINATION ${CMAKE_DATA_DIR}/editors/vim)
+install(FILES cmake-mode.el DESTINATION ${CMAKE_DATA_DIR}/editors/emacs)
add_subdirectory (bash-completion)
diff --git a/Docs/bash-completion/CMakeLists.txt b/Docs/bash-completion/CMakeLists.txt
index 592b71e93..c0a88999e 100644
--- a/Docs/bash-completion/CMakeLists.txt
+++ b/Docs/bash-completion/CMakeLists.txt
@@ -5,4 +5,4 @@
# add symlinks to the files in appropriate places
# /etc/bash_completion.d/
# DATADIR/completions (may be /usr/share/<package>/completions
-install(FILES cmake cpack ctest DESTINATION ${REL_CMAKE_DATA_DIR}/completions)
+install(FILES cmake cpack ctest DESTINATION ${CMAKE_DATA_DIR}/completions)
diff --git a/Docs/bash-completion/cmake b/Docs/bash-completion/cmake
index 59b565ac0..59e02987b 100644
--- a/Docs/bash-completion/cmake
+++ b/Docs/bash-completion/cmake
@@ -100,21 +100,23 @@ _cmake()
return
;;
-G)
- # FIXME: doesn't work properly
local IFS=$'\n'
+ local quoted
+ printf -v quoted %q "$cur"
COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \
- "/^.*[^ ].*= Generates/{s|^ *\(.*[^ ]\) *= Generates.*$|\1|;s| |\\\\ |g;p}" \
- 2>/dev/null )' -- "$cur" ) )
+ -e "1,/^Generators/d" \
+ -e "/^ *[^ =]/{s|^ *\([^=]*[^ =]\).*$|\1|;s| |\\\\ |g;p}" \
+ 2>/dev/null )' -- "$quoted" ) )
return
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cmake --help-command-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-module)
COMPREPLY=( $( compgen -W '$( cmake --help-module-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-policy)
@@ -124,12 +126,12 @@ _cmake()
;;
--help-property)
COMPREPLY=( $( compgen -W '$( cmake --help-property-list \
- 2>/dev/null | tail -n +2 )' -- "$cur" ) )
+ 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cmake --help-variable-list \
- 2>/dev/null | tail -n +2 )' -- "$cur" ) )
+ 2>/dev/null | grep -v "^cmake version " )' -- "$cur" ) )
return
;;
esac
diff --git a/Docs/bash-completion/cpack b/Docs/bash-completion/cpack
index a0c1f8375..9ab604839 100644
--- a/Docs/bash-completion/cpack
+++ b/Docs/bash-completion/cpack
@@ -8,8 +8,8 @@ _cpack()
case "$prev" in
-G)
COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null |
- grep "^ .*= .*" 2> /dev/null | grep -v "^ -" 2>/dev/null |
- cut -d" " -f 3 )' -- "$cur" ) )
+ sed -e "1,/^Generators/d" -e "s|^ *\([^ ]*\) .*$|\1|" \
+ 2>/dev/null )' -- "$cur" ) )
return
;;
-C)
@@ -20,7 +20,7 @@ _cpack()
-D)
[[ $cur == *=* ]] && return # no completion for values
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
- 2>/dev/null | tail -n +2 )' -S = -- "$cur" ) )
+ 2>/dev/null | grep -v "^cpack version " )' -S = -- "$cur" ) )
compopt -o nospace
return
;;
@@ -38,12 +38,12 @@ _cpack()
;;
--help-command)
COMPREPLY=( $( compgen -W '$( cpack --help-command-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^cpack version " )' -- "$cur" ) )
return
;;
--help-variable)
COMPREPLY=( $( compgen -W '$( cpack --help-variable-list \
- 2>/dev/null | tail -n +2 )' -- "$cur" ) )
+ 2>/dev/null | grep -v "^cpack version " )' -- "$cur" ) )
return
;;
esac
diff --git a/Docs/bash-completion/ctest b/Docs/bash-completion/ctest
index 9707f6269..25cb99841 100644
--- a/Docs/bash-completion/ctest
+++ b/Docs/bash-completion/ctest
@@ -54,7 +54,7 @@ _ctest()
return
;;
-S|--script|-SP|--script-new-process)
- # FIXME ?
+ _filedir '@(cmake|ctest)'
return
;;
--interactive-debug-mode)
@@ -63,7 +63,7 @@ _ctest()
;;
--help-command)
COMPREPLY=( $( compgen -W '$( ctest --help-command-list 2>/dev/null|
- tail -n +2 )' -- "$cur" ) )
+ grep -v "^ctest version " )' -- "$cur" ) )
return
;;
esac