Giter VIP home page Giter VIP logo

ls-go's Introduction

ls-go

A more colorful, user-friendly implementation of ls written in Go.

You want to be able to glean a lot of information as quickly as possible from ls. Colors can help your mind parse the information. You can configure ls to color the output a little bit. Configuring ls is a hassle though, and the colors are limited.

Instead, you can use ls-go. It is highly colored by default. It has much fewer flags so you can get the behavior you want more easily. The colors are beautiful and semantic. A terminal with xterm-256 colors is required.

Features

  • Should work on Linux, MacOS, and Windows.
  • Outputs beautiful, semantic colors by default.
  • Show paths to symlinks, and explicitly show broken links.
  • Recurse down subdirectories.
  • Emojis (if you're into that).
  • Supports Nerd Fonts.

Install

With go get:

# do this once in a while
$ go get -u github.com/acarl005/ls-go

With Homebrew:

brew install acarl005/homebrew-formulas/ls-go

Usage

demo-1

Of course, you can use an alias to save some typing and get your favorite options.

demo-2

Show locations of symlink.

demo-3

List subdirectories recursively.

demo-5

usage: ls-go [<flags>] [<paths>...]

Flags:
  -h, --help       Show context-sensitive help (also try --help-long and --help-man).
  -a, --all        show hidden files
  -b, --bytes      include size
  -m, --mdate      include modification date
  -o, --owner      include owner and group
  -p, --perms      include permissions for owner, group, and other
  -l, --long       include size, date, owner, and permissions
  -d, --dirs       only show directories
  -f, --files      only show files
  -L, --links      show paths for symlinks
  -R, --link-rel   show symlinks as relative paths if shorter than absolute path
  -s, --size       sort items by size
  -t, --time       sort items by time
  -k, --kind       sort items by extension
  -S, --stats      show statistics
  -i, --icons      show folder icon before dirs
  -n, --nerd-font  show nerd font glyphs before file names
  -r, --recurse    traverse all dirs recursively
  -F, --find=FIND  filter items with a regexp

Args:
  [<paths>]  the files(s) and/or folder(s) to display

Nerd Font Support

ls-go works with Nerd Fonts. Simply add --nerd-font or -n to get file-specific icons. This won't work unless you have a Nerd Font installed and selected in your terminal emulator.

demo-4

Prior Art

This is inspired by athityakumar/colorls and monsterkodi/color-ls, ported to Go, with various modifications.

Contributing

Contributions are muchly appreciated! Want to add a glyph for another file type? Did I forget an edge case? Is there another option that would be useful? Submit a PR! You might want to submit an issue first to make sure it's something I'd want to add though.

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.