After the optional word designator, you can add a sequence of one or more of the following modifiers, each preceded by a ‘:’.
hRemove a trailing pathname component, leaving only the head.
tRemove all leading pathname components, leaving the tail.
rRemove a trailing suffix of the form ‘.suffix’, leaving the basename.
eRemove all but the trailing suffix.
pPrint the new command but do not execute it.
qQuote the substituted words, escaping further substitutions.
xQuote the substituted words as with ‘q’, but break into words at spaces, tabs, and newlines.
s/old/new/Substitute new for the first occurrence of old in the event line. Any delimiter may be used in place of ‘/’. The delimiter may be quoted in old and new with a single backslash. If ‘&’ appears in new, it is replaced by old. A single backslash will quote the ‘&’. The final delimiter is optional if it is the last character on the input line.
&Repeat the previous substitution.
gaCause changes to be applied over the entire event line. Used in conjunction with ‘s’, as in gs/old/new/, or with ‘&’.
GApply the following ‘s’ modifier once to each word in the event.
Copyright © 2000, 2001, 2002, 2007, 2008 Free Software Foundation, Inc.
Licensed under the GNU Free Documentation License.
https://www.gnu.org/software/bash/manual/html_node/Modifiers.html