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
co-authored by Shohei YOSHIDA
parent 335af5c72d
commit d326bdc241
+1 -1
View File
@@ -44,7 +44,7 @@ _arguments -A "-*" -n \
'--print-all-ignored[print all ignored lines, no matter how many]' \
'(-t --log-traceback)'{-t,--log-traceback}'[enrich log-messages with compressed 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\)' \
'3:file:_files -W /etc/fail2ban/filter.d -g \*\.\(conf\|local\)'