All Projects → acarl005 → Ls Go

acarl005 / Ls Go

Licence: mit
A more colorful, user-friendly implementation of `ls` written in Go

Programming Languages

go
31211 projects - #10 most used programming language

Projects that are alternatives of or similar to Ls Go

Sbt Prompt
An SBT plugin for making your SBT prompt more awesome
Stars: ✭ 107 (-33.95%)
Mutual labels:  terminal, command-line
Warp
Secure and simple terminal sharing
Stars: ✭ 1,548 (+855.56%)
Mutual labels:  terminal, command-line
Word Wrap
Wrap words to a specified length.
Stars: ✭ 107 (-33.95%)
Mutual labels:  terminal, command-line
Smenu
smenu started as a lightweight and flexible terminal menu generator, but quickly evolved into a powerful and versatile CLI selection tool for interactive or scripting use.
Stars: ✭ 1,906 (+1076.54%)
Mutual labels:  terminal, command-line
Sty
String styling for your terminal.
Stars: ✭ 129 (-20.37%)
Mutual labels:  terminal, command-line
Run
⚡The resource runtime
Stars: ✭ 90 (-44.44%)
Mutual labels:  terminal, command-line
Goto
Navigate long command lines using a minimalistic char-based decision tree.
Stars: ✭ 112 (-30.86%)
Mutual labels:  terminal, command-line
Sampler
Tool for shell commands execution, visualization and alerting. Configured with a simple YAML file.
Stars: ✭ 9,203 (+5580.86%)
Mutual labels:  terminal, command-line
Desktoppr
Simple command line tool to set the desktop picture on macOS
Stars: ✭ 127 (-21.6%)
Mutual labels:  terminal, command-line
Typin
Declarative framework for interactive CLI applications
Stars: ✭ 126 (-22.22%)
Mutual labels:  terminal, command-line
Kure
Secure, private and feature-rich CLI password manager
Stars: ✭ 87 (-46.3%)
Mutual labels:  terminal, command-line
Progressbar
A really basic thread-safe progress bar for Golang applications
Stars: ✭ 2,212 (+1265.43%)
Mutual labels:  terminal, command-line
Cli Boot.camp
💻 command-line bootcamp adventure in your browser
Stars: ✭ 88 (-45.68%)
Mutual labels:  terminal, command-line
Tooling
Advancing Node.js as a framework for writing great tools
Stars: ✭ 98 (-39.51%)
Mutual labels:  terminal, command-line
Lua cliargs
A command-line argument parsing module for Lua.
Stars: ✭ 84 (-48.15%)
Mutual labels:  terminal, command-line
Httpcat
httpcat is a simple utility for constructing raw HTTP requests on the command line.
Stars: ✭ 109 (-32.72%)
Mutual labels:  terminal, command-line
Window Size
Reliable way to to get the height and width of the terminal/console in a node.js environment.
Stars: ✭ 79 (-51.23%)
Mutual labels:  terminal, command-line
Awesome Terminals
Terminal Emulators
Stars: ✭ 80 (-50.62%)
Mutual labels:  terminal, command-line
Nnn
n³ The unorthodox terminal file manager
Stars: ✭ 13,138 (+8009.88%)
Mutual labels:  terminal, command-line
Asciigraph
Go package to make lightweight ASCII line graph ╭┈╯ in command line apps with no other dependencies.
Stars: ✭ 1,805 (+1014.2%)
Mutual labels:  terminal, command-line

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

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

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

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

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

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

Or, you can download the latest pre-compiled binary from the releases page.

Prior Art

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

Known Issues

It fails on directories without executable permissions. The standard /bin/ls will also fail when reading non-executable directories, but only with certain options, like ls -l, ls --color=always (or ls -G on MacOS). This is because file metadata is needed to determine things like colors, and directories need to be executable to obtain the metadata of the contents. For example:

# create dir without -x permission
$ mkdir -m 644 test

# add a file
$ sudo touch test/foo

# plain `ls` still works
$ /bin/ls test
foo

# but `ls -l` fails
$ /bin/ls -l test

# and so does ls-go
$ ls-go test

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].