mirror of
https://github.com/nushell/nushell.git
synced 2024-11-27 02:44:01 +01:00
bff81f24aa
* Autogenerate missing docs * Update ansi.md * Rename question mark command docs * Delete empty?.md
792 B
792 B
path parse
Convert a path into structured data.
Each path is split into a table with 'parent', 'stem' and 'extension' fields. On Windows, an extra 'prefix' column is added.
Usage
> path parse ...args {flags}
Parameters
- ...args: Optionally operate by column path
Flags
- -h, --help: Display this help message
- -e, --extension : Manually supply the extension (without the dot)
Examples
Parse a path
> echo '/home/viking/spam.txt' | path parse
Replace a complex extension
> echo '/home/viking/spam.tar.gz' | path parse -e tar.gz | update extension { 'txt' }
Ignore the extension
> echo '/etc/conf.d' | path parse -e ''
Parse all paths under the 'name' column
> ls | path parse name