basename: change description and add directory example (#4528)

This commit is contained in:
Juri
2020-10-06 20:19:56 +02:00
committed by GitHub
parent 08286f6242
commit d22ac70ab4

View File

@@ -1,11 +1,15 @@
# basename
> Returns non-directory portion of a pathname.
> Remove leading directory portions from a path.
- Show only the file name from a path:
`basename {{path/to/file}}`
- Show only the rightmost directory name from a path:
`basename {{path/to/directory/}}`
- Show only the file name from a path, with a suffix removed:
`basename {{path/to/file}} {{suffix}}`