From 587276b7c225e145ecaf18b11c2057a2bd3ced13 Mon Sep 17 00:00:00 2001 From: Joe Bloggs Date: Fri, 2 May 2014 00:43:08 +0100 Subject: [PATCH] Correction to _regex_arguments example --- zsh-completions-howto.org | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/zsh-completions-howto.org b/zsh-completions-howto.org index 0f0c6f7..ad698b4 100644 --- a/zsh-completions-howto.org +++ b/zsh-completions-howto.org @@ -278,11 +278,11 @@ Here is an example: #+BEGIN_SRC sh _regex_arguments _hello /$'[^\0]##\0'/ \( /$'word1(a|b|c)\0'/ ':word:first word:(word1a word1b word1c)' '|'\ /$'word11(a|b|c)\0'/ ':word:first word:(word11a word11b word11c)' \( /$'word2(a|b|c)\0'/ ':word:second word:(word2a word2b word2c)'\ - '|' /$'word22(a|b|c)\0'/ ':word:second word:(word22a word22b word22c)' \) \) + \) \) _cmd "$@" #+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 -word is allowed which can be word2 followed by and a, b, or c, or a filename. +word is allowed which can be word2 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 specifications for _regex_arguments.