[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
globskipdots is not disabled by default In POSIX mode
From: |
Emanuele Torre |
Subject: |
globskipdots is not disabled by default In POSIX mode |
Date: |
Sun, 7 Aug 2022 09:17:23 +0200 |
Configuration Information [Automatically generated, do not change]:
Machine: x86_64
OS: linux-gnu
Compiler: gcc
Compilation CFLAGS: -g -O2
uname output: Linux t420 5.15.58-2-lts #1 SMP Mon, 01 Aug 2022
19:44:08 +0000 x86_64 GNU/Linux
Machine Type: x86_64-pc-linux-gnu
Bash Version: 5.2
Patch Level: !PATCHLEVEL!
Release Status: rc2
Description:
bash 5.2 has introduced the `globskipdots' shopt which prevents
pathname expansion to match "." and ".." and is on by default.
When bash is starts in POSIX mode, it is also on by default,
it probably should not be for portability reasons.
Repeat-By:
bash-5.1$ ./bash --posix -c 'echo "$BASH_VERSION" .*'
5.2.0(4)-rc2 .build .gdb_history .git .gitignore .made
bash-5.1$ (exec -a sh ./bash -c 'echo "$BASH_VERSION" .*')
5.2.0(4)-rc2 .build .gdb_history .git .gitignore .made
Fix:
bash should turn globskipdots off at least when it starts in
POSIX mode.
It could also turn it off when `set -o posix' is run or
`POSIXLY_CORRECT' is set.
- globskipdots is not disabled by default In POSIX mode,
Emanuele Torre <=