npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

@feedoom/nls

v1.8.1

Published

The colorful ls command

Downloads

42

Readme

nls 是一个漂亮的 ls 工具

美化是第一生产力!

nls logo


nls 是用 node 编写的命令行工具,用来替代 Unix 和 Linux 的 ls 命令,用不同的颜色和图标区分不同的文件和数据。


  • -i: 显示图标
  • -fb: 文件夹显示背景色
  • -l: 显示文件的详细信息和属性
  • -a: 显示隐藏的文件
  • -d: 只显示文件夹
  • -x: 只显示可执行文件
  • --time: 用文件和目录的更改时间排序
  • -s: 文件按字母顺序排序再按隐藏文件 -> 文件夹 -> 软链接 -> 文件排序
  • -g: 按 .gitignore 文件隐藏文件
  • -r: 递归显示目录内容
  • -t: 递归显示文件树
  • -I 'regexp': 根据参数后的正则表达式,忽略文件,比如 -I '*.class',后面有效果图。要忽略的文件的正则表达式必须跟在 - I 参数后,且用 '"包围起来
  • -gs: 在文件后面显示该文件的 git status。该参数功能还未完成

TODO

  • [ ] 完善 -t 参数功能,现在的文件树是默认添加了 -s 参数进行排序再生成的
  • [ ] 同时使用 -gs -r 读取多个目录会有问题。但是读取一个目录没问题

  • -i -fb -a 参数
  • -s 参数
  • -l 参数
  • -g 参数
  • -r 参数
  • -I 参数
  • -t 参数
  • -gs 参数。文件的 git 状态(status) 如下

nls 可以安装在 macOS 和 Linux.

node.js 安装

需要安装 node.js

$ curl -sL https://deb.nodesource.com/setup_14.x | sudo -E bash -
$ sudo apt update
$ apt install nodejs

npm 安装

$ npm install -g @feedoom/nls

本地安装

$ git clone https://gitee.com/feedoom/nls
$ cd nls
$ npm install
$ npm install -g .

nerd-fonts 字体

显示字体图标需要 nerd-fonts 字体

配色

想用自己的配色,可修改./lib/color.js,再本地安装


替代 ls

alias ls='nls -i'
alias ll='nls -i -l'

npm dependencies

灵感