PowerShellのプロンプト
時刻とカレントディレクトリの短縮
MyDocuments/WindowsPowerShell/profile.ps1
function global:prompt() { $dir = $pwd.ProviderPath.Remove(0, $pwd.ProviderPath.LastIndexOf("\")+1) $time = Get-Date -Format "HH:mm:ss" Write-Host($time + " " + $dir) -NoNewline return "> " }
こんな風になる
Windows PowerShell Copyright (C) Microsoft Corporation. All rights reserved. 17:57:59 pen>