- Install doctoc
- To update the TOC, run the following command:
doctoc --github README.md- From the root of the repo, run:
make doc-containerIf, for some reason, you want to build the zshelldocs or the PDF manually, you'll need:
- Patience, zsd is very finicky about locales. You have been warned.
- zshelldoc (zsd)
- asciidoc
make doc
- Install pandoc
- From the root of the repo run:
pandoc --standalone --to man README.md -o doc/zinit.1- Check out the documentation branch
git fetch origin documentation
git checkout documentation- Do your modifications and push your changes
- Keep an eye on the CI logs
- If all went well, head to https://zdharma-continuum.github.io/ to see your changes live.
Note
If you really need to push directly, without CI, please refer to the README in the documentation
We run our tests with zunit.
To add a new test case:
zinit for \
as"program" \
atclone"ln -sfv revolver.zsh-completion _revolver" \
atpull"%atclone" \
pick"revolver" \
@molovo/revolver \
as"completion" \
atclone"./build.zsh; ln -sfv zunit.zsh-completion _zunit" \
atpull"%atclone" \
sbin"zunit" \
@zunit-zsh/zunit- Create a new
.zunitfile in thetests/dir. Here's a template:
#!/usr/bin/env zunit
@setup {
load setup
setup
}
@teardown {
load teardown
teardown
}
@test 'zinit-annex-bin-gem-node installation' {
# This spawns the official zinit container and executes a single zinit command
# inside it
run ./scripts/docker-run.sh --wrap --debug --zunit \
zinit light as"null" for zdharma-continuum/null
# Verify the exit code of the command above
assert $state equals 0
assert "$output" contains "Downloading"
local artifact="${PLUGINS_DIR}/zdharma-continuum---null/readme.md"
# Check if we downloaded the file correctly and if it is readable
assert "$artifact" is_file
assert "$artifact" is_readable
}You should, of course, also check out the existing tests ;)
- To run your new test:
zunit --verbose tests/your_test.zunitIf you ever need to inspect the ZINIT[HOME_DIR] dir, where zinit's internal data is stored, you can do so by commenting
out the @teardown section in your test. Then you can re-run said test and head over to ${TMPDIR:-/tmp}/zunit-zinit.
Good luck!
To get the list in a quick-and-dirty fashion, you issue:
zinit --help | tail -1See zinit-autoload.zsh for implementation details.