From d22ac70ab4117759d4ca65a28eb8492c2370b57f Mon Sep 17 00:00:00 2001 From: Juri Date: Tue, 6 Oct 2020 20:19:56 +0200 Subject: [PATCH] basename: change description and add directory example (#4528) --- pages/common/basename.md | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/pages/common/basename.md b/pages/common/basename.md index 1fcafd9155..bc12f49bb4 100644 --- a/pages/common/basename.md +++ b/pages/common/basename.md @@ -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}}`