dev docs: Create HACKING.md.

Review-by: Matthew Martin
This commit is contained in:
Daniel Shahaf 2016-05-05 01:20:32 +00:00
parent e8af14fe1f
commit cef49752fd

32
HACKING.md Normal file
View File

@ -0,0 +1,32 @@
Hacking on zsh-syntax-highlighting itself
=========================================
This document includes information for people working on z-sy-h itself: on the
core driver (`zsh-syntax-highlighting.zsh`), on the highlighters in the
distribution, and on the test suite. It does not target third-party
highlighter authors (although they may find it an interesting read).
The 'main' highlighter
----------------------
The following function `pz` is useful when working on the `main` highlighting:
pq() {
(( $#argv )) || return 0
print -r -l -- ${(qqqq)argv}
}
pz() {
local arg
for arg; do
pq ${(z)arg}
done
}
It prints, for each argument, its token breakdown, similar to how the main
loop of the `main` highlighter sees it.
IRC channel
-----------
We're on #zsh-syntax-highlighting on freenode.