Git Product home page Git Product logo

powercolorls's Introduction

PowerColorLS

A PowerShell module that displays a colorized directory and file listing with icons. Inspired by colorls

Screenshot 1

Overview

PowerColorLS is a PowerShell module that displays a colorized directory and file listing with icons in the terminal. For the module to work, you must first install Terminal-Icons and (now terminal icon is no need)setup the Nerd Fonts

Installation

To install the module from the PowerShell Gallery:

Install-Module -Name PowerColorLS_GH -Repository PSGallery

Example usage

Import-Module PowerColorLS_GH
PowerColorLS

List all files and directories including hidden ones and ones starting with '.' in long listing (wide) format

PowerColorLS -a -l

Screenshot 2

List all files and directories including hidden ones and ones starting with '.' in long listing (wide) format and also include directory size

PowerColorLS -a -l --show-directory-size

Screenshot 3

List files only, followed by list directories only

PowerColorLS -f
PowerColorLS -d

Screenshot 4

Listing files in a git directory displays git status as well

PowerColorLS

Screenshot 5

Help

To get help about available arguments, run:

PowerColorLS --help

Output of help command:

Usage: PowerColorLs [OPTION]... [FILE]...
List information about files and directories (the current directory by default).
Entries will be sorted alphabetically if no sorting option is specified.

        -a, --all               do not ignore hidden files and files starting with .
        -l, --long              use a long listing format
        -r, --report            shows a brief report
        -1                      list one file per line
        -d, --dirs              show only directories
        -f, --files             show only files
        -ds, -sds, --sds, --show-directory-size
                                show directory size (can take a long time)
        -hi, --hide-icons       hide icons

sorting options:

        -sd, --sort-dirs, --group-directories-first
                                sort directories first
        -sf, --sort-files, --group-files-first
                                sort files first
        -t, -st, --st
                                sort by modification time, newest first

general options:

        -h, --help         prints this help
        -v, --version      show version information

Alias to ls

Set-Alias -Name ls -Value PowerColorLS -Option AllScope

修改

  1. 识别JunctionSymbolicLink并且可以显示源地址,同时Mode也能显示链接属性。这两种情况会忽略主题里的配置,因为都显示源链接当然知道是链接
  2. 修复当文件或文件夹名长度大于Terminal宽度时多输出一行问题
  3. 宽度对齐适配中文
  4. 使用Terminal-Icons-Data文件夹内容覆盖Module Terminal-Icons/Data文件夹,修复git默认颜色失效,同时默认前景色将写在主题配置里而不是代码里(空属性所示color)
  5. Terminal-Icons-Data补充多个类型icon和color
  6. 长列表隐藏icon时名称对齐
  7. ls -a -l(长列表显示所有文件)忽略宽度比较强制输出所有属性
  8. 隐藏文件的判断标准不再是.开头的文件,而是以系统属性为准
  9. ls -sd ls -sf文件夹优先和文件优先的同时也会排序名称

2021.12.19:

  1. 因为修改东西较多,把terminal icon 并入该项目
  2. 开始使用自己的module
  3. 修复git不显示文件夹状态
  4. 添加alias l, ll, la, lr, l1, ld, lf, lt, lds, lhi

powercolorls's People

Contributors

gardebring avatar splitgemini avatar

Stargazers

 avatar  avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.