zsh-workers
 help / color / mirror / code / Atom feed
* Documentation and tools to understand and debug the Zsh codebase
@ 2022-11-12 22:16 Philippe Altherr
  2022-11-13  5:20 ` Daniel Shahaf
  2022-11-17 18:07 ` Oliver Kiddle
  0 siblings, 2 replies; 3+ messages in thread
From: Philippe Altherr @ 2022-11-12 22:16 UTC (permalink / raw)
  To: zsh-workers

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

Hi everyone,

About a year ago, a friend of mine finally convinced me to look into Zsh. I
quickly became a big fan. All the little extra features and behavior tweaks
add up and make it in my opinion a much better shell than Bash, which I was
using until then. Nevertheless, I still stumbled on a few bugs and
shortcomings. Since I have some free time on my hands, I figured that I
could maybe one day help address some of these. Last week, I finally took
the plunge and started looking into the codebase to understand what was
going on with ERR_EXIT (see related thread
<https://www.zsh.org/mla/workers/2022/msg01203.html>).

So far, I have mainly studied exec.c
<https://sourceforge.net/p/zsh/code/ci/master/tree/Src/exec.c> and loop.c
<https://sourceforge.net/p/zsh/code/ci/master/tree/Src/loop.c>, which seem
to constitute the bulk of the evaluation loop. I have also seen that zsh.h
<https://sourceforge.net/p/zsh/code/ci/master/tree/Src/zsh.h> contains most
of the important data structures and I he found the description of word
codes in parse.c
<https://sourceforge.net/p/zsh/code/ci/master/tree/Src/parse.c#l100>,
which was very helpful. I think that I now have a relatively good overall
understanding but I still lack many of the details. While the role of the
functions in loop.c is self-explanatory, it's less true for some of the
functions in exec.c. I would also be unable to accurately translate a Zsh
expression into a sequence of word codes.

Here are some of my most pressing questions:
- Are there other files that I should read?
- Is there a way to print the parsed word codes? Or to print them as they
get evaluated?
- What tools do you use to debug zsh? Are there flags or modules I should
be aware of?
- How do you search the mailing list? I don't see a search box on
www.zsh.org/mla/.
  - I somehow stumbled on inbox.vuxu.org/zsh-workers/, which has one. Is
that the way to go?

Philippe

[-- Attachment #2: Type: text/html, Size: 2281 bytes --]

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

end of thread, other threads:[~2022-11-17 18:13 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz / follow: Atom feed)
-- links below jump to the message on this page --
2022-11-12 22:16 Documentation and tools to understand and debug the Zsh codebase Philippe Altherr
2022-11-13  5:20 ` Daniel Shahaf
2022-11-17 18:07 ` Oliver Kiddle

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