Last active
January 31, 2023 01:27
-
-
Save ecormaksin/0bd3ee83a77a4ae8174ec2ab5453ddb3 to your computer and use it in GitHub Desktop.
Windows Powershellのプロンプトをカスタマイズする
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| <# | |
| https://docs.microsoft.com/en-us/powershell/module/microsoft.powershell.core/about/about_prompts?view=powershell-7.2 | |
| 以下の内容を保存する。 | |
| - Windows Powershell: `%USERPROFILE%\Documents\WindowsPowerShell\Profile.ps1` | |
| - Powershell: `%USERPROFILE%\Documents\PowerShell\Profile.ps1` | |
| - Visual Studio Code PowerShell Extension: `%USERPROFILE%\Documents\PowerShell\Microsoft.VSCode_profile.ps1` | |
| #> | |
| function prompt { | |
| "`r`n`r`n$($executionContext.SessionState.Path.CurrentLocation)$(' ')`($(Get-Date -Format 'yyyy/MM/dd HH:mm:ss')`)`r`n$('>' * ($nestedPromptLevel + 1)) "; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment