mirror of
https://github.com/tldr-pages/tldr.git
synced 2025-06-05 14:46:00 +02:00
basename: change description and add directory example (#4528)
This commit is contained in:
parent
08286f6242
commit
d22ac70ab4
1 changed files with 5 additions and 1 deletions
|
@ -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}}`
|
||||
|
|
Loading…
Add table
Reference in a new issue