9 个版本 (4 个重大更改)

0.5.0 2024年6月1日
0.4.2 2024年5月12日
0.4.1 2024年4月7日
0.4.0 2024年3月16日
0.1.0 2023年10月9日

#3 in #ignore

Download history 125/week @ 2024-05-10 17/week @ 2024-05-17 4/week @ 2024-05-24 161/week @ 2024-05-31 12/week @ 2024-06-07 4/week @ 2024-06-14 1/week @ 2024-06-21

每月下载量:611

MIT/Apache

205KB
5.5K SLoC

nls-ls (nls)

CICD Crates.io

又一个 ls(1) 实现

screenshot

特性

  • 所有列的颜色支持
  • 图标支持(通过 Nerd Fonts
  • 通过 '--gitignore' 标志忽略 '.gitignore' 文件中的文件
  • 跨平台支持(Linux、macOS 和 Windows)

命令行选项

Usage: nls [OPTIONS] [FILE]...

Arguments:
  [FILE]...  Paths to list. List the current directory if no paths are provided

Options:
  -a, --all
          Include hidden entries in listing
  -A, --almost-all
          Like -a, --all but do not list implied . and .. entries
      --allocated-bytes
          Use raw allocated size
  -c
          Use timestamp of when entry status was last changed
  -C
          List entries top-to-bottom in a grid
      --color [<WHEN>]
          Flag to control when to use color for output [possible values: always,
          auto, never]
  -d, --directory
          Do not list directory contents, instead list the directory itself
  -F, --classify
          Append filetype indicator (either */=@|) to entry file names
  -g
          Like -l but do not list the owner column
      --gitignore
          Ignore files set in '.gitignore' files
  -h, --human-readable
          Format size using factors of 1024 like 1.0K 200M 3.0G etc
  -H, --dereference-command-line
          Use target information of symlinks passed as arguments on command line
      --help
          Print help information
  -i, --inode
          List entries along with their file inode number
  -I, --ignore-glob <PATTERN>
          Ignore entries matching glob pattern
      --icons [<WHEN>]
          Flag to control when to display icons [possible values: always, auto,
          never]
      --iec
          Format size using factors of 1024 like 1.0Ki 200Mi 3.0Gi etc
      --ignore-file
          Ignore files set in '.ignore' files
  -k, --kibibytes
          Use 1024 byte blocks for allocated size
  -l
          List entries along with their metadata in long format
  -L, --dereference
          Use target information when listing symlink entries
      --max-depth <NUM>
          Set the max depth to recurse into
      --mode <WORD>
          Set the mode format to be used in long format [possible values:
          native, pwsh, rwx]
  -n, --numeric-uid-gid
          Like -l but list the owner and group names as their respective uid and
          gid
  -o
          Like -l but do not list the group column
  -p
          Append filetype indicator / to directory entry file names
  -r, --reverse
          Reverse sorting order
  -R, --recursive
          Recurse into directories
  -s, --size
          List entries along with their allocated size
  -S
          Sort entries by largest size first
      --si
          Format size using factors of 1000 like 1.0K 200M 3.0G etc
  -t
          Sort entries by most recent timestamp first
      --time <WORD>
          Set timestamp to use for sorting by timestamp or/and listing in long
          format [possible values: accessed, changed, created, modified, atime,
          ctime, btime, mtime]
  -u
          Use timestamp of when entry was last accessed
      --version
          Print version information
  -x
          List entries left-to-right in a grid
  -1
          List one entry per line

安装

从源代码安装

使用 Rust 的包管理器 cargo

cargo install nls-ls

还提供了一个 Makefile 来构建和安装二进制文件、shell 完整性和 man 页面

make
sudo make install

许可证

许可如下之一:

任选其一。

贡献

除非您明确声明,否则您有意提交的任何贡献,根据 Apache-2.0 许可证定义,应按上述方式双许可,无需任何额外条款或条件。

依赖项

~7–20MB
~264K SLoC