#directory #tree #format #distributed #space #screen #display

app lsvine

List contents of directories in a vine-like format

4 releases

0.3.1 Jan 13, 2020
0.2.5 Jan 10, 2020
0.2.4 Jan 10, 2020
0.2.2 Jan 8, 2020

#854 in Filesystem

Apache-2.0

47KB
610 lines

lsvine

tree -L 2 with less empty screen space.

Motivation

I built lsvine to be like tree but with the first-level directories distributed horizontally (and dangling downwards, hence like a vine).

This format compacts the information vertically and displays it in a trello-like format, one "card" per directory.

Screenshots

Imgur Image

Installation

With cargo

cargo install lsvine

Downloadable binary for 64-bit linux

LSVINE_VERSION=0.3.1
wget https://github.com/autofitcloud/lsvine/releases/download/$LSVINE_VERSION/lsvine-v$LSVINE_VERSION-x86_64-unknown-linux-musl.tar.gz
tar -xzf lsvine-v$LSVINE_VERSION-x86_64-unknown-linux-musl.tar.gz
mv lsvine ~/.local/bin/

Usage

Regular usage:

# lsvine --version
lsvine 0.2.4

# lsvine .
+---------------+------------------------------------------------+-------------+---------+---------------------------+---------+
| .             | dist                                           | screenshots | src     | target                    | testdir |
+---------------+------------------------------------------------+-------------+---------+---------------------------+---------+
| CHANGELOG     | lsvine-v0.2.1-x86_64-unknown-linux-musl.tar.gz | ls.png      | main.rs | release                   | test1   |
| Cargo.lock    |                                                | lsvine.png  |         | x86_64-unknown-linux-musl | test2   |
| Cargo.toml    |                                                | tree.png    |         |                           | test3   |
| DEVELOPER.md  |                                                |             |         |                           |         |
| LICENSE       |                                                |             |         |                           |         |
| README.md     |                                                |             |         |                           |         |
| build.sh      |                                                |             |         |                           |         |
| mk_testdir.sh |                                                |             |         |                           |         |
+---------------+------------------------------------------------+-------------+---------+---------------------------+---------+

Contract filename suffixes to reduce occupied screen-space further:

# lsvine testdir/test1
+----+----+----+-----+
| .  | d1 | d2 | d3  |
+----+----+----+-----+
| f1 | f4 | f7 | d4  |
| f2 | f5 | f8 | f10 |
| f3 | f6 | f9 | f11 |
|    |    |    | f12 |
|    |    |    | f13 |
|    |    |    | f14 |
+----+----+----+-----+

# lsvine testdir/test1 --contract-suffix
+--------+--------+--------+---------+
| .      | d1     | d2     | d3      |
+--------+--------+--------+---------+
| f* (3) | f* (3) | f* (3) | d4      |
|        |        |        | f1* (5) |
+--------+--------+--------+---------+

# lsvine testdir/test1 --contract-suffix --minimum-prefix-length=2
+----+----+----+---------+
| .  | d1 | d2 | d3      |
+----+----+----+---------+
| f1 | f4 | f7 | d4      |
| f2 | f5 | f8 | f1* (5) |
| f3 | f6 | f9 |         |
+----+----+----+---------+

The future

At some point, might want to get merged into other popular rust-based modern ls alternatives. It could be implemented as a separate option, eg exa --vine or lsd --vine. Example repos

  • exa
    • (pro) It already has a long grid view
    • (con) Author seems too busy to dequeue issues and PRs
    • (con) README doesn't list download binary from releases and run
  • lsd
    • (pro) Distributed via snap in addition to other channels that exa uses
    • (con) Requires some fonts as pre-requisite
  • Others at github topic = ls

License

Apache License 2.0. Check file LICENSE

Dev notes

Check DEVELOPER.md

Dependencies

~6–17MB
~206K SLoC