Skip to content

Commit fe315a2

Browse files
committed
Recognize internal variables new in bash 5.3
From the bug-bash@gnu.org announcement "Bash-5.3-beta available": q. GLOBSORT: new variable to specify how to sort the results of pathname expansion (name, size, blocks, mtime, atime, ctime, none) in ascending or descending order. w. BASH_MONOSECONDS: new dynamic variable that returns the value of the system's monotonic clock, if one is available. x. BASH_TRAPSIG: new variable, set to the numeric signal number of the trap being executed while it's running. https://lists.gnu.org/archive/html/bug-bash/2024-12/msg00120.html
1 parent d3001f3 commit fe315a2

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

src/ShellCheck/Data.hs

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,6 +49,7 @@ internalVariables = [
4949
"LINES", "MAIL", "MAILCHECK", "MAILPATH", "OPTERR", "PATH",
5050
"POSIXLY_CORRECT", "PROMPT_COMMAND", "PROMPT_DIRTRIM", "PS0", "PS1",
5151
"PS2", "PS3", "PS4", "SHELL", "TIMEFORMAT", "TMOUT", "TMPDIR",
52+
"BASH_MONOSECONDS", "BASH_TRAPSIG", "GLOBSORT",
5253
"auto_resume", "histchars",
5354

5455
-- Other
@@ -78,7 +79,7 @@ variablesWithoutSpaces = specialVariablesWithoutSpaces ++ [
7879
"EPOCHREALTIME", "EPOCHSECONDS", "LINENO", "OPTIND", "PPID", "RANDOM",
7980
"READLINE_ARGUMENT", "READLINE_MARK", "READLINE_POINT", "SECONDS",
8081
"SHELLOPTS", "SHLVL", "SRANDOM", "UID", "COLUMNS", "HISTFILESIZE",
81-
"HISTSIZE", "LINES"
82+
"HISTSIZE", "LINES", "BASH_MONOSECONDS", "BASH_TRAPSIG"
8283

8384
-- shflags
8485
, "FLAGS_ERROR", "FLAGS_FALSE", "FLAGS_TRUE"

0 commit comments

Comments
 (0)