summaryrefslogtreecommitdiffstats
path: root/readme.md
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 /readme.md
parent49b88bd0be42a71d0d580114bcc7a068adb790d0 (diff)
Update readme
Diffstat (limited to 'readme.md')
-rw-r--r--readme.md24
1 files changed, 18 insertions, 6 deletions
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