Jump to content
Fi8sVrs

lsvine - tree -L 2 with less empty screen space.

Recommended Posts

  • Active Members

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:

687474703a2f2f692e696d6775722e636f6d2f35

 

 

 

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.3.1

# 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 |                                                |             |         |                           |         |
+---------------+------------------------------------------------+-------------+---------+---------------------------+---------+

 

Show hidden filenames

# lsvine -a
+----------------+----------------+------------------------------------------------+-----------------------+-------------------------------+---------------------------+----------+-------------------------------+
| .              | .git           | dist                                           | screenshots           | src                           | target                    | testdir  | tests                         |
+----------------+----------------+------------------------------------------------+-----------------------+-------------------------------+---------------------------+----------+-------------------------------+
| .README.md.swp | COMMIT_EDITMSG | .gitkeep                                       | sideBySide-latest.png | level1dir.rs                  | .gitkeep                  | .gitkeep | test_tablebuf.rs              |
| .gitignore     | FETCH_HEAD     | lsvine-v0.3.1-x86_64-unknown-linux-musl.tar.gz |                       | longest_common_prefix.rs      | .rustc_info.json          | test1    | vecpath2vecl1dir_iterators.rs |
| CHANGELOG      | HEAD           |                                                |                       | main.rs                       | package                   | test2    | vecpath2vecl1dir_onefunc.rs   |
| Cargo.lock     | ORIG_HEAD      |                                                |                       | main_bkp_onefunc.rs           | release                   | test3    |                               |
| Cargo.toml     | branches       |                                                |                       | tablebuf.rs                   | x86_64-unknown-linux-musl |          |                               |
| DEVELOPER.md   | config         |                                                |                       | vecpath2vecl1dir_iterators.rs |                           |          |                               |
| LICENSE        | description    |                                                |                       | vecpath2vecl1dir_onefunc.rs   |                           |          |                               |
| README.md      | hooks          |                                                |                       |                               |                           |          |                               |
| build.sh       | index          |                                                |                       |                               |                           |          |                               |
| mk_testdir.sh  | info           |                                                |                       |                               |                           |          |                               |
|                | logs           |                                                |                       |                               |                           |          |                               |
|                | objects        |                                                |                       |                               |                           |          |                               |
|                | refs           |                                                |                       |                               |                           |          |                               |
+----------------+----------------+------------------------------------------------+-----------------------+-------------------------------+---------------------------+----------+-------------------------------+

 

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 |         |
+----+----+----+---------+

 

For example, lsvine -c -m 3 /etc output here

 

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

  1. (pro) It already has a long grid view
  2. (con) Author seems too busy to dequeue issues and PRs
  3. (con) README doesn't list download binary from releases and run

 

  1. (pro) Distributed via snap in addition to other channels that exa uses
  2. (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

 

Author

Built by  AutofitCloud.

 

Source: https://github.com/autofitcloud/lsvine

 

 

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.



×
×
  • Create New...