aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2026-06-25 11:33:41 +0900
committerShohei YOSHIDA <syohex@gmail.com>2026-06-25 11:33:41 +0900
commitf031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d (patch)
tree857a59b900f8114d1e3a7e942785ce37d6a17ee1 /src
parentupdate 'remote' command completion (diff)
downloadzsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.tar
zsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.tar.gz
zsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.tar.bz2
zsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.tar.lz
zsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.tar.xz
zsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.tar.zst
zsh-completions-f031b84aa8f0b95bfa88fc4b54ea8b88bb5ef87d.zip
update 'profile' command completion
Diffstat (limited to 'src')
-rw-r--r--src/_conan37
1 files changed, 23 insertions, 14 deletions
diff --git a/src/_conan b/src/_conan
index 7c6b81f..b4f5222 100644
--- a/src/_conan
+++ b/src/_conan
@@ -560,12 +560,25 @@ _conan_lock() {
(( $+functions[_conan_profile] )) ||
_conan_profile() {
+ local curcontext=$curcontext state state_descr line ret=1
+ typeset -A opt_args
+
_arguments -C \
'(- : *)'{-h,--help}'[display help information]' \
- '1: :_conan_profile_commands' \
- '*:: :->args'
+ '1:subcommand:->subcommand' \
+ '*:: :->args' \
+ && ret=0
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)
local opts=($_conan_common_options[@])
case $words[1] in
@@ -573,6 +586,7 @@ _conan_profile() {
opts+=(
'--name[profile name, "default" if not specified]::name'
'(-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)
@@ -580,27 +594,22 @@ _conan_profile() {
'(-f --format)'{-f,--format}'[select the output format]:format:(json)'
)
;;
- (path|show)
+ (path)
+ opts+=('*:name')
+ ;;
+ (show)
opts+=(
+ '(-cx --context)'{-cx,--context}'[context to profile]:context:(host build)'
$conan_profile_options[@]
)
;;
esac
- _arguments "$opts[@]"
+ _arguments "$opts[@]" && ret=0
;;
esac
-}
-(( $+functions[_conan_profile_commands] )) ||
-_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
+ return ret
}
(( $+functions[_conan_remote] )) ||