lsp: Think of this as “ls, plus”

One of the under-the-radar winners of the past year was sl. No, not that sl. The other sl. The one nobody seems to know about because of the ASCII train. ๐Ÿ™„

sl attempted to convey a little more information than the ordinary ls command, by adding color and groups and a few more sparkly bits.

lsp is another attempt, and as you can see, it has a firm grasp on the idea.

2014-10-03-6m47421-lsp-01 2014-10-03-6m47421-lsp-02 2014-10-03-6m47421-lsp-03

By default, lsp aligns file names and file types down the center of the screen. If you add the -l flag, you’ll get the same arrangement but with separation between groups. Add -s and you get human-readable file sizes. -t shows timestamps. And so on.

I do admit I like lsp for smart use of color, and for a more readable arrangement on the screen. No more using my finger to trace across the display, looking for a file size in a long list. And if you don’t like that centered style, there is a flag to left-align the whole business.

lsp also does you the favor of telling you how many files are inside directories, totals for files and directories, resizing itself to smaller or oddball terminal dimensions, and a few other nice touches. It is obviously the product of some forethought.

For negative points, I feel a little bit guilty that a large amount of screen space seems left open by default. ls -lha --color seems to pack a lot more information into a smaller space, whereas lsp will need a vertical dimension, primarily.

Along the same lines, combining flags — particularly lsp -lt imbalanced the centering across the screen, ruining the effect. lsp should probably take into account short file names combined with long, extended timestamps, and center a little more to the left, when it’s possible.

I should mention that building lsp required installing go, but doesn’t require it to run. So if you’re not comfortable with the 238Mb (?!) that is taken up by go in the Arch version, you can rip out go and still use lsp.

lsp is not in Arch/AUR or Debian that I could find, and time stamps in the git repo suggest updates within the past few weeks. So it’s another new program for you, wandering in the wild. … ๐Ÿ™‚