To avoid the XY problem scenario, I'll explain why I'm asking this question.
I remember I had
shopt -s extglob set in my
~/.bashrc file, because things like
@(pattern-list) do work.
However, I've just looked into
~/.bashrc and that option is not set.
So I decided to see where it comes from, and discovered that
- if I launch another shell via
bash --norcand then run
shoptI see the line
- whereas, if I launch it via
bash --rcfile /dev/null, then
which doesn't really help me in find out which file is
extglob is set in.
Based on a comment,
PS4=' $BASH_SOURCE:$LINENO: ' bash -lixc true |& grep extglob gives
/usr/share/bash-completion/bash_completion:45: shopt -s extglob progcomp /usr/share/bash-completion/bash_completion:45: shopt -s extglob progcomp