Skip to content

tty: support printing msys2 tty path#12083

Open
ChrisDenton wants to merge 1 commit intouutils:mainfrom
ChrisDenton:msys2-tty
Open

tty: support printing msys2 tty path#12083
ChrisDenton wants to merge 1 commit intouutils:mainfrom
ChrisDenton:msys2-tty

Conversation

@ChrisDenton
Copy link
Copy Markdown
Contributor

If we know we have a terminal handle then we can try printing its file name. If that fails then fallback to the default.

@ChrisDenton ChrisDenton force-pushed the msys2-tty branch 3 times, most recently from ed60a3c to 3ffb925 Compare April 29, 2026 15:55
Comment thread src/uu/tty/src/tty.rs Outdated
@oech3
Copy link
Copy Markdown
Contributor

oech3 commented Apr 29, 2026

This PR is useful when tty.exe is built for native Windows target, but working on MSYS2. Right?

@ChrisDenton
Copy link
Copy Markdown
Contributor Author

Yes, that's the idea. Which is one of the reasons rust's standard library supports detecting msys2 terminals even on the native targets.

Comment thread src/uu/tty/src/tty.rs
@oech3

This comment was marked as resolved.

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 29, 2026

GNU testsuite comparison:

Skipping an intermittent issue tests/date/date-locale-hour (passes in this run but fails in the 'main' branch)
Skipping an intermittent issue tests/tail/tail-n0f (passes in this run but fails in the 'main' branch)
Congrats! The gnu test tests/cut/bounded-memory is now passing!
Congrats! The gnu test tests/printf/printf-surprise is now passing!

@oech3

This comment was marked as resolved.

@ChrisDenton
Copy link
Copy Markdown
Contributor Author

Would you leave URL to the code for the case switching to std easier in the future?

Done.

https://github.com/uutils/coreutils/blob/main/.vscode/cspell.dictionaries/acronyms%2Bnames.wordlist.txt

Oh I added an ignore to the top of the file. But adding it to the word list does seem better because this is unlikely to be the only place it's used.

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.

2 participants