https://github.com/urbanogilson/lineselect
Interactive Line Selector
https://github.com/urbanogilson/lineselect
cli command-line rust tool
Last synced: 8 months ago
JSON representation
Interactive Line Selector
- Host: GitHub
- URL: https://github.com/urbanogilson/lineselect
- Owner: urbanogilson
- License: mit
- Created: 2023-07-11T21:30:45.000Z (over 2 years ago)
- Default Branch: main
- Last Pushed: 2025-01-25T21:54:11.000Z (10 months ago)
- Last Synced: 2025-02-28T14:50:27.143Z (9 months ago)
- Topics: cli, command-line, rust, tool
- Language: Rust
- Homepage:
- Size: 670 KB
- Stars: 73
- Watchers: 1
- Forks: 0
- Open Issues: 2
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-cli-apps-in-a-csv - Line Select - A powerful utility enabling interactive line selection from stdin, allowing to seamlessly integrate, pause, select, and refine your pipeline, enhancing data processing precision. (<a name="text-processing"></a>Text processing)
README
# Line Select
[](https://github.com/urbanogilson/lineselect/actions/workflows/rust.yml)
[](https://crates.io/crates/lineselect)
[](https://github.com/urbanogilson/lineselect/blob/main/LICENSE)
Elevate your command-line pipelines using the Interactive Line Selector – a potent utility enabling interactive line selection from stdin. Seamlessly integrate, pause, select, and refine your pipeline, enhancing data processing precision.
# Features
- Interactive Selection: Pause the pipeline's execution to manually select specific lines from the input stream.
- Seamless Integration: Easily integrate the Interactive Line Selector into your existing command-line pipelines.
- Optimized Workflow: Curate data on-the-fly for more accurate and meaningful results.
# Usage
Incorporate the Interactive Line Selector into your pipeline:
<command producing input> | lineselect | <subsequent command>
Use arrow keys to navigate, press `Space` to select/deselect lines, and press `Enter` to proceed with the selected lines.
# Example
Imagine you have a list of files in a directory and you want to selectively remove them using `rm`. Instead of using a complex find command, you can utilize the Interactive Line Selector to streamline the process:
ls | lineselect | xargs rm

# Installation
## Cargo
```bash
cargo install lineselect
```
## Debian
```bash
wget https://github.com/urbanogilson/lineselect/releases/download/v0.1.1/lineselect_0.1.1_amd64.deb
apt install ./lineselect_0.1.1_amd64.deb
```
# Contributions
Contributions are welcome! If you have ideas for improvements or new features, please feel free to submit a pull request.
# Acknowledgments
This project builds upon the fantastic work of the following projects:
- [Clap](https://github.com/clap-rs/clap) - A full featured, fast Command Line Argument Parser for Rust.
- [Dialoguer](https://github.com/console-rs/dialoguer) - Rust utility library for nice command line prompts and similar things.
- [Colored](https://github.com/colored-rs/colored) - Coloring terminal so simple you already know how to do it!
## Previous Implementation
This idea has been implemented before by [chfritz/lineselect](https://github.com/chfritz/lineselect) using JavaScript. Our project aims to provide an option in Rust with a single binary.
# License
This project is licensed under the MIT License - see the [LICENSE](LICENSE) file for details.