zsh-users
 help / color / mirror / code / Atom feed
* syntax overview for zsh?
@ 2004-03-20 15:51 Thorsten Kampe
  2004-03-20 16:04 ` Nikolai Weibull
  0 siblings, 1 reply; 13+ messages in thread
From: Thorsten Kampe @ 2004-03-20 15:51 UTC (permalink / raw)
  To: zsh-users

Hi,

has anyone (the zsh developers maybe?) an overview of the zsh syntax
elements (keywords, etc.)? It should be zsh specific (and not bash or
sh).

I need this for a "syntax highlighter" of my preferred editor.

Thorsten


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-20 15:51 syntax overview for zsh? Thorsten Kampe
@ 2004-03-20 16:04 ` Nikolai Weibull
  2004-03-20 18:15   ` Thorsten Kampe
  0 siblings, 1 reply; 13+ messages in thread
From: Nikolai Weibull @ 2004-03-20 16:04 UTC (permalink / raw)
  To: zsh-users

* Thorsten Kampe <thorsten@thorstenkampe.de> [Mar 20, 2004 17:00]:
> I need this for a "syntax highlighter" of my preferred editor.

And what editor may that be?  I have a pretty good one for Vim (the
standard one sucks imo),
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-20 16:04 ` Nikolai Weibull
@ 2004-03-20 18:15   ` Thorsten Kampe
  2004-03-21  5:41     ` Bob Schmertz
                       ` (2 more replies)
  0 siblings, 3 replies; 13+ messages in thread
From: Thorsten Kampe @ 2004-03-20 18:15 UTC (permalink / raw)
  To: zsh-users

* Nikolai Weibull (2004-03-20 17:04 +0100)
> * Thorsten Kampe <thorsten@thorstenkampe.de> [Mar 20, 2004 17:00]:
>> I need this for a "syntax highlighter" of my preferred editor.
> 
> And what editor may that be?

EditPad Pro (and Boxer - Windows only). The lack of usable editors in
Unix is /interesting/[1].

>  I have a pretty good one for Vim (the standard one sucks imo),

If you would share it with me - I'd be grateful.

If anyone else has a vim or X(Emacs) syntax highlighter I'd be
grateful, too.

Thorsten

[1] (X)Emacs is the ugliest application I've ever seen. It has all the
functions you'll never need and those you need you'll never find.
Emacs doesn't have its own Macro language - it has a Programming
language. Great - if you know lisp.

The user interface of Vi(m) is the most ridicilous thing I've ever
seen. Do they really expect someone to memorize all this "2d" stuff
without a menu?

My preferred editor has been JED - until after two years of using JED
I wanted to do this arcane art called "sorting lines". I thought it
could be so easy as marking the lines I want to sort and then choosing
"sort" - how foolish and naive I was[2]. (I won't mention that
depending on the terminal and OS I use, either the [Del] or the
[Backspc] key "don't work" - not to mention [Home] and [End] - this is
"standard Unix behaviour" and I could easily compensate for it by
investing a day's work for each terminal and each OS).

[2] I tried it today again - JED doesn't sort marked blocks if the
cursor is just one row below the block (where it's supposed to be
after marking a region!). The cursor has to be in the last line of the
highlighted region - otherwise JED doesn't sort the region at all. Now
that is /enhanced usability/, /really/!


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-20 18:15   ` Thorsten Kampe
@ 2004-03-21  5:41     ` Bob Schmertz
  2004-03-21 16:02       ` Thorsten Kampe
  2004-03-21 12:24     ` Nikolai Weibull
  2004-03-22  1:14     ` Thorsten Haude
  2 siblings, 1 reply; 13+ messages in thread
From: Bob Schmertz @ 2004-03-21  5:41 UTC (permalink / raw)
  To: Thorsten Kampe, zsh-users


--- Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> EditPad Pro (and Boxer - Windows only). The lack of usable editors in
> Unix is /interesting/[1].
> 

I'm an emacs believer, myself, but a lot of people like NEdit and jEdit.

> >  I have a pretty good one for Vim (the standard one sucks imo),
> 
> If you would share it with me - I'd be grateful.
> 
> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
> grateful, too.
> 

I'm not a major-league zsh programmer, so I may well be ignorant, but
what's wrong with good-old shell-script mode in (X)Emacs?

=====
Cheers,
Bob Schmertz

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-20 18:15   ` Thorsten Kampe
  2004-03-21  5:41     ` Bob Schmertz
@ 2004-03-21 12:24     ` Nikolai Weibull
  2004-03-23 18:49       ` Thorsten Kampe
  2004-03-22  1:14     ` Thorsten Haude
  2 siblings, 1 reply; 13+ messages in thread
From: Nikolai Weibull @ 2004-03-21 12:24 UTC (permalink / raw)
  To: zsh-users

* Thorsten Kampe <thorsten@thorstenkampe.de> [Mar 20, 2004 19:30]:
> >  I have a pretty good one for Vim (the standard one sucks imo),
>
> If you would share it with me - I'd be grateful.

It's available at http://www.pcppopper.org/vim/syntax/pcp/zsh/ along
with a bunch of other stuff for vim.
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-21  5:41     ` Bob Schmertz
@ 2004-03-21 16:02       ` Thorsten Kampe
  2004-03-22  5:53         ` Bob Schmertz
  0 siblings, 1 reply; 13+ messages in thread
From: Thorsten Kampe @ 2004-03-21 16:02 UTC (permalink / raw)
  To: zsh-users

* Bob Schmertz (2004-03-21 06:41 +0100)
> --- Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
>> EditPad Pro (and Boxer - Windows only). The lack of usable editors in
>> Unix is /interesting/[1].
> 
> I'm an emacs believer, myself, but a lot of people like NEdit and jEdit.

Yes, I exaggerated. Some of these newstyle GUI editors are pretty and
pretty usable.
 
>>>  I have a pretty good one for Vim (the standard one sucks imo),
>> 
>> If you would share it with me - I'd be grateful.
>> 
>> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
>> grateful, too.
> 
> I'm not a major-league zsh programmer, so I may well be ignorant, but
> what's wrong with good-old shell-script mode in (X)Emacs?

Nothing, if I could find the defining syntax file. Nothing like
"sh.el" on my Gentoo box (where I have XEmacs).

Thorsten


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-20 18:15   ` Thorsten Kampe
  2004-03-21  5:41     ` Bob Schmertz
  2004-03-21 12:24     ` Nikolai Weibull
@ 2004-03-22  1:14     ` Thorsten Haude
  2 siblings, 0 replies; 13+ messages in thread
From: Thorsten Haude @ 2004-03-22  1:14 UTC (permalink / raw)
  To: zsh-users

[-- Attachment #1: Type: text/plain, Size: 576 bytes --]

Hi,

* Thorsten Kampe wrote (2004-03-20 19:15):
>* Nikolai Weibull (2004-03-20 17:04 +0100)
>> * Thorsten Kampe <thorsten@thorstenkampe.de> [Mar 20, 2004 17:00]:
>>> I need this for a "syntax highlighter" of my preferred editor.
>> 
>> And what editor may that be?
>
>EditPad Pro (and Boxer - Windows only). The lack of usable editors in
>Unix is /interesting/[1].

Ever tried NEdit?


Thorsten
-- 
A 'No' uttered from deepest conviction is better and greater than a
'Yes' merely uttered to please, or what is worse, to avoid trouble.
    - Mahatma Gandhi

[-- Attachment #2: Type: application/pgp-signature, Size: 189 bytes --]

^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-21 16:02       ` Thorsten Kampe
@ 2004-03-22  5:53         ` Bob Schmertz
  2004-03-22 11:58           ` Vincent Stemen
  0 siblings, 1 reply; 13+ messages in thread
From: Bob Schmertz @ 2004-03-22  5:53 UTC (permalink / raw)
  To: Thorsten Kampe, zsh-users


--- Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> >> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
> >> grateful, too.
> > 
> > I'm not a major-league zsh programmer, so I may well be ignorant, but
> > what's wrong with good-old shell-script mode in (X)Emacs?
> 
> Nothing, if I could find the defining syntax file. Nothing like
> "sh.el" on my Gentoo box (where I have XEmacs).
> 

If you just want to use it as is, just type M-x shell-script-mode (tab
completion works here, too), and it'll put you in Emacs' proper mode.  If
you want to tweak the syntax, the appropriate elisp file is the
non-obvious sh-script.el.  If you want to know how to make it
automatically detect zsh-ness and it's not already doing so (works for me
with no special effort in GNU Emacs if the file starts with #!/bin/zsh),
email me offline and I'll tell you what to put in your .emacs.

=====
Cheers,
Bob Schmertz

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-22  5:53         ` Bob Schmertz
@ 2004-03-22 11:58           ` Vincent Stemen
  2004-03-23  5:28             ` Bob Schmertz
  0 siblings, 1 reply; 13+ messages in thread
From: Vincent Stemen @ 2004-03-22 11:58 UTC (permalink / raw)
  To: zsh-users

On Sun, Mar 21, 2004 at 09:53:58PM -0800, Bob Schmertz wrote:
> 
> --- Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> > >> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
> > >> grateful, too.
> > > 
> > > I'm not a major-league zsh programmer, so I may well be ignorant, but
> > > what's wrong with good-old shell-script mode in (X)Emacs?
> > 
> > Nothing, if I could find the defining syntax file. Nothing like
> > "sh.el" on my Gentoo box (where I have XEmacs).
> > 
> 
> If you just want to use it as is, just type M-x shell-script-mode (tab
> completion works here, too), and it'll put you in Emacs' proper mode.  If
> you want to tweak the syntax, the appropriate elisp file is the
> non-obvious sh-script.el.  If you want to know how to make it
> automatically detect zsh-ness and it's not already doing so (works for me
> with no special effort in GNU Emacs if the file starts with #!/bin/zsh),
> email me offline and I'll tell you what to put in your .emacs.
> 
> =====
> Cheers,
> Bob Schmertz

You might also want to try ksh-mode in Xemacs which has pretty nice
syntax highlighting and it auto-indents nicely.  Although I did
customize my indention a bit in ~/.emacs.  That is what I have used
for shell programming for years.  I do not like the default indention
behavior of shell-script-mode.  It indents everything even though it
is not inside a function or control block and it does not seem to
re-indent when you hit the <tab> key.  It just indents further.

-- 
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
http://www.InetAddresses.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-22 11:58           ` Vincent Stemen
@ 2004-03-23  5:28             ` Bob Schmertz
  2004-03-23  8:09               ` Vincent Stemen
  0 siblings, 1 reply; 13+ messages in thread
From: Bob Schmertz @ 2004-03-23  5:28 UTC (permalink / raw)
  To: Vincent Stemen, zsh-users


--- Vincent Stemen <zsh@hightek.org> wrote:
> On Sun, Mar 21, 2004 at 09:53:58PM -0800, Bob Schmertz wrote:
> > 
> > --- Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> > > >> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
> > > >> grateful, too.
> > > > 
> > > > I'm not a major-league zsh programmer, so I may well be ignorant,
> but
> > > > what's wrong with good-old shell-script mode in (X)Emacs?
> > > 
> > > Nothing, if I could find the defining syntax file. Nothing like
> > > "sh.el" on my Gentoo box (where I have XEmacs).
> > > 
> > 
> > If you just want to use it as is, just type M-x shell-script-mode
> (tab
> > completion works here, too), and it'll put you in Emacs' proper mode.
>  If
> > you want to tweak the syntax, the appropriate elisp file is the
> > non-obvious sh-script.el.  If you want to know how to make it
> > automatically detect zsh-ness and it's not already doing so (works
> for me
> > with no special effort in GNU Emacs if the file starts with
> #!/bin/zsh),
> > email me offline and I'll tell you what to put in your .emacs.
> > 
> > =====
> > Cheers,
> > Bob Schmertz
> 
> You might also want to try ksh-mode in Xemacs which has pretty nice
> syntax highlighting and it auto-indents nicely.  Although I did
> customize my indention a bit in ~/.emacs.  That is what I have used
> for shell programming for years.  I do not like the default indention
> behavior of shell-script-mode.  It indents everything even though it
> is not inside a function or control block and it does not seem to
> re-indent when you hit the <tab> key.  It just indents further.
> 

This sounds like the behavior I observe when programming in (t)csh. 
Things work fine for me, however, for Bourne-style shells in GNU Emacs (I
don't have an XEmacs handy for comparison), and ISTR that there was some
improvement on this front fairly recently, so you might give GNU Emacs v.
21 a whirl before declaring it doesn't work.


=====
Cheers,
Bob Schmertz

__________________________________
Do you Yahoo!?
Yahoo! Finance Tax Center - File online. File on time.
http://taxes.yahoo.com/filing.html


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-23  5:28             ` Bob Schmertz
@ 2004-03-23  8:09               ` Vincent Stemen
  0 siblings, 0 replies; 13+ messages in thread
From: Vincent Stemen @ 2004-03-23  8:09 UTC (permalink / raw)
  To: zsh-users

On Mon, Mar 22, 2004 at 09:28:29PM -0800, Bob Schmertz wrote:
> 
> --- Vincent Stemen <zsh@hightek.org> wrote:
> > On Sun, Mar 21, 2004 at 09:53:58PM -0800, Bob Schmertz wrote:
> > > 
> > > --- Thorsten Kampe <thorsten@thorstenkampe.de> wrote:
> > > > >> If anyone else has a vim or X(Emacs) syntax highlighter I'd be
> > > > >> grateful, too.
> > > > > 
> > > > > I'm not a major-league zsh programmer, so I may well be ignorant,
> > but
> > > > > what's wrong with good-old shell-script mode in (X)Emacs?
> > > > 
> > > > Nothing, if I could find the defining syntax file. Nothing like
> > > > "sh.el" on my Gentoo box (where I have XEmacs).
> > > > 
> > > 
> > > If you just want to use it as is, just type M-x shell-script-mode
> > (tab
> > > completion works here, too), and it'll put you in Emacs' proper mode.
> >  If
> > > you want to tweak the syntax, the appropriate elisp file is the
> > > non-obvious sh-script.el.  If you want to know how to make it
> > > automatically detect zsh-ness and it's not already doing so (works
> > for me
> > > with no special effort in GNU Emacs if the file starts with
> > #!/bin/zsh),
> > > email me offline and I'll tell you what to put in your .emacs.
> > > 
> > > =====
> > > Cheers,
> > > Bob Schmertz
> > 
> > You might also want to try ksh-mode in Xemacs which has pretty nice
> > syntax highlighting and it auto-indents nicely.  Although I did
> > customize my indention a bit in ~/.emacs.  That is what I have used
> > for shell programming for years.  I do not like the default indention
> > behavior of shell-script-mode.  It indents everything even though it
> > is not inside a function or control block and it does not seem to
> > re-indent when you hit the <tab> key.  It just indents further.
> > 
> 
> This sounds like the behavior I observe when programming in (t)csh. 
> Things work fine for me, however, for Bourne-style shells in GNU Emacs (I
> don't have an XEmacs handy for comparison), and ISTR that there was some
> improvement on this front fairly recently, so you might give GNU Emacs v.
> 21 a whirl before declaring it doesn't work.
> 
> =====
> Cheers,
> Bob Schmertz

I am running xemacs-21.1.14 but that is a behavior I have noticed in
shell-script-mode for years.  I do not have regular emacs installed
right now to test, but it was always my understanding that both emacs
and Xemacs mostly use the same lisp libraries for the different modes.
I will test again the next time I upgrade Xemacs.

Vincent

-- 
Vincent Stemen
Avoid the VeriSign/Network Solutions domain registration trap!
http://www.InetAddresses.net


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-21 12:24     ` Nikolai Weibull
@ 2004-03-23 18:49       ` Thorsten Kampe
  2004-03-23 21:09         ` Nikolai Weibull
  0 siblings, 1 reply; 13+ messages in thread
From: Thorsten Kampe @ 2004-03-23 18:49 UTC (permalink / raw)
  To: zsh-users

* Nikolai Weibull (2004-03-21 13:24 +0100)
> * Thorsten Kampe <thorsten@thorstenkampe.de> [Mar 20, 2004 19:30]:
>>>  I have a pretty good one for Vim (the standard one sucks imo),
>>
>> If you would share it with me - I'd be grateful.
> 
> It's available at http://www.pcppopper.org/vim/syntax/pcp/zsh/ along
> with a bunch of other stuff for vim.

Thanks for the link!

Thorsten

PS And sorry for your mobile ;-) - did you know that many of those new 
ones have a "keyguard" with delay? Kind of a screensaver with lock...


^ permalink raw reply	[flat|nested] 13+ messages in thread

* Re: syntax overview for zsh?
  2004-03-23 18:49       ` Thorsten Kampe
@ 2004-03-23 21:09         ` Nikolai Weibull
  0 siblings, 0 replies; 13+ messages in thread
From: Nikolai Weibull @ 2004-03-23 21:09 UTC (permalink / raw)
  To: zsh-users

* Thorsten Kampe <thorsten@thorstenkampe.de> [Mar 23, 2004 21:10]:
> PS And sorry for your mobile ;-) - did you know that many of those new
> ones have a "keyguard" with delay? Kind of a screensaver with lock...

Well, what probably happened was that I dropped it in the cab or at the
night club and someone just found it (and it was still on, so they
didn't really have to do much) and used it as much as possible, since
the keylock on my mobile doesn't require re-login :-( - kinda wish it
did.
Still, thanks for caring,
	nikolai

--
::: name: Nikolai Weibull    :: aliases: pcp / lone-star / aka :::
::: born: Chicago, IL USA    :: loc atm: Gothenburg, Sweden    :::
::: page: www.pcppopper.org  :: fun atm: gf,lps,ruby,lisp,war3 :::
main(){printf(&linux["\021%six\012\0"],(linux)["have"]+"fun"-97);}


^ permalink raw reply	[flat|nested] 13+ messages in thread

end of thread, other threads:[~2004-03-23 21:10 UTC | newest]

Thread overview: 13+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2004-03-20 15:51 syntax overview for zsh? Thorsten Kampe
2004-03-20 16:04 ` Nikolai Weibull
2004-03-20 18:15   ` Thorsten Kampe
2004-03-21  5:41     ` Bob Schmertz
2004-03-21 16:02       ` Thorsten Kampe
2004-03-22  5:53         ` Bob Schmertz
2004-03-22 11:58           ` Vincent Stemen
2004-03-23  5:28             ` Bob Schmertz
2004-03-23  8:09               ` Vincent Stemen
2004-03-21 12:24     ` Nikolai Weibull
2004-03-23 18:49       ` Thorsten Kampe
2004-03-23 21:09         ` Nikolai Weibull
2004-03-22  1:14     ` Thorsten Haude

Code repositories for project(s) associated with this public inbox

	https://git.vuxu.org/mirror/zsh/

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).