Surface xdg-open errors from the open shell helper#6198
Open
sridhar-3009 wants to merge 1 commit into
Open
Conversation
The open() alias was discarding both stdout and stderr, so any failure from xdg-open (unknown MIME type, missing handler, malformed path) was silently swallowed. This made debugging impossible from the terminal. Drop only the stderr redirection. Stdout is still suppressed (avoids noise from handlers that produce it), the call remains non-blocking (no job-control completion messages), and error output from xdg-open now reaches the user's terminal. Fixes basecamp#6056.
Contributor
There was a problem hiding this comment.
Pull request overview
This PR adjusts Omarchy’s interactive Bash open() helper so xdg-open failure messages are no longer silently discarded, while preserving the existing non-blocking behavior and keeping stdout suppressed to avoid handler noise.
Changes:
- Stop redirecting
xdg-openstderr to/dev/nullso errors are visible to the user. - Keep the subshell wrapper and background execution to avoid job-control completion noise.
Tip
If you aren't ready for review, convert to a draft PR.
Click "Convert to draft" or run gh pr ready --undo.
Click "Ready for review" or run gh pr ready to reengage.
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
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.
Problem
The
open()shell function silences both stdout and stderr fromxdg-open:When
xdg-openfails (unknown MIME type, missing handler, bad path), the usergets no output at all—the command just silently does nothing.
Reported in #6056.
Fix
Drop only the stderr redirection. The function remains non-blocking and keeps
stdout suppressed (avoids noise from handlers that write to it), but
xdg-openerrors now reach the terminal:One character change. The non-blocking / no-job-control-noise behavior from
#4366 is fully preserved.