Skip to content

Commit

Permalink
fix(lib/shopt): turn on "extglob" by default
Browse files Browse the repository at this point in the history
We thought that we already have `extglob` turned on, but it was just
turned on by bash-completion that we loaded from "lib/bourne-shell".
When the sytem does not have bash-completion, the extglob settings are
not enabled and thus causes an issue with constructs using extglob.
We already turn on many glob features in "lib/shopt", and there does
not seem to be reason not to turn on "extglob".  In this patch, we
enable it by default.
  • Loading branch information
akinomyoga committed Sep 9, 2024
1 parent 770d6ef commit 08e297c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions lib/shopt.sh
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,9 @@ PROMPT_DIRTRIM=${PROMPT_DIRTRIM:-2}
# E.g. typing !!<space> will replace the !! with your last command
bind Space:magic-space

# Turn on extended glob patterns such as @(...), *(...), ?(...), and +(...)
shopt -s extglob

# Turn on recursive globbing (enables ** to recurse all directories)
shopt -s globstar 2> /dev/null

Expand Down

0 comments on commit 08e297c

Please sign in to comment.