-
-
Notifications
You must be signed in to change notification settings - Fork 40
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
Fix windows terminal support #267
Fix windows terminal support #267
Conversation
src/main.c
Outdated
@@ -268,6 +268,15 @@ char* resolveEntryPath(ENGINE* engine, char* entryArgument, bool autoResolve) { | |||
|
|||
int main(int argc, char* argv[]) | |||
{ | |||
#ifdef __MINGW32__ | |||
// WT_SESSION = Windows terminal, SESSIONNAME=Console == Powershell and CMD and TERM_PROGRAM=Tabby == Tabby |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It worries me that we have to customise this for each particular terminal.
There's a chance someone tries to use some other unusual terminal and it breaks. Any chance we could do better?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It doesn't seems so at the moment unless there are some way of determining wether console is allready attached or not. In anycase there is only few options for terminals on windows unlike linux or mac. Im not saying that there can't be new issues about it down the line but they either can be fixed by adding it to the list or not (if there is no env var to make it unique).As far as I know lot of users use powershell and lot use win terminal now that it comes as a default.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
we could add a flag that is checked at the start that also applies this fix. ./dome.exe -t
for example and you could use it with other flags then ./dome.exe -t --help
for example even if there is an issue with unknown terminal then there would be a functional workaround altho funny problem with it is that you get no output what so ever so if people don't read about this in docs they won't know about the flag like I didn't know about the -c flag until I looked into dome-out.log
and found that it outputs --help
in there as well.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@avivbeeri is this more acceptable 887ebfc
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'll have to do a build and verify it for myself before I approve it, but that looks quite good!
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
it do be bit wonky on cmd and ps but hey it outputs stuff so thats improvement. If run trough windows terminal its good on all 3 (ps, cmd, git bash) and on tabby it works fine as well and pure git bash works just as it did before,
Sorry to have left this hanging for so long. I intend to look at it this week, and maybe push it out as part of a patch release before the weekend. |
Turns out, I'm not in a position to build this for windows right now, but it's innocuous enough that I'm happy to merge it. You should add yourself to the AUTHORS file before I do :) |
Fixing windows terminal support as well as powershell and cmd support since they weren't outputing anything either.