summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorRyan Geary <rtgnj42@gmail.com>2019-09-11 22:57:44 -0400
committerRyan Geary <rtgnj42@gmail.com>2019-09-11 23:21:26 -0400
commit2f590f61c923018d84019c83850ca8e50f83ab07 (patch)
tree0dea739470272967a8ba4b2897937352c3c3e989
parent49b88bd0be42a71d0d580114bcc7a068adb790d0 (diff)
Update readme
-rw-r--r--Cargo.lock2
-rw-r--r--Cargo.toml2
-rw-r--r--readme.md24
3 files changed, 20 insertions, 8 deletions
diff --git a/Cargo.lock b/Cargo.lock
index 0a00e2b..c6244f0 100644
--- a/Cargo.lock
+++ b/Cargo.lock
@@ -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)",
diff --git a/Cargo.toml b/Cargo.toml
index 7d7b35f..29e6e90 100644
--- a/Cargo.toml
+++ b/Cargo.toml
@@ -1,6 +1,6 @@
[package]
name = "choose"
-version = "0.1.0"
+version = "0.2.0"
authors = ["Ryan Geary <rtgnj42@gmail.com>"]
edition = "2018"
diff --git a/readme.md b/readme.md
index bf06283..0b92209 100644
--- a/readme.md
+++ b/readme.md
@@ -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