Reads the data, not the comments. It's like cat(1), but for lists. Hah.
Catalist is designed to be a small and fast program to only read the content of a list, not the information intended to keep it organised.
Catalist can be installed through cargo.
cargo install catalist
Or, if you have cargo-script installed, you can copy src/main.rs
to a file in your PATH named catalist
(I'd suggest ~/.local/bin/catalist
)
Catalist can read from files or from stdin. If no files are given, it will default to reading from stdin.
The contents of example.list
:
```txt
Foo Bar Baz
Qux Quux Quuz ```
Catalist ignores empty lines and comments. Lines containing whitespace are automatically quoted.
console
$ catalist example.list
Foo
Bar
Baz
"Qux Quux"
Quuz
The quote logic can be changed by providing the --quotes <logic>
option. The option takes one of auto
, always
, or never
. The default is auto
.
console
$ catalist --quotes always example.list
"Foo"
"Bar"
"Baz"
"Qux Quux"
"Quuz"
Catalist will read from stdin if the file name is a dash (-
) or there are no files given.
console
$ cat example.list | catalist --quotes never
Foo
Bar
Baz
Qux Quux
Quuz
A comment is a hash (#
) preceeded by whitespace, or at the start of a line. Everything else is treated as content.
```console $ cat comments.list
Example # comment This is# not a comment
$ catalist comments.list Example "This is# not a comment" ```
This project is licensed under the MIT license.