23 releases
0.1.32 | Jun 19, 2024 |
---|---|
0.1.31 | Jan 11, 2023 |
0.1.30 | Jun 18, 2022 |
0.1.28 | Nov 15, 2021 |
0.1.18 | Mar 22, 2021 |
#897 in Text processing
Used in aki-txpr-macro
35KB
679 lines
aki-mline
the match line, regex text filter like a grep of linux command.
Features
- the match line, regex text filter like a grep of linux command.
- minimum support rustc 1.58.1 (db9d1b20b 2022-01-20)
Command help
aki-mline --help
Usage:
aki-mline [options]
match line, regex text filter like a grep.
Options:
--color <when> use markers to highlight the matching strings
-e, --exp <exp> regular expression
-s, --str <string> simple string match
-i, --inverse output non-matching lines.
-H, --help display this help and exit
-V, --version display version information and exit
Option Parameters:
<when> 'always', 'never', or 'auto'
<exp> regular expression
<string> simple string, non regular expression
Environments:
AKI_MLINE_COLOR_SEQ_ST color start sequence specified by ansi
AKI_MLINE_COLOR_SEQ_ED color end sequence specified by ansi
Quick install
- you can install this into cargo bin path:
cargo install aki-mline
- you can build debian package:
cargo deb
and install .deb into your local repository of debian package.
Examples
Command line example 1
Extract "arm.*-gnu
" from the rustup target list
rustup target list | aki-mline -e "arm.*-gnu"
result output :
Command line example 2
Extract "apple
" from the rustup target list
rustup target list | aki-mline -s "apple"
result output :
Library example
See fn execute()
for this library examples.
Changelogs
License
This project is licensed under either of
- Apache License, Version 2.0, (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Dependencies
~3.5–4.5MB
~84K SLoC