Skip to content

Function name parsing can't handle special chars #6

@GB609

Description

@GB609

Bash allows almost any utf-8 character as part of a function name.

Shdoc currently only handles/allows [a-zA-Z0-9_\-:-\\.]+ which appears to be:

  • all lower ascii letters
  • all upper ascii letters
  • all digits
  • _, -, .
  • the range between : - \
    This is strange because it includes all uppercase letters and only a handful of special characters ;<=>?@[, ; in fact even leads to a syntax error.
    The - between : and \\ rather appears to be a coding error.

It might be better to replace the positive matching with a negation of the disallowed characters, which are \()&|;.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions