8b3427a8097f83c0c9d80b0397b17d3eccd55ea9
Windows/PowerShell.md
| ... | ... | @@ -31,14 +31,21 @@ |
| 31 | 31 | > . $profile |
| 32 | 32 | ``` |
| 33 | 33 | - サンプル Microsoft.PowerShell_profile.ps1 |
| 34 | -```powershell |
|
| 35 | -function prompt() { |
|
| 36 | - $env:USERNAME + "@" + $env:COMPUTERNAME + " " + (Split-Path (Get-Location) -Leaf) + "> " |
|
| 37 | -} |
|
| 38 | - |
|
| 39 | -$currentDir = Split-Path $MyInvocation.MyCommand.Path |
|
| 40 | -Import-Module (Join-Path $currentDir "Get-NetworkStatistics.psm1") |
|
| 41 | -``` |
|
| 34 | + - Windows |
|
| 35 | + ```powershell |
|
| 36 | + function prompt() { |
|
| 37 | + $env:USERNAME + "@" + $env:COMPUTERNAME + " " + (Split-Path (Get-Location) -Leaf) + "> " |
|
| 38 | + } |
|
| 39 | + |
|
| 40 | + $currentDir = Split-Path $MyInvocation.MyCommand.Path |
|
| 41 | + Import-Module (Join-Path $currentDir "Get-NetworkStatistics.psm1") |
|
| 42 | + ``` |
|
| 43 | + - Linux `~/.config/powershell/Microsoft.PowerShell_profile.ps1` |
|
| 44 | + ```powershell |
|
| 45 | + function prompt() { |
|
| 46 | + $env:LOGNAME + '@' + (hostname -s) + ' ' + (Split-Path (Get-Location) -Leaf) + '> ' |
|
| 47 | + } |
|
| 48 | + ``` |
|
| 42 | 49 | |
| 43 | 50 | - [Windows PowerShell プロファイル](http://technet.microsoft.com/ja-jp/scriptcenter/powershell_owner06.aspx) |
| 44 | 51 |