Skip to content

Commit

Permalink
docs: do not mention nullglob in cases where it's not needed
Browse files Browse the repository at this point in the history
  • Loading branch information
pvalena authored and johannbg committed Apr 4, 2022
1 parent f3441cc commit 79170aa
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions docs/BASH.md
Original file line number Diff line number Diff line change
Expand Up @@ -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
}
```

Expand Down Expand Up @@ -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 )

Expand Down

0 comments on commit 79170aa

Please sign in to comment.