From 56a29d9a9283338a8d7b5af6b6b9aeb06ac34f3f Mon Sep 17 00:00:00 2001 From: Pavel Valena Date: Fri, 25 Mar 2022 17:39:04 +0100 Subject: [PATCH] docs: do not mention nullglob in cases where it's not needed --- docs/BASH.md | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/docs/BASH.md b/docs/BASH.md index 941754ea..e72a2f66 100644 --- a/docs/BASH.md +++ b/docs/BASH.md @@ -16,8 +16,8 @@ Don't use `dirname`, use: If you set `shopt` in a function, reset to its default state with `trap`: ```shell func() { - trap "$(shopt -p nullglob globstar)" RETURN - shopt -q -s nullglob globstar + trap "$(shopt -p globstar)" RETURN + shopt -q -s globstar } ``` @@ -51,8 +51,8 @@ func() { Or collect the filenames in an array, if you need them more than once: ```shell func() { - trap "$(shopt -p nullglob globstar)" RETURN - shopt -q -s nullglob globstar + trap "$(shopt -p globstar)" RETURN + shopt -q -s globstar filenames=( /usr/lib*/**/lib*.a )