runtime(sh): consider sh as POSIX shell by default
Also, do not set g:is_kornshell when g:is_posix is set. BSD shells are
POSIX but many are derived from the ash shell.
closes: #16939
Signed-off-by: Mohamed Akram <mohd.akram@outlook.com>
Signed-off-by: Christian Brabandt <cb@256bit.org>
diff --git a/runtime/doc/syntax.txt b/runtime/doc/syntax.txt
index a44b6f6..fe6865e 100644
--- a/runtime/doc/syntax.txt
+++ b/runtime/doc/syntax.txt
@@ -1,4 +1,4 @@
-*syntax.txt* For Vim version 9.1. Last change: 2025 Mar 15
+*syntax.txt* For Vim version 9.1. Last change: 2025 Mar 21
VIM REFERENCE MANUAL by Bram Moolenaar
@@ -3512,25 +3512,25 @@
/bin/sh /bin/ksh /bin/bash). If the first line specifies a shelltype, then
that shelltype is used. However some files (ex. .profile) are known to be
shell files but the type is not apparent. Furthermore, on many systems sh is
-symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (Posix).
+symbolically linked to "bash" (Linux, Windows+cygwin) or "ksh" (POSIX).
One may specify a global default by instantiating one of the following
variables in your <.vimrc>:
ksh: >
let g:is_kornshell = 1
-< posix: (using this is nearly the same as setting g:is_kornshell to 1) >
+< posix: (default) >
let g:is_posix = 1
< bash: >
let g:is_bash = 1
-< sh: (default) Bourne shell >
+< dash: >
+ let g:is_dash = 1
+< sh: Bourne shell >
let g:is_sh = 1
-< (dash users should use posix)
-
If there's no "#! ..." line, and the user hasn't availed himself/herself of a
default sh.vim syntax setting as just shown, then syntax/sh.vim will assume
-the Bourne shell syntax. No need to quote RFCs or market penetration
+the POSIX shell syntax. No need to quote RFCs or market penetration
statistics in error reports, please -- just select the default version of the
sh your system uses and install the associated "let..." in your <.vimrc>.