aboutsummaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorDylan Araps <dylan.araps@gmail.com>2019-09-19 17:36:04 +0300
committerDylan Araps <dylan.araps@gmail.com>2019-09-19 17:36:04 +0300
commit9e6185bb3ae96c4b7a4345b0bd31cb10659a9028 (patch)
tree54c608444e62c407cf59e2bd71c7f138d22de696
parent82c43dbdba236d62ff3955508ee35c8e86afd147 (diff)
downloadpure-sh-bible-9e6185bb3ae96c4b7a4345b0bd31cb10659a9028.tar.gz
pure-sh-bible-9e6185bb3ae96c4b7a4345b0bd31cb10659a9028.zip
docs: update
-rw-r--r--README.md3
1 files changed, 1 insertions, 2 deletions
diff --git a/README.md b/README.md
index 52133b5..ec7285b 100644
--- a/README.md
+++ b/README.md
@@ -486,10 +486,9 @@ Alternative to the `dirname` command.
dirname() {
# Usage: dirname "path"
dir=${1%%/}
+ [ "${dir##*/*}" ] && dir=.
dir=${dir%/*}
- [ "${1##*/*}" ] && dir=.
-
printf '%s\n' "${dir:-/}"
}
```