Send patches - preferably formatted by git format-patch - to patches at archlinux32 dot org.
summaryrefslogtreecommitdiff
path: root/contrib/completion/zsh
diff options
context:
space:
mode:
authorChristian Heusel <christian@heusel.eu>2024-04-23 14:57:55 +0200
committerLevente Polyak <anthraxx@archlinux.org>2024-04-24 22:55:18 +0200
commitdced77d23de2a9b00faed40350d229aaaffaa4b2 (patch)
tree566a382484bfb3a6be417b012da05d985ca23f09 /contrib/completion/zsh
parent5780ba0e380d619c7e6632edbf6e357dce73289f (diff)
fix(completion): fix erroneous completion variables
The architecture definition of the variable was using invalid bash syntax and was previously unused: $ _binary_arch=${DEVTOOLS_VALID_ARCHES[*]:0:-1} bash: -1: substring expression < 0 We therefore fix the definition of the variable and use it for the autocompletion of the offload-build command. Furthermore fix wrongly named architecture variables that have been missed from previous refactoring. Fixes #222 Component: completion Fixes: f961e2e ("completion: implemented structured declarative bash completions") Fixes: 4173e0a ("chore: refactor variable names in valid-{tags,repos}.sh") Signed-off-by: Christian Heusel <christian@heusel.eu> Co-authored-by: Levente Polyak <anthraxx@archlinux.org>
Diffstat (limited to 'contrib/completion/zsh')
-rw-r--r--contrib/completion/zsh/_devtools.in9
1 files changed, 4 insertions, 5 deletions
diff --git a/contrib/completion/zsh/_devtools.in b/contrib/completion/zsh/_devtools.in
index 7c0fe91..65c7352 100644
--- a/contrib/completion/zsh/_devtools.in
+++ b/contrib/completion/zsh/_devtools.in
@@ -14,7 +14,6 @@ source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-inspect.sh
# shellcheck source=src/lib/valid-search.sh
source "${_DEVTOOLS_LIBRARY_DIR}"/lib/valid-search.sh
-_binary_arch=${DEVTOOLS_VALID_ARCHES[*]:0:-1}
_colors=(never always auto)
_archbuild_args=(
@@ -41,8 +40,8 @@ _pkgctl_auth_status_args=(
)
_pkgctl_build_args=(
- "--arch=[Specify architectures to build for (disables auto-detection)]:arch:($_arch[*])"
- "--repo=[Specify a target repository (disables auto-detection)]:repo:($DEVTOOLS_VALID_REPOS[*])"
+ "--arch[Specify architectures to build for (disables auto-detection)]:arch:($DEVTOOLS_VALID_BINARY_ARCHES[*])"
+ "--repo[Specify a target repository (disables auto-detection)]:repo:($DEVTOOLS_VALID_REPOS[*])"
'(-s --staging)'{-s,--staging}'[Build against the staging counterpart of the auto-detected repo]'
'(-t --testing)'{-t,--testing}'[Build against the testing counterpart of the auto-detected repo]'
'(-o --offload)'{-o,--offload}'[Build on a remote server and transfer artifacts afterwards]'
@@ -79,7 +78,7 @@ _pkgctl_db_move_args=(
)
_pkgctl_db_remove_args=(
- '(-a --arch=)'{-a,--arch=}"[Override the architecture (disables auto-detection)]:arch:($_arch[*])"
+ '(-a --arch)'{-a,--arch}"[Override the architecture (disables auto-detection)]:arch:($DEVTOOLS_VALID_BINARY_ARCHES[*])"
'(-h --help)'{-h,--help}'[Display usage]'
"1:repo:($DEVTOOLS_VALID_REPOS[*])"
'*:pkgbase:_devtools_completions_all_packages'
@@ -250,7 +249,7 @@ _sogrep_args=(
_offload_build_args=(
'(-r --repo)'{-r,--repo}'[Build against a specific repository]:repo:($DEVTOOLS_VALID_BUILDREPOS[*])'
- '(-a --arch)'{-a,--arch}'[Build against a specific architecture]:arch:(${_binary_arch[*]})'
+ '(-a --arch)'{-a,--arch}'[Build against a specific architecture]:arch:(${DEVTOOLS_VALID_BINARY_ARCHES[*]})'
'(-s --server)'{-s,--server}'[Offload to a specific Build server]:server:'
'(-h --help)'{-h,--help}'[Display usage]'
)