| Crates.io | splitt |
| lib.rs | splitt |
| version | 0.1.0 |
| created_at | 2025-03-30 19:39:02.001985+00 |
| updated_at | 2025-03-30 19:39:02.001985+00 |
| description | Split text in your terminal |
| homepage | |
| repository | https://github.com/6km/splitt |
| max_upload_size | |
| id | 1612685 |
| size | 13,687 |
A command-line tool for splitting text in your terminal.
Usage: splitt [OPTIONS] --separator <SEPARATOR> [TEXT]
Arguments:
[TEXT] The text to split. If not provided, the tool reads from standard input (stdin)
Options:
-s, --separator <SEPARATOR> The separator used to split the text
--keep-empty Keep empty strings
--raw Output the results as a raw array of strings
-c, --chunked The output is printed in chunks; which means each part is printed separately
-h, --help Print help
-V, --version Print version
# Providing the text directly.
splitt "1-23-4" -s "-"
# 1
# 23
# 4
# Pass output of another command and print normal output.
pwd | splitt -s "/"
# home
# taha
# projects
# Pass output of another command and print a raw array.
pwd | splitt -s "/" --raw
# ["home", "taha", "projects"]
You can install splitt using one of the following methods:
If you have Rust and Cargo installed, you can build splitt from source.
Clone the repository:
git clone github.com/6km/splitt.git
cd splitt
Build the project:
cargo build --release
Install the executable:
# Linux/macOS
cp target/release/splitt /usr/local/bin/
## NOTE: it might be different for your operating system
Pre-built binaries are available on the GitHub Releases page.
Download the binary
Make the binary executable (Linux/macOS):
chmod +x splitt
Move the binary to a directory in your PATH:
# Linux/macOS
mv splitt /usr/local/bin/
## NOTE: it might be different for your operating system
You can install directly with cargo.
cargo install splitt
stewYou can use stew to install the pre-built GitHub releases binaries.
stew install 6km/splitt
Licensed under the MIT license.