]> git.ipfire.org Git - thirdparty/dracut.git/commitdiff
docs: do not mention nullglob in cases where it's not needed
authorPavel Valena <pvalena@redhat.com>
Fri, 25 Mar 2022 16:39:04 +0000 (17:39 +0100)
committerJóhann B. Guðmundsson <johannbg@gmail.com>
Mon, 4 Apr 2022 08:00:10 +0000 (08:00 +0000)
docs/BASH.md

index 941754eadedda15bbdb3652e6ed026d17381355c..e72a2f664296702fff116bfe9166f42b46f1789a 100644 (file)
@@ -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 )