format a collection of strings
lineup is a Rust library and cross-platform command-line tool for formatting a list of UTF-8 strings according to specified separator, padding, anchor, etc.
$ echo -n '1234' | lineup --input-separator 1 --output-separator ','; echo
1,2,3,4
$ echo -n 'hey,hello,hi' | lineup --span 5 --pad . --anchor right --line-items 1 --line-separator '
'; echo
..hey
hello
...hi
$ echo -n 'hey,hello,hi' | lineup --span 4 --pad - --anchor left --output-separator '|'; echo
hey-|hello|hi--
$
For more info check
lineup --help
lineup is cross-platofrm, coded in Rust; you need to have a valid Rust installation.
cargo install -f lineup
build with cargo:
cargo build --release
format a collection of strings
Usage: lineup [OPTIONS]
Options:
-i, --input-separator
[default: ","]
-s, --span
[default: 0]
-p, --pad
[default: " "]
-a, --anchor
[default: left]
[possible values: right, left]
-n, --line-items
[default: 0]
-o, --output-separator
[default: " "]
-l, --line-separator
[default: "\n"]
-h, --help
Print help information (use -h
for a summary)
-V, --version Print version information
This project is licensed under the GNU General Public License v3.
See LICENSE for more information.