【powershell】 프롬프트에서 요일 감각을 되찾기
6054 단어 재택근무PowerShell프롬프트
샘플
색만 바꾸면 이런 느낌이 듭니다.




prompt
Microsoft.PowerShell_profile.ps1
function prompt {
$table = @(
@("日", "DarkYellow", "White"),
@("月", "DarkBlue", "White"),
@("火", "Magenta", "Gray"),
@("水", "DarkCyan", "White"),
@("木", "Green", "White"),
@("金", "Yellow", "DarkGray"),
@("土", "Cyan", "White")
)
$today = $table[[System.Convert]::toint32((Get-Date).DayOfWeek)]
$leaf = $pwd.Path | Split-Path -Leaf
Write-Host ("{0}[{1}]" -f (Get-Date -Format "yyyy-MM-dd"), $today[0]) -NoNewline -BackgroundColor $today[1] -ForegroundColor $today[2]
Write-Host "~\$leaf" -ForegroundColor $today[1] -BackgroundColor $today[2]
Write-Host ">" -NoNewline
return " "
}
Reference
이 문제에 관하여(【powershell】 프롬프트에서 요일 감각을 되찾기), 우리는 이곳에서 더 많은 자료를 발견하고 링크를 클릭하여 보았다 https://qiita.com/AWtnb/items/43ca9eedca4285fcd0da텍스트를 자유롭게 공유하거나 복사할 수 있습니다.하지만 이 문서의 URL은 참조 URL로 남겨 두십시오.
우수한 개발자 콘텐츠 발견에 전념
(Collection and Share based on the CC Protocol.)