zsh-users
 help / color / mirror / code / Atom feed
* [OT] Emacs and zsh syntax
@ 2012-04-16 10:52 Jesper Nygårds
  2012-04-16 10:56 ` Moritz Bunkus
  2012-04-17  9:25 ` Stephane Chazelas
  0 siblings, 2 replies; 6+ messages in thread
From: Jesper Nygårds @ 2012-04-16 10:52 UTC (permalink / raw)
  To: zsh-users

I find that (GNU) emacs' shell-script-mode doesn't fully understand
zsh syntax. Among other things, emacs considers everything following a
hash sign (#) a comment, which of course breaks when using globbing
flags etc. I guess I can live with the occasional wrong coloring, but
it's more annoying when it breaks indentation.

How are other people dealing with this? Are there any modifications
one can do to the emacs configuration, or any other workaround?


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

* Re: [OT] Emacs and zsh syntax
  2012-04-16 10:52 [OT] Emacs and zsh syntax Jesper Nygårds
@ 2012-04-16 10:56 ` Moritz Bunkus
  2012-04-16 13:08   ` Vincent Lefevre
  2012-04-17  9:25 ` Stephane Chazelas
  1 sibling, 1 reply; 6+ messages in thread
From: Moritz Bunkus @ 2012-04-16 10:56 UTC (permalink / raw)
  To: zsh-users

Hey,

I'm experiencing similar issues, especially with zsh's short syntax
for conditionals (e.g. lines following "if [[ stuff ]] do_stuff" being
indented wrong). Unfortunately I don't have a solution; I just kind
of... manually indent the following line and hope the ones after that
will be indented correctly again. It's a pain, yes.

Kind regards,
mo


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

* Re: [OT] Emacs and zsh syntax
  2012-04-16 10:56 ` Moritz Bunkus
@ 2012-04-16 13:08   ` Vincent Lefevre
  2012-04-16 15:21     ` Bart Schaefer
  0 siblings, 1 reply; 6+ messages in thread
From: Vincent Lefevre @ 2012-04-16 13:08 UTC (permalink / raw)
  To: zsh-users

Hi,

On 2012-04-16 12:56:35 +0200, Moritz Bunkus wrote:
> I'm experiencing similar issues, especially with zsh's short syntax
> for conditionals (e.g. lines following "if [[ stuff ]] do_stuff" being
> indented wrong).

and "then" after ]] is not highlighted. I had reported the following
bug in 2005:

  http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335712

-- 
Vincent Lefèvre <vincent@vinc17.net> - Web: <http://www.vinc17.net/>
100% accessible validated (X)HTML - Blog: <http://www.vinc17.net/blog/>
Work: CR INRIA - computer arithmetic / AriC project (LIP, ENS-Lyon)


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

* Re: [OT] Emacs and zsh syntax
  2012-04-16 13:08   ` Vincent Lefevre
@ 2012-04-16 15:21     ` Bart Schaefer
  2012-04-17  9:01       ` Benjamin R. Haskell
  0 siblings, 1 reply; 6+ messages in thread
From: Bart Schaefer @ 2012-04-16 15:21 UTC (permalink / raw)
  To: zsh-users

On Apr 16,  3:08pm, Vincent Lefevre wrote:
}
} I had reported the following bug in 2005:

Cynical jaundiced viewpoint:  Zsh is not a GNU project, and therefore it
isn't their priority to fix anything related to it.

Does zsh really even have a font-lock mode that is distinct from sh-mode?


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

* Re: [OT] Emacs and zsh syntax
  2012-04-16 15:21     ` Bart Schaefer
@ 2012-04-17  9:01       ` Benjamin R. Haskell
  0 siblings, 0 replies; 6+ messages in thread
From: Benjamin R. Haskell @ 2012-04-17  9:01 UTC (permalink / raw)
  To: Bart Schaefer; +Cc: zsh-users

On Mon, 16 Apr 2012, Bart Schaefer wrote:

> On Apr 16,  3:08pm, Vincent Lefevre wrote:
> }
> } I had reported the following bug in 2005:
> } http://bugs.debian.org/cgi-bin/bugreport.cgi?bug=335712
>
> Cynical jaundiced viewpoint:  Zsh is not a GNU project, and therefore 
> it isn't their priority to fix anything related to it.

Optimistic viewpoint: The bug should have been reported upstream, since 
it's not a distribution-specific problem.  (From the report, sounds like 
it may have made its way upstream.)

-- 
Best,
Ben


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

* Re: [OT] Emacs and zsh syntax
  2012-04-16 10:52 [OT] Emacs and zsh syntax Jesper Nygårds
  2012-04-16 10:56 ` Moritz Bunkus
@ 2012-04-17  9:25 ` Stephane Chazelas
  1 sibling, 0 replies; 6+ messages in thread
From: Stephane Chazelas @ 2012-04-17  9:25 UTC (permalink / raw)
  To: Jesper Nygårds; +Cc: zsh-users

2012-04-16 12:52:49 +0200, Jesper Nygårds:
> I find that (GNU) emacs' shell-script-mode doesn't fully understand
> zsh syntax. Among other things, emacs considers everything following a
> hash sign (#) a comment, which of course breaks when using globbing
> flags etc.

That's a bug even for other shells.

echo foo#bar

outputs foo#bar in every shell (but zsh with extendedglob which
is one of the reasons extendedglob is not on by default).

-- 
Stephane


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

end of thread, other threads:[~2012-04-17  9:25 UTC | newest]

Thread overview: 6+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2012-04-16 10:52 [OT] Emacs and zsh syntax Jesper Nygårds
2012-04-16 10:56 ` Moritz Bunkus
2012-04-16 13:08   ` Vincent Lefevre
2012-04-16 15:21     ` Bart Schaefer
2012-04-17  9:01       ` Benjamin R. Haskell
2012-04-17  9:25 ` Stephane Chazelas

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).