Powershell: Properly coloring Get-Childitem output once and for all

后端 未结 6 440
醉梦人生
醉梦人生 2020-12-04 13:14

Edit: Original solution at the bottom of this post. For a more up-to-date solution, see the accepted answer, posted by Thraka.

Colorizing Get-Childit

6条回答
  •  春和景丽
    2020-12-04 13:54

    I just installed and used https://github.com/Davlind/PSColor which was painless. It supports PSGet so you can install easily with Install-Module PSColor to get it.

    The objects aren't transformed so they still support piping. (It's using the New-CommandWrapper mentioned above)

    It also supports other things like select-string.

    PowerShell Color

提交回复
热议问题