Rocksolid Light

Welcome to novaBBS (click a section below)

mail  files  register  newsreader  groups  login

Message-ID:  

A year spent in artificial intelligence is enough to make one believe in God.


computers / comp.editors / Re: Vim syntax file for ksh93 ?

SubjectAuthor
* Vim syntax file for ksh93 ?Janis Papanagnou
+* Re: Vim syntax file for ksh93 ?jeorge
|`* Re: Vim syntax file for ksh93 ?Janis Papanagnou
| +* Re: Vim syntax file for ksh93 ?Kenny McCormack
| |`- Re: Vim syntax file for ksh93 ?Janis Papanagnou
| `- Re: Vim syntax file for ksh93 ?Benjamin Esham
`- Re: Vim syntax file for ksh93 ?Kaz Kylheku

1
Vim syntax file for ksh93 ?

<uarri3$31oah$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=24&group=comp.editors#24

  copy link   Newsgroups: comp.unix.shell comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell,comp.editors
Subject: Vim syntax file for ksh93 ?
Date: Tue, 8 Aug 2023 00:34:42 +0200
Organization: A noiseless patient Spider
Lines: 8
Message-ID: <uarri3$31oah$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Aug 2023 22:34:43 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="521ef36333c047c9aeee7ae1946d5b07";
logging-data="3203409"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18dqi/GJDbEmSdY6W/lPJmm"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:U77zBO9ZSMw1V8CBk4GcMBC8Ojo=
X-Enigmail-Draft-Status: N1110
X-Mozilla-News-Host: news://news.eternal-september.org:119
 by: Janis Papanagnou - Mon, 7 Aug 2023 22:34 UTC

Is there some Vim syntax file existing that handles a contemporary
Kornshell syntax (ksh93u+) correctly, i.e. without displaying valid
ksh93 constructs as errors (as the existing sh.vim does[*])?

Janis

[*] A specific ksh.vim is obviously not existing in my Linux distro;
online resources seem to indicate that an sh.vim should cover that.

Re: Vim syntax file for ksh93 ?

<uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=25&group=comp.editors#25

  copy link   Newsgroups: comp.unix.shell comp.editors
Path: i2pn2.org!i2pn.org!weretis.net!feeder6.news.weretis.net!newsfeed.hasname.com!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!nnrp.usenet.blueworldhosting.com!.POSTED!not-for-mail
From: some...@invalid.invalid (jeorge)
Newsgroups: comp.unix.shell,comp.editors
Subject: Re: Vim syntax file for ksh93 ?
Date: Mon, 7 Aug 2023 17:08:25 -0600
Organization: Ministry of Madness
Message-ID: <uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com>
References: <uarri3$31oah$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding: 7bit
Injection-Date: Mon, 7 Aug 2023 23:08:25 -0000 (UTC)
Injection-Info: nnrp.usenet.blueworldhosting.com; posting-account="YKRG+wcUE3ZH5QknWLsQFQjWpafUZ9Hi6Jg7DGavMDA";
logging-data="93876"; mail-complaints-to="usenet@blueworldhosting.com"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:102.0) Gecko/20100101
Thunderbird/102.14.0
Cancel-Lock: sha1:NlCspv6xm5Ux+Sn8e86l2y9x+jo= sha256:ifCopuXt65ZmiMVOtw3Zg8E63GHdydDimN/rH8ic4CQ=
sha1:rRerhl3VADOuSAxvNohRSkn/QLM= sha256:alQSMgobIZ5MJzeyPko46RT4y+zjO9vwRY/0vK2M19Q=
In-Reply-To: <uarri3$31oah$1@dont-email.me>
Content-Language: en-US
 by: jeorge - Mon, 7 Aug 2023 23:08 UTC

On 8/7/23 4:34 PM, Janis Papanagnou wrote:
> Is there some Vim syntax file existing that handles a contemporary
> Kornshell syntax (ksh93u+) correctly, i.e. without displaying valid
> ksh93 constructs as errors (as the existing sh.vim does[*])?
>
> Janis
>
> [*] A specific ksh.vim is obviously not existing in my Linux distro;
> online resources seem to indicate that an sh.vim should cover that.

Does adding the following to your .vimrc file help?

let g:is_kornshell = 1

The ref link below has some other suggestions but you've likely tried
them already.

ref: https://vimhelp.org/syntax.txt.html#sh.vim

Re: Vim syntax file for ksh93 ?

<uas5co$331bp$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=26&group=comp.editors#26

  copy link   Newsgroups: comp.unix.shell comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell,comp.editors
Subject: Re: Vim syntax file for ksh93 ?
Date: Tue, 8 Aug 2023 03:22:31 +0200
Organization: A noiseless patient Spider
Lines: 25
Message-ID: <uas5co$331bp$1@dont-email.me>
References: <uarri3$31oah$1@dont-email.me>
<uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Aug 2023 01:22:32 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="521ef36333c047c9aeee7ae1946d5b07";
logging-data="3245433"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18iDjREUM5+0KSLW8Bem5iG"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:syRFWZXGjFXDLv0xqppMwz5SDdI=
X-Enigmail-Draft-Status: N1110
In-Reply-To: <uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com>
 by: Janis Papanagnou - Tue, 8 Aug 2023 01:22 UTC

On 08.08.2023 01:08, jeorge wrote:
> On 8/7/23 4:34 PM, Janis Papanagnou wrote:
>> Is there some Vim syntax file existing that handles a contemporary
>> Kornshell syntax (ksh93u+) correctly, i.e. without displaying valid
>> ksh93 constructs as errors (as the existing sh.vim does[*])?
>>
>> Janis
>>
>> [*] A specific ksh.vim is obviously not existing in my Linux distro;
>> online resources seem to indicate that an sh.vim should cover that.
>
> Does adding the following to your .vimrc file help?
>
> let g:is_kornshell = 1

No, as far as I can see it doesn't change anything.

To name just two wrongly marked syntax errors (as examples):

In ${.sh.value} marked as error: .sh.value
In ${PWD/${HOME}\//\~/}
marked as error: / and \//\~/

Janis

Re: Vim syntax file for ksh93 ?

<uas602$399tj$1@news.xmission.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=27&group=comp.editors#27

  copy link   Newsgroups: comp.unix.shell comp.editors
Path: i2pn2.org!i2pn.org!usenet.blueworldhosting.com!diablo1.usenet.blueworldhosting.com!2.us.feeder.erje.net!feeder.erje.net!xmission!nnrp.xmission!.POSTED.shell.xmission.com!not-for-mail
From: gaze...@shell.xmission.com (Kenny McCormack)
Newsgroups: comp.unix.shell,comp.editors
Subject: Re: Vim syntax file for ksh93 ?
Date: Tue, 8 Aug 2023 01:32:50 -0000 (UTC)
Organization: The official candy of the new Millennium
Message-ID: <uas602$399tj$1@news.xmission.com>
References: <uarri3$31oah$1@dont-email.me> <uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com> <uas5co$331bp$1@dont-email.me>
Injection-Date: Tue, 8 Aug 2023 01:32:50 -0000 (UTC)
Injection-Info: news.xmission.com; posting-host="shell.xmission.com:166.70.8.4";
logging-data="3450803"; mail-complaints-to="abuse@xmission.com"
X-Newsreader: trn 4.0-test77 (Sep 1, 2010)
Originator: gazelle@shell.xmission.com (Kenny McCormack)
 by: Kenny McCormack - Tue, 8 Aug 2023 01:32 UTC

In article <uas5co$331bp$1@dont-email.me>,
Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
....
>> let g:is_kornshell = 1
>
>No, as far as I can see it doesn't change anything.

Just to be clear, I want you to run the following tests:

$ vim mykornscript

Then do:

:echo b:is_kornshell

In fact, the way I usually do it is type in everything up to the _, then hit
tab to cycle through all the ones that are set. Note that the actual value
of the variable is irrelevant; it will always be either 1 or unset.

If you see that is_kornshell is already set, then you can ignore the rest
of this.

If it isn't, then do:

:let b:is_kornshell=1
:e

The :e is critical!

See if that fixes things (or not).

--
Treating the stock market indexes as general measures of the well-being of a
society is like treating your blood pressure as an indicator of health. The
higher, the better, right? In fact, a high stock market is good for the investor
class, but it means the rest of us are getting screwed better than ever.

Re: Vim syntax file for ksh93 ?

<uas7p5$3730l$1@dont-email.me>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=28&group=comp.editors#28

  copy link   Newsgroups: comp.unix.shell comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: janis_pa...@hotmail.com (Janis Papanagnou)
Newsgroups: comp.unix.shell,comp.editors
Subject: Re: Vim syntax file for ksh93 ?
Date: Tue, 8 Aug 2023 04:03:17 +0200
Organization: A noiseless patient Spider
Lines: 43
Message-ID: <uas7p5$3730l$1@dont-email.me>
References: <uarri3$31oah$1@dont-email.me>
<uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com>
<uas5co$331bp$1@dont-email.me> <uas602$399tj$1@news.xmission.com>
MIME-Version: 1.0
Content-Type: text/plain; charset=windows-1252
Content-Transfer-Encoding: 7bit
Injection-Date: Tue, 8 Aug 2023 02:03:17 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="521ef36333c047c9aeee7ae1946d5b07";
logging-data="3378197"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+HavbuVKw9NKZNtIY7Kyt6"
User-Agent: Mozilla/5.0 (X11; Linux x86_64; rv:45.0) Gecko/20100101
Thunderbird/45.8.0
Cancel-Lock: sha1:FSABEa+Gfp6VQe/ipeFeWehoDP8=
In-Reply-To: <uas602$399tj$1@news.xmission.com>
 by: Janis Papanagnou - Tue, 8 Aug 2023 02:03 UTC

On 08.08.2023 03:32, Kenny McCormack wrote:
> In article <uas5co$331bp$1@dont-email.me>,
> Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> ...
>>> let g:is_kornshell = 1
>>
>> No, as far as I can see it doesn't change anything.
>
> Just to be clear, I want you to run the following tests:
>
> $ vim mykornscript
>
> Then do:
>
> :echo b:is_kornshell
>
> In fact, the way I usually do it is type in everything up to the _, then hit
> tab to cycle through all the ones that are set. Note that the actual value
> of the variable is irrelevant; it will always be either 1 or unset.
>
> If you see that is_kornshell is already set, then you can ignore the rest
> of this.
>
> If it isn't, then do:
>
> :let b:is_kornshell=1
> :e
>
> The :e is critical!
>
> See if that fixes things (or not).
>

Previously I had already tried

:let b:is_kornshell=1
:e!

now I also tried with :e and omitted the '!' (as you wrote).
The effect is the same, though.

Janis

Re: Vim syntax file for ksh93 ?

<20230807191518.264@kylheku.com>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=29&group=comp.editors#29

  copy link   Newsgroups: comp.unix.shell comp.editors
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: 864-117-...@kylheku.com (Kaz Kylheku)
Newsgroups: comp.unix.shell,comp.editors
Subject: Re: Vim syntax file for ksh93 ?
Date: Tue, 8 Aug 2023 02:16:15 -0000 (UTC)
Organization: A noiseless patient Spider
Lines: 12
Message-ID: <20230807191518.264@kylheku.com>
References: <uarri3$31oah$1@dont-email.me>
Injection-Date: Tue, 8 Aug 2023 02:16:15 -0000 (UTC)
Injection-Info: dont-email.me; posting-host="2e64aa5a28c0801679f7444cde71de51";
logging-data="3380865"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/V28J8b7QDCd+wlonlQx6/TkmIx+M5ZSI="
User-Agent: slrn/1.0.3 (Linux)
Cancel-Lock: sha1:Si+T35GuQk423FQ7dPdV7g4+aBg=
 by: Kaz Kylheku - Tue, 8 Aug 2023 02:16 UTC

On 2023-08-07, Janis Papanagnou <janis_papanagnou+ng@hotmail.com> wrote:
> Is there some Vim syntax file existing that handles a contemporary
> Kornshell syntax (ksh93u+) correctly, i.e. without displaying valid
> ksh93 constructs as errors (as the existing sh.vim does[*])?

Sir, I'm on a call with a customer who wants working POSIX shell
and Bash syntax highlighting for Vim. Can you hold please?

--
TXR Programming Language: http://nongnu.org/txr
Cygnal: Cygwin Native Application Library: http://kylheku.com/cygnal
Mastodon: @Kazinator@mstdn.ca

Re: Vim syntax file for ksh93 ?

<rzk79m.8tugqn@bdesham.net>

  copy mid

https://www.novabbs.com/computers/article-flat.php?id=33&group=comp.editors#33

  copy link   Newsgroups: comp.unix.shell comp.editors
Followup: comp.unix.shell
Path: i2pn2.org!i2pn.org!eternal-september.org!news.eternal-september.org!.POSTED!not-for-mail
From: use...@esham.io (Benjamin Esham)
Newsgroups: comp.unix.shell,comp.editors
Subject: Re: Vim syntax file for ksh93 ?
Followup-To: comp.unix.shell
Date: Thu, 17 Aug 2023 20:01:04 -0400
Organization: United Federation of Planets
Lines: 34
Message-ID: <rzk79m.8tugqn@bdesham.net>
References: <uarri3$31oah$1@dont-email.me>
<uarth9$2rlk$1@nnrp.usenet.blueworldhosting.com>
<uas5co$331bp$1@dont-email.me>
MIME-Version: 1.0
Content-Type: text/plain
Injection-Info: dont-email.me; posting-host="dde67cb52f96580227d7fca6d57bea69";
logging-data="4161427"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1+SFVXyE6kBUAEXb7z2lDO+YGLjrUr4oOg955dfP/cgEQ=="
User-Agent: Gnus/5.13 (macOS)
Cancel-Lock: sha1:2jB7I3fJbvY2IWre9qohA119cA4=
sha1:PoRO5hIg7bIw/Dc6Th1u8wuSG3E=
 by: Benjamin Esham - Fri, 18 Aug 2023 00:01 UTC

Janis Papanagnou wrote:

>> On 8/7/23 4:34 PM, Janis Papanagnou wrote:
>>
>>> Is there some Vim syntax file existing that handles a contemporary
>>> Kornshell syntax (ksh93u+) correctly, i.e. without displaying valid
>>> ksh93 constructs as errors (as the existing sh.vim does[*])?
>>>
>>> [snip]
>
> To name just two wrongly marked syntax errors (as examples):
>
> In ${.sh.value} marked as error: .sh.value
> In ${PWD/${HOME}\//\~/}
> marked as error: / and \//\~/

Have you tried the zsh syntax highlighting (:set filetype=zsh)? I tried
these two constructs and neither was marked as an error.

Zsh supports a fairly large subset of ksh syntax and semantics,[1][2] so I'd
imagine that a lot of your scripts would be highlighted in a reasonable way
by the zsh syntax file. (If anything, you might run into problems where ksh
syntax errors *aren't* flagged because they're valid in zsh.)

Hope this helps,

Benjamin

[1] At least that's my impression as a zsh user but ksh non-user.

[2] I don't know whether the ksh emulation ever covered 100% of ksh syntax
and semantics, and even if it did in the past, ksh may have evolved
since then. I am far from an expert here :-)


computers / comp.editors / Re: Vim syntax file for ksh93 ?

1
server_pubkey.txt

rocksolid light 0.9.81
clearnet tor