diff options
author | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
---|---|---|
committer | Joe Rayhawk <jrayhawk@fairlystable.org> | 2025-04-30 02:07:56 -0700 |
commit | 26e09889646be3ea65b4a3dfeda26213e4bb6a27 (patch) | |
tree | 4f3c73a9416bf47ad7e125383d23cf42879e38d7 /Completion/Unix/Command/_xfconf-query | |
parent | 841bce705a58b04220b1f257abcc00ae71cbdbdc (diff) | |
parent | 001cba48ce3b964cf01fb3e2af54b20eacbc9bf5 (diff) | |
download | zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.tar.gz zsh-26e09889646be3ea65b4a3dfeda26213e4bb6a27.zip |
Merge branch 'upstream' into debian
Diffstat (limited to 'Completion/Unix/Command/_xfconf-query')
-rw-r--r-- | Completion/Unix/Command/_xfconf-query | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/Completion/Unix/Command/_xfconf-query b/Completion/Unix/Command/_xfconf-query new file mode 100644 index 000000000..fa535401f --- /dev/null +++ b/Completion/Unix/Command/_xfconf-query @@ -0,0 +1,33 @@ +#compdef xfconf-query +local curcontext="$curcontext" state state_descr line ret=1 +typeset -A opt_args + +_arguments -C -s -w : \ + '(-c --channel)'{-c,--channel}'[select channel to query/modify]:channel:( ${$(xfconf-query -l)\:#Channels\:} )' \ + '(-p --property)'{-p,--property}'[select property to query/modify]:property:->property' \ + '(-v --verbose)'{-v,--verbose}'[print property and value (with -l/-m)]' \ + '(-t --type)'{-t,--type}'[specify the property value type]:type:(empty string bool {,u}int{,16,64} double array {,u}char float)' \ + '(-R --recursive)'{-R,--recursive}'[recursively reset properties (with -r)]' \ + + '(operations)' \ + {-h,--help}'[show help options]' \ + {-V,--version}'[show version information]' \ + {-s,--set}'[define the value of a property]:value' \ + {-l,--list}'[list properties or channels]' \ + {-n,--create}'[create a new property]:new property name' \ + {-r,--reset}'[reset property]' \ + {-T,--toggle}'[invert boolean property]' \ + {-m,--monitor}'[monitor a channel for property changes]' && return + +case $state in + property) + # if -c/--channel is currently on the line, use it to complete an property. + if [[ -v opt_args[(i)-(c|-channel)] ]]; then + local expl + _wanted properties expl property compadd "$@" -- ${(f)"$(xfconf-query -c ${(v)opt_args[(i)-(c|-channel)]} -l)"} && ret=0 + else # just display a message + _message -e properties property && ret=0 + fi + ;; +esac + +return ret |