POSIX.1-2024 says [1]:
-g
Write to standard output all the current settings, optionally
excluding the terminal window size, ...
Therefore, I think it is worth describing our behavior.
[1] https://pubs.opengroup.org/onlinepubs/9799919799/utilities/stty.html
-- 8< --
* doc/coreutils.texi (stty invocation): Mention that 'stty -g' does not
save the terminal window size as allowed by POSIX.1-2024.
---
doc/coreutils.texi | 4 ++++
1 file changed, 4 insertions(+)
diff --git a/doc/coreutils.texi b/doc/coreutils.texi
index def1a8820..aeb258b23 100644
--- a/doc/coreutils.texi
+++ b/doc/coreutils.texi
@@ -14665,6 +14665,10 @@ @node stty invocation
another @command{stty} command to restore the current settings. This option
may not be used in combination with any line settings.
+POSIX-1.2024 allows implementations of the @code{-g} option to exclude
+the terminal window size from the output. This is the behavior of GNU
+@command{stty}.
+
@end table
Many settings can be turned off by preceding them with a @samp{-}.
--
2.53.0