lsp

command module
v0.2.0 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Aug 17, 2014 License: MIT Imports: 7 Imported by: 0

README

"Oh, my Glob, you guys, drama bomb!"

Lumpy Space Princess (LSP), "Adventure Time with Finn and Jake", Season 2, episode 1

lsp: list files in a mildly human-frendlier manner

lsp is like ls command but does not attempt to meet that archaic POSIX specification, so instead of this:

(bash)$ ls -l

total 16
-rw-r--r--  1 peterborzov  staff  1079  9 Aug 00:22 LICENSE
-rw-r--r--  1 peterborzov  staff    60  9 Aug 00:22 README.md

you get this:

 ( I will eventually need to put a sublime-style gif showcasing major features)

which is arguably more readable.

Why

No reason to cling to stuff that is there only for historical reasons. Nobody has time in life to learn how to read this: -rw-r--r--.

Features

Marked ones are implemented:

  • embraces and extends the original ls syntax (with flags and all) whenever it does not actively interfere with common sense.
  • fuzzy matching and fixes basic typos: lsp ~/.bahs_profile will still get you there.
  • contents are shown classified in groups intelligently: directories, *.js-files, MIME/content types (text, binaries..)
  • shows intelligent summaries for objects: things like sizes and types of subfolders, file's encoding and so on. General running timeout threshold means no freezes because of things like suddenly unmounted devices, huge number of files and so on. Each file is "investigated" asyncroneously and subdirectories are traversed in the async BFS.
  • knows what things like a git repo is. shows recent git diffs and all the other things.

Installation

lsp is written in go programming language. For now it can be installed using go get:

 $ go get github.com/dborzov/lsp

Once it becomes more functional, lsp will be distributed in native binaries for all platforms (Linux, MacOS, Windows). No dependancies or anything configurable by design, just one binary.

can't handle these lumps

Documentation

Overview

arguments.go parses arguments in order inferring the target path and flags invoked to the best of its ability.

fileinfo.go contains FileInfo struct with what is known of individual file/folder in the list and methods to fetch this info

filelist.go contains Filelist []Fileinfo definition and methods to do the two tasks: filter, sort and represent as appropriate to the running mode (flags)

lsp.go contains main() function

Package utils.go contains various helpful functions and definitions

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL