-
-
Notifications
You must be signed in to change notification settings - Fork 109
Closed
Description
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!
kbdharun
Metadata
Metadata
Assignees
Labels
No labels