path split
for path> path split {flags}
input | output |
---|---|
list<string> | list<list<string>> |
string | list<string> |
Split a path into parts
>'/home/viking/spam.txt'|path split
╭───┬──────────╮
│0│/│
│1│home│
│2│viking│
│3│spam.txt│
╰───┴──────────╯
Split paths in list into parts
> [ /home/viking/spam.txt/home/viking/eggs.txt ] |path split
╭───┬──────────────────╮
│0│╭───┬──────────╮│
│││0│/││
│││1│home││
│││2│viking││
│││3│spam.txt││
││╰───┴──────────╯│
│1│╭───┬──────────╮│
│││0│/││
│││1│home││
│││2│viking││
│││3│eggs.txt││
││╰───┴──────────╯│
╰───┴──────────────────╯
Copyright © 2019–2023 The Nushell Project DevelopersLicensed under the MIT License.
https://www.nushell.sh/commands/docs/path_split.html