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

Refactor terminal detection #232

Merged
merged 3 commits into from
Jan 7, 2023
Merged

Refactor terminal detection #232

merged 3 commits into from
Jan 7, 2023

Conversation

swsnr
Copy link
Owner

@swsnr swsnr commented Jan 7, 2023

Introduce a separate TerminalApp struct to abstract terminal detection separately from terminal capabilities.

Check $TERM before all other environment variables; terminal emulators always set this variable and if it's something other than xterm-256colors it's definitely accurate.

Closes #230

@swsnr swsnr self-assigned this Jan 7, 2023
@swsnr swsnr force-pushed the refactor-terminal-detection branch from ccf2595 to a1ba186 Compare January 7, 2023 10:35
@swsnr swsnr marked this pull request as ready for review January 7, 2023 10:37
@swsnr swsnr force-pushed the refactor-terminal-detection branch 2 times, most recently from 1df7c01 to cf8c831 Compare January 7, 2023 10:45
Introduce a separate TerminalApp struct to abstract terminal detection
separately from terminal capabilities.

Check $TERM before all other environment variables; terminal emulators
always set this variable and if it's something other than
xterm-256colors it's definitely accurate.

Closes GH-230
@swsnr swsnr force-pushed the refactor-terminal-detection branch from cf8c831 to eedb1f7 Compare January 7, 2023 12:40
@swsnr swsnr enabled auto-merge January 7, 2023 12:40
@swsnr swsnr merged commit a1c3b02 into main Jan 7, 2023
@swsnr swsnr deleted the refactor-terminal-detection branch January 7, 2023 12:46
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

Starting a Kitty terminal from an ITerm2 terminal causes mdcat to detect iterm2 instead of kitty
1 participant