-
-
Notifications
You must be signed in to change notification settings - Fork 771
fix(completion): use POSIX whitespace in fish sed regex #2592
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
Conversation
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
This PR fixes a macOS compatibility issue in the Fish shell completion script by replacing non-POSIX compliant \s whitespace patterns with POSIX-compliant [[:space:]] in sed regex. This addresses broken tab-completion for task names on macOS where BSD sed doesn't support \s.
- Replaces
\swith[[:space:]]in two sed regex expressions - Ensures POSIX compliance for better cross-platform compatibility
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull request overview
Copilot reviewed 1 out of 1 changed files in this pull request and generated no new comments.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
Finally, this is what works "on my machine" (gotta remember to actually save the file before commiting 🙄 ). There may be more "elegant" ways to do it, but a quick way to test this is opening up I should note that the use of Edit: I want to be clear that, while I use it regularly, I am by no means a regex expert, especially not on the topic of portability of expressions between different versions of programs like |
|
Thanks for the PR! |
andreynering
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thank you @WinkelCode!
Non-POSIX compliant whitespace
\s( https://superuser.com/a/112837 ) causes broken task name tab-completion #2591 on macOS.Replacing
\swith[[:space:]]appears to fix the issue:into