mirror of
https://github.com/theryangeary/choose
synced 2025-02-17 01:38:24 +00:00
Update readme
This commit is contained in:
parent
49b88bd0be
commit
2f590f61c9
3 changed files with 21 additions and 9 deletions
2
Cargo.lock
generated
2
Cargo.lock
generated
|
@ -32,7 +32,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "choose"
|
name = "choose"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
"regex 1.3.1 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
"structopt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
"structopt 0.3.0 (registry+https://github.com/rust-lang/crates.io-index)",
|
||||||
|
|
|
@ -1,6 +1,6 @@
|
||||||
[package]
|
[package]
|
||||||
name = "choose"
|
name = "choose"
|
||||||
version = "0.1.0"
|
version = "0.2.0"
|
||||||
authors = ["Ryan Geary <rtgnj42@gmail.com>"]
|
authors = ["Ryan Geary <rtgnj42@gmail.com>"]
|
||||||
edition = "2018"
|
edition = "2018"
|
||||||
|
|
||||||
|
|
26
readme.md
26
readme.md
|
@ -25,13 +25,25 @@ necessary.
|
||||||
|
|
||||||
## Usage
|
## Usage
|
||||||
|
|
||||||
`choose [OPTIONS] <FIELDS> FILE`
|
|
||||||
|
|
||||||
### Options
|
|
||||||
|
|
||||||
```
|
```
|
||||||
-f <NUM> Field separator
|
`choose` sections from each line of files
|
||||||
-i Inclusive ranges
|
|
||||||
|
USAGE:
|
||||||
|
choose [FLAGS] [OPTIONS] <choice>...
|
||||||
|
|
||||||
|
FLAGS:
|
||||||
|
-d, --debug Activate debug mode
|
||||||
|
-h, --help Prints help information
|
||||||
|
-n, --inclusive Use inclusive ranges
|
||||||
|
-V, --version Prints version information
|
||||||
|
|
||||||
|
OPTIONS:
|
||||||
|
-f, --field-separator <field-separator> Specify field separator other than whitespace
|
||||||
|
-i, --input <input> Input file
|
||||||
|
|
||||||
|
ARGS:
|
||||||
|
<choice>... Fields to print. Either x, x:, :y, or x:y, where x and y are integers, colons indicate a range,
|
||||||
|
and an empty field on either side of the colon continues to the beginning or end of the line.
|
||||||
```
|
```
|
||||||
|
|
||||||
### Examples
|
### Examples
|
||||||
|
@ -42,7 +54,7 @@ choose -f ':' 0 3 5 # print the 0th, 3rd, and 5th item from a line, where
|
||||||
# items are separated by ':' instead of whitespace
|
# items are separated by ':' instead of whitespace
|
||||||
choose 2:5 # print everything from the 2nd to 5th item on the line,
|
choose 2:5 # print everything from the 2nd to 5th item on the line,
|
||||||
# exclusive of the 5th
|
# exclusive of the 5th
|
||||||
choose -i 2:5 # print everything from the 2nd to 5th item on the line,
|
choose -n 2:5 # print everything from the 2nd to 5th item on the line,
|
||||||
# inclusive of the 5th
|
# inclusive of the 5th
|
||||||
choose :3 # print the beginning of the line to the 3rd item,
|
choose :3 # print the beginning of the line to the 3rd item,
|
||||||
# exclusive
|
# exclusive
|
||||||
|
|
Loading…
Add table
Reference in a new issue