* [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: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).