docs: update

This commit is contained in:
Dylan Araps 2019-09-19 20:07:56 +03:00
parent ea1864fd09
commit 3988ed31be

View file

@ -511,7 +511,7 @@ Alternative to the `basename` command.
```sh
basename() {
# Usage: basename "path"
# Usage: basename "path" ["suffix"]
dir=${1%${1##*[!/]}}
dir=${dir##*/}
dir=${dir%"$2"}
@ -526,6 +526,9 @@ basename() {
$ basename ~/Pictures/Wallpapers/1.jpg
1.jpg
$ basename ~/Pictures/Wallpapers/1.jpg .jpg
1
$ basename ~/Pictures/Downloads/
Downloads
```