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

Make TerminalType a parameter and default to xterm #8

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
5 changes: 3 additions & 2 deletions Functions/Public/Merge-PSPuTTYTheme.ps1
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ function Merge-PSPuTTYTheme {

.Parameter SessionName
The name of the PuTTY saved session that will have its theme updated.

NOTE: The session name will be URL-encoded, to conform to the stored value in the registry. Make sure that you do not use the URL-encoded name of the session.
Rather, use the "friendly name" of the session, that appears in the PuTTY Saved Session list.

Expand All @@ -31,6 +31,7 @@ function Merge-PSPuTTYTheme {
, [Parameter(Mandatory = $true, ParameterSetName = 'SessionNameThemeObject')]
[Parameter(Mandatory = $true, ParameterSetName = 'SessionObjectThemeObject')]
[PSPuTTYTheme] $Theme
, [string] $TerminalType = 'xterm'
)

Write-Verbose -Message ('Using parameter set: {0}' -f $PSCmdlet.ParameterSetName)
Expand All @@ -56,5 +57,5 @@ function Merge-PSPuTTYTheme {
$PuTTYSessionReg.SetValue("Colour$Number", $Theme."Colour$Number", [Microsoft.Win32.RegistryValueKind]::String)
}

$PuTTYSessionReg.SetValue('TerminalType', 'putty-256color')
$PuTTYSessionReg.SetValue('TerminalType', $TerminalType)
}