Skip to content
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

allow terminal query responses to override TERM #1761

Closed
dankamongmen opened this issue Jun 14, 2021 · 8 comments · Fixed by #1765
Closed

allow terminal query responses to override TERM #1761

dankamongmen opened this issue Jun 14, 2021 · 8 comments · Fixed by #1765
Assignees
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Milestone

Comments

@dankamongmen
Copy link
Owner

dankamongmen commented Jun 14, 2021

if we get a vouchsafed identification from the terminal itself, we ought allow it to override the TERM variable for the purposes of our heuristics. Now that #1469 is complete, we're sending all queries relevant to identification. Pull the answers out, use them to set the termname authoritatively, and pass this into apply_heuristics() during terminal discovery.

We ought be able to identify at least:

  • WezTerm
  • kitty
  • alacritty
  • foot
  • XTerm
  • VTE

and we ought check for others.

Note that this does not include querying terminfo with the answer. For now, we will continue to rely on TERM for that.

@dankamongmen dankamongmen added documentation Improvements or additions to documentation enhancement New feature or request labels Jun 14, 2021
@dankamongmen dankamongmen added this to the 3.0.0 milestone Jun 14, 2021
@dankamongmen dankamongmen self-assigned this Jun 14, 2021
dankamongmen added a commit that referenced this issue Jun 14, 2021
@dankamongmen
Copy link
Owner Author

state: 9 char: 27 1b
state: 1 char: \ 92 5c
string terminator after [xterm-kitty]
state: 0 char: 27 1b
state: 1 char: [ 91 5b
state: 2 char: ? 63 3f
state: 14 char: 6 54 36
state: 18 char: 2 50 32

@dankamongmen
Copy link
Owner Author

string terminator after [~VTE]

@dankamongmen
Copy link
Owner Author

string terminator after [XTerm(366)]

@dankamongmen
Copy link
Owner Author

state: 9 char: 6 54 36
state: 10 char: D 68 44
state: 9 char: 27 1b
state: 1 char: \ 92 5c
string terminator after [mlterm]
state: 0 char: 27 1b
state: 1 char: [ 91 5b
state: 2 char: ? 63 3f
state: 16 char: 1 49 31

@dankamongmen
Copy link
Owner Author

state: 5 char: 9 57 39
state: 5 char: . 46 2e
state: 5 char: 0 48 30
state: 5 char: 27 1b
state: 1 char: \ 92 5c
string terminator after [terminology 1.9.0]
state: 0 char: 27 1b
state: 1 char: [ 91 5b
state: 2 char: ? 63 3f
state: 16 char: 6 54 36
state: 20 char: 4 52 34
state: 20 char: ; 59 3b
state: 20 char: 1 49 31

@dankamongmen
Copy link
Owner Author

i don't see anything yet for konsole, contour, st, or urxvt, nor alacritty actually

@dankamongmen
Copy link
Owner Author

string terminator after [FOOT]

dankamongmen added a commit that referenced this issue Jun 14, 2021
@dankamongmen
Copy link
Owner Author

we're now extracting these strings and matching them against queryterm_e enums.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
documentation Improvements or additions to documentation enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant