Repository navigation
Conversation
- Check $TERMINAL before falling back to the hardcoded term_order list; only honor it when the terminal is in the known terminals array, so the correct invocation syntax is always used. - Fix invocations exposed by honoring $TERMINAL: ptyxis takes "-- PROGRAM" instead of -e, and kitty needs --wait-for-single-instance-window-close so the temp file isn't removed while a single-instance window is still opening it. - Try the ordered candidates until one launches; skip retrying on 126/127 (e.g. the user dismissed pkexec), notify and exit 2 when none work. - Append "exit 0" to the command script: terminals like foot and st propagate the child exit status, which must not be mistaken for a failed launch. - kgx: append the kill command for $TERMINAL=kgx too, guard it against PPID 1, and treat exit 131 (killed after completion) as success. - Remove set -e but abort on mktemp/echo failures and always clean up the temp file.
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.
Summary
terminal-helper documented $TERMINAL as the first-priority terminal (see the invariants comment), but never actually read it. The script always fell back to the hardcoded term_order list, so users' preferred terminal was ignored.
Honoring $TERMINAL makes every entry in the terminals map reachable, which exposed several latent issues in those previously untested code paths. This PR fixes them all.
Changes
Notes