Skip to content

Autocomplete not working on macOS #194

@stevejbrown

Description

@stevejbrown

I get the error (eval):1: bad pattern: [head, when trying to autocomplete tldr pages using zsh on macOS. I assume bash will have a similar error. This is because the BSD version of sed (default on macOS) doesn't support the non-word \W regular expression extension that is used in the create_parser function. As a result, non-word characters aren't stripped from the list of tldr pages generated for the completion script and the script generates an error when attempting to autocomplete.

Replacing \W with either the POSIX compliant [^[:alnum:]_] or [^a-zA-Z0-9_] solved the problem for me and should work across GNU and BSD platforms. If you would like, I can open a pull request with the change.

Thanks for providing this client!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions