You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Open the first link from clipboard text with multiple URLs - #16564
Opening clipboard text with two links on one line hands the browser both URLs joined into one malformed address. Keep only the first extracted match, matching what the helper already does when the links are on separate lines.
grep -m1 stops after one matching input line, but -o can print several URLs from it. Select the first output line and strengthen the existing URL fixture to cover the failure.
Same clipboard text
Before
After
See https://example.com/first and https://example.org/second
One argument containing both URLs separated by a newline
https://example.com/first
Links on separate lines
First URL
First URL
Single URL with query and fragment
Original URL
Original URL
Validation: the updated regression fails on the baseline; all 84 clipboard checks pass with the fix. Five independent real-helper cases cover the two link layouts, a single URL, a bare domain and plain text. Bash syntax and git diff --check pass. Tests use temporary history files and record browser/editor calls without launching desktop apps.
The bug is real. I reproduced it on a disposable Omarchy worker with my own harness that records what omarchy-launch-browser receives. On quattro, See https://example.com/first and https://example.org/second reaches the browser as one argument with a newline between the two URLs, and so does a line with three links. On this branch only the first URL is passed. With the | head -n 1 reverted, the bug comes back. Links on separate lines, a single URL with a query and fragment, a bare domain, and plain text going to the editor all behave the same before and after.
On the same worker, test/shell.d/clipboard-test.sh passes 84/84 on this head, and it fails with the fix reverted. ./test/cli passes too.
Codex at medium effort reviewed it as a second opinion. It found the change correct and proportionate: with no pipefail, the pipeline takes head's exit status, so an entry with no URL still falls through to the bare-domain match and then the editor. Its one note was that the fixture change replaces the only test of an entry that is just a URL. I left that as it is, because the new fixture runs the same extraction and the regression is what needed covering. Restoring the single-URL case beside it would be a small, optional follow-up. The panel's second model did not answer. Codex's agreement may not be fully independent, because it can read this session's working files.
It fixes #16563. #13706 and #15241 also change omarchy-clipboard-open, but they fix different things (trailing punctuation and trailing newlines), so they don't compete with this one. This is now waiting on the maintainer.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
bugSomething isn't workingreadyGood to mergeverifiedOmarchy Triage has verified that this issue is ready for final review
2 participants
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Opening clipboard text with two links on one line hands the browser both URLs joined into one malformed address. Keep only the first extracted match, matching what the helper already does when the links are on separate lines.
grep -m1stops after one matching input line, but-ocan print several URLs from it. Select the first output line and strengthen the existing URL fixture to cover the failure.See https://example.com/first and https://example.org/secondhttps://example.com/firstValidation: the updated regression fails on the baseline; all 84 clipboard checks pass with the fix. Five independent real-helper cases cover the two link layouts, a single URL, a bare domain and plain text. Bash syntax and
git diff --checkpass. Tests use temporary history files and record browser/editor calls without launching desktop apps.Fixes #16563