Fix error when no matching files in working dir

If there are no files in the current working directory, zparse opts complains with "missing argument for option: -g"

Co-authored-by: Shohei YOSHIDA <syohex@gmail.com>
This commit is contained in:
Jesse Ayala 2025-06-11 20:17:41 -04:00 committed by GitHub
parent 335af5c72d
commit d326bdc241
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -44,7 +44,7 @@ _arguments -A "-*" -n \
'--print-all-ignored[print all ignored lines, no matter how many]' \ '--print-all-ignored[print all ignored lines, no matter how many]' \
'(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed tracebacks]' \ '(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed tracebacks]' \
'--full-traceback[enrich log-messages with full, uncompressed tracebacks]:' \ '--full-traceback[enrich log-messages with full, uncompressed tracebacks]:' \
'1:file:_files -g *.log' \ '1:file:_files -g \*.log' \
'2:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' \ '2:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' \
'3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)' '3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)'