-
-
Notifications
You must be signed in to change notification settings - Fork 802
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
WindowTitle set by user overwritten by module #594
Comments
It seems to me that setting Module parameters are a rather poor experience, so I'm more inclined to defer |
@dahlbyk - Yes, agree that the window title should be left alone if $GitPromptSettings.WindowTitle is $null/$false |
So the issue is that if someone disables |
I'm fine with this. The primary use case here is setting a personal preference in |
Sounds good. I'll submit a PR for this tonight. |
We used to restore the previousWindowTitle but this had the effect of always updating the WindowTitle with a fixed string - whatever we captured in $PreviousWindowTitle. However, we still restore the original window title when the module is removed. But we only do this if the module is configured to supply the window title. Rename variable to make its intent clearer. Fixes #594
@dahlbyk Thanks! |
System Details
Issue Description
I have the following in my $profile:
If I start a script that changes
$host.UI.RawUI.WindowTitle
directly then this still gets overwritten with$PreviousWindowTitle
that was initialised with the text from when the PowerShell window was started. I would like my script to be able to change the title and have the same effect regardless of whether posh-git is loaded.I know there has been some discussion about this before in previous issues - but could it be considered that a setting could be added to
$GitPromptSettings
to disable any update of$host.UI.RawUI.WindowTitle
?Maybe this could also be added as a parameter when the module starts so that the WindowTitle never gets updated or changed by the module (and hence would not need to be reverted to $PreviousWindowTitle).
The text was updated successfully, but these errors were encountered: