go>> lsc>> 返回
项目作者: jqly

项目描述 :
PowerShell command for colorized `Get-ChildItem`.
高级语言: PowerShell
项目地址: git://github.com/jqly/lsc.git
创建时间: 2017-07-16T06:31:56Z
项目社区:https://github.com/jqly/lsc

开源协议:GNU General Public License v3.0

下载


lsc, a colorized Get-ChildItem

Installation

put the file in to yourname\\Documents\\WindowsPowerShell\\Modules\\lsc\\lsc.psm1 and it should work.

Usage

lsc -path . -style @{"maxSpacePerName"=4;"nNamePerRow"=20} -Force or

lsc -path . -style @{"maxSpacePerName"=4;"nNamePerRow"=20}

Have a look at the source code! Here are some use cases.

Simply type lsc, you will get something like this …

lsc

You can customize the printing style. Also, there are some built-in styles.

lscstyles

Use such like the following.

lsctightlarge

Or, you can use your own like this:

lscuserstyle

Chinese characters are wider than ascii ones, twice in fact. But this is not a problem.

lscchinese

Finally, the -Force parameter.

lscforce

Fiddling around the code

You can look up the code and decide to use your own color scheme. Function getColor is where to set the color. As for my own, I use gray to these hidden folders, dark gray for hidden files, dark green for normal folders and dark blue for normal files.

I wish you enjoy it:)

Miscellaneous

Have a look on my project about colorized theme and customized prompt for PowerShell;)