Skip to content

Make startup banner simpler #1141

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

Merged
merged 1 commit into from
Jan 6, 2020
Merged
Show file tree
Hide file tree
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
Original file line number Diff line number Diff line change
Expand Up @@ -177,6 +177,12 @@ public StartEditorServicesCommand()
[Parameter]
public SwitchParameter SplitInOutPipes { get; set; }

/// <summary>
/// The banner/logo to display when the Integrated Console is first started.
/// </summary>
[Parameter]
public string StartupBanner { get; set; }

protected override void BeginProcessing()
{
#if DEBUG
Expand Down Expand Up @@ -331,6 +337,11 @@ private EditorServicesConfig CreateConfigObject()
},
};

if (StartupBanner != null)
{
editorServicesConfig.StartupBanner = StartupBanner;
}

return editorServicesConfig;
}

Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -110,6 +110,12 @@ public EditorServicesConfig(
/// If none are provided, these will be generated from the hosting PowerShell's profile paths.
/// </summary>
public ProfilePathConfig ProfilePaths { get; set; }

public string StartupBanner { get; set; } = @"

=====> PowerShell Integrated Console <=====

";
}

/// <summary>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -237,23 +237,7 @@ private void WriteStartupBanner()
return;
}

_config.PSHost.UI.WriteLine(@"


__/\\\\\\\\\\\\\_______/\\\\\\\\\\\____/\\\\\\\\\\\________/\\\\\\\\\_
_\/\\\/////////\\\___/\\\/////////\\\_\/////\\\///______/\\\////////__
_\/\\\_______\/\\\__\//\\\______\///______\/\\\_______/\\\/___________
_\/\\\\\\\\\\\\\/____\////\\\_____________\/\\\______/\\\_____________
_\/\\\/////////_________\////\\\__________\/\\\_____\/\\\_____________
_\/\\\_____________________\////\\\_______\/\\\_____\//\\\____________
_\/\\\______________/\\\______\//\\\______\/\\\______\///\\\__________
_\/\\\_____________\///\\\\\\\\\\\/____/\\\\\\\\\\\____\////\\\\\\\\\_
_\///________________\///////////_____\///////////________\/////////__


=====> PowerShell Integrated Console <=====

");
_config.PSHost.UI.WriteLine(_config.StartupBanner);
}

private void DebugServer_OnSessionEnded(object sender, EventArgs args)
Expand Down