For input value /home/alice/notes.txt, filters would evaluate to:
Pattern
Output
{}
/home/alice/notes.txt
{d}, {D}
/home/alice
{f}, {F}
notes.txt
{b}
notes
{B}
/home/alice/notes
{e}
txt
{E}
.txt
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}
/
/
/
(empty)
(empty)
/a
/
/
a
a
a/b
a
a
b
b
a
.
(empty)
a
a
.
./..
(empty)
(empty)
.
..
../..
(empty)
(empty)
..
(empty)
..
(empty)
(empty)
(empty)
Extension with dot E can be useful when dealing with files with no extension.
Absolute path a and relative path A are both resolved against working directory w.
{w}
Input
{a}
{A}
/home/alice
/home/bob
/home/bob
../bob
/home/alice
../bob
/home/bob
../bob
By default, working directory w is set to your current working directory.
You can change that using the -w, --working-directory option.
w filter will always output an absolute path, even if you set a relative one using the -w option.
rew -w '/home/alice''{w}'# Absolute path
rew -w '../alice''{w}'# Relative to your current working directory