aboutsummaryrefslogtreecommitdiffstats
path: root/src/_pkcon
diff options
context:
space:
mode:
authorShohei YOSHIDA <syohex@gmail.com>2023-08-17 12:13:27 +0900
committerShohei YOSHIDA <syohex@gmail.com>2023-08-17 12:13:27 +0900
commitba54f170a6250080ca88089ac6bf8cfbfe3c2b43 (patch)
treee7fbfccd088e06e0e3352e9b16eab56339ffe8fa /src/_pkcon
parentMerge pull request #1026 from zsh-users/update-rubocop (diff)
downloadzsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.tar
zsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.tar.gz
zsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.tar.bz2
zsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.tar.lz
zsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.tar.xz
zsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.tar.zst
zsh-completions-ba54f170a6250080ca88089ac6bf8cfbfe3c2b43.zip
Avoid defining local variable options
zsh has the built in variable 'options'. zsh sometimes behaves weirdly when there is a local variable that is named 'options'
Diffstat (limited to 'src/_pkcon')
-rw-r--r--src/_pkcon12
1 files changed, 6 insertions, 6 deletions
diff --git a/src/_pkcon b/src/_pkcon
index 3bf8057..e8a7ba9 100644
--- a/src/_pkcon
+++ b/src/_pkcon
@@ -36,8 +36,8 @@
# ------------------------------------------------------------------------------
-local -a options
-options=(
+local -a command_options
+command_options=(
'--version[Show the program version and exit]'
'--filter[Set the filter, e.g. installed]'
"--root[Set the install root, e.g. '/' or '/mnt/ltsp']"
@@ -107,23 +107,23 @@ done
if [[ -z "$cmd" ]]
then
- _arguments -s -w : $options \
+ _arguments -s -w : $command_options \
":action:($actions)"
return
fi
case "$cmd" in
search)
- _arguments : $options \
+ _arguments : $command_options \
':type:(name details group file)' \
':data: :'
;;
refresh)
- _arguments -s -w : $options \
+ _arguments -s -w : $command_options \
'--force'
;;
*)
- _arguments -s -w : $options
+ _arguments -s -w : $command_options
;;
esac
return 1