diff options
author | Brad King <brad.king@kitware.com> | 2013-07-31 12:48:40 (GMT) |
---|---|---|
committer | CMake Topic Stage <kwrobot@kitware.com> | 2013-07-31 12:48:40 (GMT) |
commit | f2db78c120ada2a084d69abe0296709f56c5ed10 (patch) | |
tree | 5e820c8e3488a4190f0a6ef52256c010d2292a36 | |
parent | b728ec3c3160e26dbfb7631aebd6fa22cfe6e20f (diff) | |
parent | f85f6a5e795e7c552944a885a1f5f978fa847433 (diff) | |
download | CMake-f2db78c120ada2a084d69abe0296709f56c5ed10.zip CMake-f2db78c120ada2a084d69abe0296709f56c5ed10.tar.gz CMake-f2db78c120ada2a084d69abe0296709f56c5ed10.tar.bz2 |
Merge topic 'bash-completion-updates'
f85f6a5 bash-completion: Fix/improve generator names extraction
351fd63 bash-completion: Add -S,-SP options arguments completion
-rw-r--r-- | Docs/bash-completion/cmake | 8 | ||||
-rw-r--r-- | Docs/bash-completion/cpack | 4 | ||||
-rw-r--r-- | Docs/bash-completion/ctest | 2 |
3 files changed, 8 insertions, 6 deletions
diff --git a/Docs/bash-completion/cmake b/Docs/bash-completion/cmake index 59b565a..5f33c09 100644 --- a/Docs/bash-completion/cmake +++ b/Docs/bash-completion/cmake @@ -100,11 +100,13 @@ _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) diff --git a/Docs/bash-completion/cpack b/Docs/bash-completion/cpack index a0c1f83..51638c5 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) diff --git a/Docs/bash-completion/ctest b/Docs/bash-completion/ctest index 9707f62..7433d3d 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) |