In Microsoft's VSCode, I want to customize the integrated PowerShell prompt like I can with my .bash_profile.
It appears you can edit it to your liking according to this document, but I am unsure where to save my .ps1 file with the function prompt { }
, and unsure how to get VSCode to invoke it when opening a new console.
It seems every session sets up a temporary profile in Users/<username>/.config/powershell/Microsoft.VSCode_profile.ps1
, but doing a ls
on my ~/.config directory shows no powershell directory whatsoever. If I create the directory, will VSCode read it when I open a console?
Has anyone succeeded with this?
Output from Get-Host
:
Name : Visual Studio Code Host
Version : 1.11.0
InstanceId : 8d0a98e7-12e1-41b1-b27e-02879107cf00
UI : System.Management.Automation.Internal.Host.InternalHostUserInterface
CurrentCulture : en-US
CurrentUICulture : en-US
PrivateData : Microsoft.PowerShell.EditorServices.EditorServicesPSHost+ConsoleColorProxy
DebuggerEnabled : True
IsRunspacePushed : False
Runspace : System.Management.Automation.Runspaces.LocalRunspace