Hi Doug!

Sorry if my tone appeared to be rough; it wasn't meant to be.
It seems with 9.2 quite some wishes will come true.  :-)

The only thing that is obscure to me is how the actual version will be 
determined.
And I have no idea what /"generic" KornShell highlighting/ actually means below.
I hope that's the full fledged ksh93 (in form of ksh93u+m).

The shebang line will usually have /bin/sh (e.g. on AIX the 'sh' was actually a 
'ksh')
or /bin/ksh or /bin/ksh93 (e.g. on my Linux system the latter are both 
ksh93u+m) .
The necessity to specify more than ksh (or maybe ksh93) should not be mandated
to get the appropriate syntax highlighting. (I've no idea how Vim determines the
actual ksh-evolution variant, since the shebang line won't reflect any 
details.) - So
if we have #!/bin/ksh which of mksh, ksh88, ksh93, ksh93u syntax will be 
selected?
I hope that's the full fledged ksh93 (which is mostly a superset of previous 
versions).

Careful with the "ksh2020", and "ksh93v(-)"; these should *not* define the base!
(You've noticed the state for the former already, and the latter is not better.)

Thanks.

Regards,
Janis


________________________________________
Von: [email protected] <[email protected]> im Auftrag von Doug 
Kearns <[email protected]>
Gesendet: Samstag, 16. Mai 2026 05:55
An: [email protected]
Betreff: Re: [vim/vim] runtime/syntax/sh.vim: Array highlighting (Issue #20183)

On Sat, 16 May 2026 at 07:26, Janis Papanagnou 
<[email protected]<mailto:[email protected]>> wrote:

<snip>

For context I don't know KornShell and have never used it in anger, I'm just 
trying to help you get it highlighted.

I'm not sure what "ksh2020" is supposed to mean or identify . The original
standard ksh (based on original AT&T ksh) is ksh93 (either "ksh93u+" or the
maintained version "ksh93u+m" from Martijn Dekker).

You can read about the history of ksh2020 on the KornShell wikipedia page.  I 
suggested using it for testing the highlighting because I assumed, perhaps 
incorrectly, that it was the most featureful version.  It appears to have been 
abandoned.

It would be inappropriate to require a change in the shebang lines of scripts
to be all changed from "#!/bin/ksh" or "#!/bin/ksh93" to "#!/bin/ksh2020".

I didn't implement this configuration method but it seems that version specific 
KornShell highlighting is only available via a dedicated shebang line otherwise 
a "generic" KornShell highlighting is used.  The help states "Specific shell 
features are automatically enabled based on the shell detected from the shebang 
line ("#! ...").  For KornShell Vim detects different shell features for mksh, 
ksh88, ksh93, ksh93u, ksh93v, and  ksh2020."

The short story is that with just `let g:is_kornshell = 1` set in my vimrc and 
using Vim 9.1 your parameter expansion and set command examples are not 
highlighted correctly but when using Vim 9.2 or later only the set command is 
highlighted incorrectly.

So the best course of action is to upgrade to Vim 9.2 or use the current 
development version of runtime/syntax/sh.vim that I linked to earlier.  Then 
you need to determine based on your specific usage whether it's best to 
configure the KornShell support via the variable, shebang line, or filename 
extension.

<snip>

Regards,
Doug

--
--
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

---
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to 
[email protected]<mailto:[email protected]>.
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/CAJ1uvoB8B-G%3Dem54gQejYYV%3DMN9%2BXJvHiORDB%2BRuq_fW1NEimg%40mail.gmail.com<https://groups.google.com/d/msgid/vim_dev/CAJ1uvoB8B-G%3Dem54gQejYYV%3DMN9%2BXJvHiORDB%2BRuq_fW1NEimg%40mail.gmail.com?utm_medium=email&utm_source=footer>.

-- 
-- 
You received this message from the "vim_dev" maillist.
Do not top-post! Type your reply below the text you are replying to.
For more information, visit http://www.vim.org/maillist.php

--- 
You received this message because you are subscribed to the Google Groups 
"vim_dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to [email protected].
To view this discussion visit 
https://groups.google.com/d/msgid/vim_dev/DU0PR02MB10422FD9A3B6B50002FD1049DF3052%40DU0PR02MB10422.eurprd02.prod.outlook.com.

Raspunde prin e-mail lui