${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 2
path="/dir/subdir/file.csv" echo $path:r
1
/dir/subdir/file
BashSupport Pro 是一款支持 r** 的 **Zsh 集成开发环境 - 立即试用!