diff options
| author | Shohei YOSHIDA <syohex@gmail.com> | 2023-08-17 12:13:27 +0900 |
|---|---|---|
| committer | Shohei YOSHIDA <syohex@gmail.com> | 2023-08-17 12:13:27 +0900 |
| commit | ba54f170a6250080ca88089ac6bf8cfbfe3c2b43 (patch) | |
| tree | e7fbfccd088e06e0e3352e9b16eab56339ffe8fa /src/_pkcon | |
| parent | Merge pull request #1026 from zsh-users/update-rubocop (diff) | |
| download | zsh-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/_pkcon | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -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 |
