Merge pull request #982 from zsh-users/fix_broken_completion

Fix broken completion and use awk instead of perl for portability
This commit is contained in:
Shohei YOSHIDA 2023-01-10 11:13:57 +09:00 committed by GitHub
commit 1204f45161
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 9 additions and 1 deletions

View File

@ -33,7 +33,7 @@
_gpgconf_component() {
local values=(
"${(@f)$(gpgconf --list-components | perl -F: -ale 'print "${F[0]}[$F[1]]"')}"
"${(@f)$(gpgconf --list-components | awk -F: '{printf "%s[%s]\n", $1, $2}')}"
)
if [ "${action[2]}" = all ]; then
values+=('all[All daemon components]')
@ -67,3 +67,11 @@ _arguments \
'(-q --quiet)'{-q,--quiet}'[quiet]' \
'(-n --dry-run)'{-n,--dry-run}'[do not make any changes]' \
'(-r --runtime)'{-r,--runtime}'[activate changes at runtime, if possible]'
# Local Variables:
# mode: Shell-Script
# sh-indentation: 2
# indent-tabs-mode: nil
# sh-basic-offset: 2
# End:
# vim: ft=zsh sw=2 ts=2 et