update 'profile' command completion
This commit is contained in:
parent
81565c73e1
commit
f031b84aa8
37
src/_conan
37
src/_conan
|
|
@ -560,12 +560,25 @@ _conan_lock() {
|
||||||
|
|
||||||
(( $+functions[_conan_profile] )) ||
|
(( $+functions[_conan_profile] )) ||
|
||||||
_conan_profile() {
|
_conan_profile() {
|
||||||
|
local curcontext=$curcontext state state_descr line ret=1
|
||||||
|
typeset -A opt_args
|
||||||
|
|
||||||
_arguments -C \
|
_arguments -C \
|
||||||
'(- : *)'{-h,--help}'[display help information]' \
|
'(- : *)'{-h,--help}'[display help information]' \
|
||||||
'1: :_conan_profile_commands' \
|
'1:subcommand:->subcommand' \
|
||||||
'*:: :->args'
|
'*:: :->args' \
|
||||||
|
&& ret=0
|
||||||
|
|
||||||
case $state in
|
case $state in
|
||||||
|
(subcommand)
|
||||||
|
local -a commands=(
|
||||||
|
'detect:generate a profile using auto-detected values'
|
||||||
|
'list:list all profiles in the cache'
|
||||||
|
'path:show profile path location'
|
||||||
|
'show:show aggregated profiles from the passed arguments'
|
||||||
|
)
|
||||||
|
_describe -t 'commands' "command" commands && ret=0
|
||||||
|
;;
|
||||||
(args)
|
(args)
|
||||||
local opts=($_conan_common_options[@])
|
local opts=($_conan_common_options[@])
|
||||||
case $words[1] in
|
case $words[1] in
|
||||||
|
|
@ -573,6 +586,7 @@ _conan_profile() {
|
||||||
opts+=(
|
opts+=(
|
||||||
'--name[profile name, "default" if not specified]::name'
|
'--name[profile name, "default" if not specified]::name'
|
||||||
'(-f --force)'{-f,--force}'[overwrite if exists]'
|
'(-f --force)'{-f,--force}'[overwrite if exists]'
|
||||||
|
'(-e --exist-ok)'{-e,--exist-ok}'[if the profile already exist, do not detect a new one]'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
(list)
|
(list)
|
||||||
|
|
@ -580,27 +594,22 @@ _conan_profile() {
|
||||||
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
(path|show)
|
(path)
|
||||||
|
opts+=('*:name')
|
||||||
|
;;
|
||||||
|
(show)
|
||||||
opts+=(
|
opts+=(
|
||||||
|
'(-cx --context)'{-cx,--context}'[context to profile]:context:(host build)'
|
||||||
$conan_profile_options[@]
|
$conan_profile_options[@]
|
||||||
)
|
)
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
||||||
_arguments "$opts[@]"
|
_arguments "$opts[@]" && ret=0
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
|
||||||
|
|
||||||
(( $+functions[_conan_profile_commands] )) ||
|
return ret
|
||||||
_conan_profile_commands() {
|
|
||||||
local -a commands=(
|
|
||||||
'detect:generate a profile using auto-detected values'
|
|
||||||
'list:list all profiles in the cache'
|
|
||||||
'path:show profile path location'
|
|
||||||
'show:show aggregated profiles from the passed arguments'
|
|
||||||
)
|
|
||||||
_describe -t 'commands' "command" commands
|
|
||||||
}
|
}
|
||||||
|
|
||||||
(( $+functions[_conan_remote] )) ||
|
(( $+functions[_conan_remote] )) ||
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue