${name:r}: Remove file extension
Removes the file extension from a file path.
This is the opposite of :e, which evaluates to the file extension.
Links
Examples
- Print path without file extension
- Output:
1 2path="/dir/subdir/file.csv" echo $path:r1/dir/subdir/file
BashSupport Pro is a Zsh IDE with support for $varName:r – try it now!