Merge topic 'bash-completion-updates'
f85f6a5
bash-completion: Fix/improve generator names extraction351fd63
bash-completion: Add -S,-SP options arguments completion
This commit is contained in:
commit
f2db78c120
|
@ -100,11 +100,13 @@ _cmake()
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
-G)
|
-G)
|
||||||
# FIXME: doesn't work properly
|
|
||||||
local IFS=$'\n'
|
local IFS=$'\n'
|
||||||
|
local quoted
|
||||||
|
printf -v quoted %q "$cur"
|
||||||
COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \
|
COMPREPLY=( $( compgen -W '$( cmake --help 2>/dev/null | sed -n \
|
||||||
"/^.*[^ ].*= Generates/{s|^ *\(.*[^ ]\) *= Generates.*$|\1|;s| |\\\\ |g;p}" \
|
-e "1,/^Generators/d" \
|
||||||
2>/dev/null )' -- "$cur" ) )
|
-e "/^ *[^ =]/{s|^ *\([^=]*[^ =]\).*$|\1|;s| |\\\\ |g;p}" \
|
||||||
|
2>/dev/null )' -- "$quoted" ) )
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--help-command)
|
--help-command)
|
||||||
|
|
|
@ -8,8 +8,8 @@ _cpack()
|
||||||
case "$prev" in
|
case "$prev" in
|
||||||
-G)
|
-G)
|
||||||
COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null |
|
COMPREPLY=( $( compgen -W '$( cpack --help 2>/dev/null |
|
||||||
grep "^ .*= .*" 2> /dev/null | grep -v "^ -" 2>/dev/null |
|
sed -e "1,/^Generators/d" -e "s|^ *\([^ ]*\) .*$|\1|" \
|
||||||
cut -d" " -f 3 )' -- "$cur" ) )
|
2>/dev/null )' -- "$cur" ) )
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
-C)
|
-C)
|
||||||
|
|
|
@ -54,7 +54,7 @@ _ctest()
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
-S|--script|-SP|--script-new-process)
|
-S|--script|-SP|--script-new-process)
|
||||||
# FIXME ?
|
_filedir '@(cmake|ctest)'
|
||||||
return
|
return
|
||||||
;;
|
;;
|
||||||
--interactive-debug-mode)
|
--interactive-debug-mode)
|
||||||
|
|
Loading…
Reference in New Issue