forked from sorin-ionescu/prezto
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
1 changed file
with
32 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -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. | ||
|