diff --git a/README.md b/README.md index 659e5bd..07a7417 100644 --- a/README.md +++ b/README.md @@ -185,7 +185,7 @@ OPTIONS: -f Act on these white-space separated fields. -d Use for the field delimiter of -f. -D Use regular expression for the field delimiter of -f - --csv -f interprets as field number of a CSV according to + --csv -f interprets as field numbers of a CSV according to RFC 4180, instead of whitespace separated fields. -e Execute in another process that will receive identical standard input as the main teip command, emitting numbers to be diff --git a/src/main.rs b/src/main.rs index 0fe4a7f..d21e3cd 100644 --- a/src/main.rs +++ b/src/main.rs @@ -63,7 +63,7 @@ lazy_static! { #[derive(StructOpt, Debug)] #[structopt( - about = "Bypassing a partial range of standard input to an arbitrary command", + about = "Act on a partial range of standard input with an arbitrary command", usage = "teip [OPTIONS] [FLAGS] [--] [...]", help = "USAGE: teip -g [-Gosvz] [--] [...] @@ -73,30 +73,30 @@ lazy_static! { teip -e [-svz] [--] [...] OPTIONS: - -g Bypassing lines that match the regular expression - -o -g bypasses only matched parts + -g Act on lines that match the regular expression . + -o -g acts on only matched parts. -G -g interprets Oniguruma regular expressions. - -c Bypassing these characters - -l Bypassing these lines - -f Bypassing these white-space separated fields - -d Use for field delimiter of -f - -D Use regular expression for field delimiter of -f - --csv -f interprets as field number of a CSV according to - RFC 4180, instead of white-space separated fields + -c Act on these characters. + -l Act on these lines. + -f Act on these white-space separated fields. + -d Use for the field delimiter of -f. + -D Use regular expression for the field delimiter of -f. + --csv -f interprets as field numbers of a CSV according to + RFC 4180, instead of whitespace separated fields. -e Execute on another process that will receive identical - standard input as the teip, and numbers given by the result - are used as line numbers for bypassing + standard input as the main teip aommane, emitting numbers to be + used as line numbers for actioning. FLAGS: - -h, --help Prints help information - -V, --version Prints version information - -s Execute new command for each bypassed chunk - --chomp Command spawned by -s receives standard input without trailing - newlines - -I Replace the with bypassed chunk in the - then -s is forcefully enabled. - -v Invert the range of bypassing - -z Line delimiter is NUL instead of a newline + -h, --help Prints help information. + -V, --version Prints version information. + -s Execute a new command for each actioned chunk. + --chomp The command spawned by -s receives the standard input without + trailing newlines. + -I Replace the with the actioned chunk in , + implying -s. + -v Invert the range of actioning. + -z Line delimiter is NUL instead of a newline. ALIASES: -g @@ -107,7 +107,7 @@ ALIASES: --awk Alias of -e 'awk \"{print NR}\"' EXAMPLES: - Replace 'WORLD' to 'EARTH' on line including 'HELLO' in input: + Replace 'WORLD' with 'EARTH' on lines containing 'HELLO': $ cat file | teip -g HELLO -- sed 's/WORLD/EARTH/' Edit '|' separated fields of input: $ cat file.csv | teip -f 2 -d '|' -- sed 's/./@/g'