Skip to content

fix terminal name retrieval and update packages#3

Merged
gantoreno merged 1 commit intogantoreno:mainfrom
paraversal:main
Dec 29, 2024
Merged

fix terminal name retrieval and update packages#3
gantoreno merged 1 commit intogantoreno:mainfrom
paraversal:main

Conversation

@paraversal
Copy link
Contributor

despite convention, TERM_PROGRAM is only set on some terminals and the unwrap() leads to crashes when ran terminals that don't set it, such as Alacritty and kitty (#2). This issue is fixed by checking for terminal-specific vars for these two terminals and adds a graceful "unknown" fallback option in case anyone dare use a different terminal emulator.

Also had to run cargo update to make the program compile on the newest rust version.

despite convention, TERM_PROGRAM is only set on some terminals and the unwrap() leads to crashes when ran terminals that don't set it, such as Alacritty and kitty (gantoreno#2). This issue is fixed by checking for terminal-specific vars for these two terminals and adds a graceful "unknown" fallback option in case anyone dare use a different terminal emulator.

Also had to run cargo update to make the program compile on the newest rust version.
@gantoreno
Copy link
Owner

This is great @paraversal, thank you so much for taking the time to come up with this! Since I was a long-time iTerm2 user (now fully switched to Ghostty), I wasn't aware of how little we could rely on TERM_PROGRAM being set. Having those extra special cases along with the fallback is fantastic. 🙌🏻

@gantoreno gantoreno merged commit 20ad244 into gantoreno:main Dec 29, 2024
@gantoreno gantoreno mentioned this pull request Dec 29, 2024
@gantoreno gantoreno added bug Something isn't working enhancement New feature or request and removed enhancement New feature or request labels Jan 3, 2026
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

bug Something isn't working

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants