有沒有一種方法可以將$Host.UI.RawUI.BackgroundColor
設置爲別名,以便我不必每次輸入整個內容?爲背景顏色創建別名
0
A
回答
2
function bgc { param($color); $Host.UI.RawUI.BackgroundColor = $color }
C:\PS> bgc 'Red'
添加功能,您PSProfile
+2
對於那些想要標籤填充(或ISE中的彈出列表),你可以做'功能bgc {param([System.ConsoleColor] $ color){...' – TheMadTechnician
+0
非常感謝。僅供參考,我在您的功能末尾添加了一個「Clear-Host」。 – tayopi
相關問題
- 1. 爲背景色創建div
- 2. 顏色爲背景色
- 3. 動態創建表的背景顏色
- 4. 背景或背景顏色?
- 5. 背景顏色
- 6. 背景顏色
- 7. 背景顏色
- 8. 背景顏色
- 9. 顏色背景
- 10. 如何用背景圖像爲背景顏色重新添加背景顏色?
- 11. CSS3PIE背景褪色背景顏色
- 12. android偏好類別背景顏色
- 13. JQuery不識別#FFFFFF的背景顏色
- 14. 如何爲字段集邊框創建背景顏色
- 15. 爲標籤創建背景顏色和線條
- 16. Uipicker背景顏色
- 17. NSImageView +背景顏色
- 18. DBVisualizer背景顏色
- 19. 背景顏色,ForegroundColor
- 20. QSciScintilla背景顏色
- 21. 1背景顏色
- 22. 背景顏色行
- 23. Win32背景顏色
- 24. FieldSet背景顏色
- 25. ItemControl背景顏色
- 26. DataGridViewTextBoxEditingControl背景顏色
- 27. iframe背景顏色
- 28. Bootstrap:Div背景顏色
- 29. CSS背景顏色
- 30. 與背景顏色
'$別名= $ Host.UI.RawUI.BackgroundColor'? – gravity