mirror of
https://github.com/nushell/nushell.git
synced 2024-11-23 08:53:29 +01:00
bff81f24aa
* Autogenerate missing docs * Update ansi.md * Rename question mark command docs * Delete empty?.md
501 B
501 B
path basename
Get the final component of a path
Usage
> path basename ...args {flags}
Parameters
- ...args: Optionally operate by column path
Flags
- -h, --help: Display this help message
- -r, --replace : Return original path with basename replaced by this string
Examples
Get basename of a path
> echo '/home/joe/test.txt' | path basename
Replace basename of a path
> echo '/home/joe/test.txt' | path basename -r 'spam.png'