shopt-option
Bash shopt globskipdots
Prevents pathname expansion from matching . and .. even when a pattern begins with a dot. Introduced in Bash 5.2 and normally enabled there. This is not equivalent to dotglob; hidden ordinary names can still match explicit dot patterns. Run in a fresh private directory with HOME set to that directory and LC_ALL=C. Expected output (one item per line): [.hidden]; [.]; [..]; [.hidden].
Formal Syntax & Structure
bash syntaxbash
shopt -s globskipdots; shopt -u globskipdots; shopt -q globskipdotsReturn Value
exit status
Option-setting command returns zero for a valid request; query status is zero if enabled, one if disabled.
Working Example
Example Snippetbash
mkdir filescd files || exit 1touch .hiddenshopt -s globskipdotsprintf '[%s]\n' .* shopt -u globskipdotsprintf '[%s]\n' .*