Update zsh-completions-howto.org

Fix explanation of _regex_arguments example
This commit is contained in:
vapniks 2026-04-18 22:59:48 +01:00 committed by GitHub
parent ed67fbb8ee
commit fbdd3b36b6
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
1 changed files with 1 additions and 1 deletions

View File

@ -296,7 +296,7 @@ _regex_arguments _cmd /$'[^\0]##\0'/ \( /$'word1(a|b|c)\0'/ ':word:first word:(w
_cmd "$@" _cmd "$@"
#+END_SRC #+END_SRC
in this case the first word can be word1 or word11 followed by an a, b or c, and if the first word contains 11 then a second in this case the first word can be word1 or word11 followed by an a, b or c, and if the first word contains 11 then a second
word is allowed which can be word2 followed by and a, b, or c, or a filename. word is allowed which can be word2 or word22 followed by and a, b, or c.
If this sounds too complicated a much simpler alternative is to use the _regex_words function for creating If this sounds too complicated a much simpler alternative is to use the _regex_words function for creating
specifications for _regex_arguments. specifications for _regex_arguments.