Skip to content

Commit

Permalink
Fix typo in readme
Browse files Browse the repository at this point in the history
  • Loading branch information
jpikl committed Nov 29, 2020
1 parent 18adbf1 commit 054d3c3
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 14 deletions.
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -84,7 +84,7 @@ By default, pattern characters are directly copied to output.

Characters `{` and `}` form an expression which is evaluated and replaced in output.

Empty exrpession `{}` evaluates directly to input value.
Empty expression `{}` evaluates directly to input value.

| Input | Pattern | Output |
| ------- | ------------ | --------------- |
Expand Down Expand Up @@ -140,7 +140,7 @@ printf 'a\0b' | rew -z # Convert NUL bytes to newlines
| `b` | Base name |
| `B` | Remove extension |
| `e` | Extension |
| `E` | Extension with dot<br/>Dot is not printed for missing extension. |
| `E` | Extension with dot |
| `z` | Ensure trailing separator |
| `Z` | Remove trailing separator |

Expand Down
23 changes: 11 additions & 12 deletions src/bin/rew/pattern/help.rs
Original file line number Diff line number Diff line change
Expand Up @@ -22,7 +22,7 @@ By default, pattern characters are directly copied to output.
Characters `{` and `}` form an expression which is evaluated and replaced in output.
Empty exrpession `{}` evaluates directly to input value.
Empty expression `{}` evaluates directly to input value.
INPUT PATTERN OUTPUT
------------------------------------
Expand Down Expand Up @@ -78,7 +78,6 @@ const FILTERS_HELP: &str = indoc! {"
`B` Remove extension
`e` Extension
`E` Extension with dot
Dot is not printed for missing extension.
`z` Ensure trailing separator
`Z` Remove trailing separator
Expand Down Expand Up @@ -139,19 +138,19 @@ Canonical path `P` works similarly to `p` but has some differences:
- Evaluation will fail for a non-existent path.
- Result will always be an absolute path.
- If path is a symbolic link, it will be resolved.
Parent directory `d` might give a different result than `D` which removes last name of a path.
Similarly, file name `f` might not be the same as last name `F` which is a complement of `D`.
INPUT {d} {D} {f} {F}
INPUT {d} {D} {f} {F}
--------------------------------------------------
/ / / (empty) (empty)
/a / / a a
a/b a a b b
a . (empty) a a
.. ../.. (empty) (empty) ..
. ./.. (empty) (empty) .
(empty) .. (empty) (empty) (empty)
/ / / (empty) (empty)
/a / / a a
a/b a a b b
a . (empty) a a
.. ../.. (empty) (empty) ..
. ./.. (empty) (empty) .
(empty) .. (empty) (empty) (empty)
========================================
Substring filters
Expand Down

0 comments on commit 054d3c3

Please sign in to comment.