From: Pavel Valena Date: Fri, 25 Mar 2022 16:39:04 +0000 (+0100) Subject: docs: do not mention nullglob in cases where it's not needed X-Git-Tag: 057~56 X-Git-Url: http://git.ipfire.org/cgi-bin/gitweb.cgi?a=commitdiff_plain;h=79170aafba9ba1a852ffb2fdcc8277d216056671;p=thirdparty%2Fdracut.git docs: do not mention nullglob in cases where it's not needed --- diff --git a/docs/BASH.md b/docs/BASH.md index 941754ead..e72a2f664 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 )