diff options
author | Ryan Geary <rtgnj42@gmail.com> | 2019-09-11 22:57:44 -0400 |
---|---|---|
committer | Ryan Geary <rtgnj42@gmail.com> | 2019-09-11 23:21:26 -0400 |
commit | 2f590f61c923018d84019c83850ca8e50f83ab07 (patch) | |
tree | 0dea739470272967a8ba4b2897937352c3c3e989 | |
parent | 49b88bd0be42a71d0d580114bcc7a068adb790d0 (diff) |
Update readme
-rw-r--r-- | Cargo.lock | 2 | ||||
-rw-r--r-- | Cargo.toml | 2 | ||||
-rw-r--r-- | readme.md | 24 |
3 files changed, 20 insertions, 8 deletions
@@ -32,7 +32,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" [[package]] name = "choose" -version = "0.1.0" +version = "0.2.0" dependencies = [ "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)", @@ -1,6 +1,6 @@ [package] name = "choose" -version = "0.1.0" +version = "0.2.0" authors = ["Ryan Geary <rtgnj42@gmail.com>"] edition = "2018" @@ -25,13 +25,25 @@ necessary. ## Usage -`choose [OPTIONS] <FIELDS> FILE` +``` +`choose` sections from each line of files -### Options +USAGE: + choose [FLAGS] [OPTIONS] <choice>... -``` --f <NUM> Field separator --i Inclusive ranges +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 @@ -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 choose 2:5 # print everything from the 2nd to 5th item on the line, # 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 choose :3 # print the beginning of the line to the 3rd item, # exclusive |