Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Example under _regex_arguments section is different from the explanation for the example itself? #1106

Open
fishBone000 opened this issue Sep 18, 2024 · 0 comments

Comments

@fishBone000
Copy link

Here is an example:
#+BEGIN_SRC sh
_regex_arguments _cmd /$'[^\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.

The explanation for the example and the example itself seems a bit different?

The example seems to say that we should match:

  • Any non-empty command
  • Any branch below
    • word1(a|b|c)
    • word11(a|b|c)
      • Any branch below
        • word2(a|b|c)
        • word22(a|b|c)

But the explanation says something else, like the second word can be word2(a|b|c) or a filename.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant