π fix(icons,prompt): restore icon-set parity, implement _shui_prompt, add CI - #2
Merged
Conversation
β¦ sets - nerd.zsh: add SHUI_ICON_BULLET, SHUI_ICON_CIRCLE, SHUI_ICON_CIRCLE_EMPTY, SHUI_ICON_SQUARE, SHUI_ICON_SQUARE_EMPTY, SHUI_ICON_TRIANGLE, SHUI_ICON_DIAMOND, SHUI_ICON_POINTER using plain Unicode (no PUA needed) - emoji.zsh: matching geometric set with emoji equivalents plus SHUI_ICON_NPM, SHUI_ICON_POINTER; Powerline tokens kept empty for parity - none.zsh: SHUI_ICON_NPM and Powerline tokens added to maintain full parity with nerd set - prompt.zsh: implement _shui_prompt() with mode-based icon selection (user-prompt, input-prompt, fallback) and colour-prefixed output - ci.yml: add GitHub Actions workflow running mise lint + mise test on push/PR to main - mise.toml: fix test runner to exit on first failure (`|| exit 1`)
All Nerd Font PUA assignments in src/icons/nerd.zsh now use the $'\UXXXXXXXX' escape form instead of raw glyph bytes. Raw glyphs are invisible in many editors, silently mangled by diffs, and non-portable across encodings. The escape form keeps the source pure ASCII and is now enforced by tests/test-icons.zsh. Updated the header comment to document the new format and add-entry convention.
grep -cP exits with status 1 when there are zero matches, so `|| echo 0`
would concatenate the real count with a second "0" line. Switch to `|| true`
and use parameter expansion `${_raw_count:-0}` to default an empty result
(e.g. BSD grep without -P) to 0.
Also tightens the nerd.zsh entry-format comment to show the required
`SHUI_ICON_<NAME>` prefix and indented example more clearly.
This file contains hidden or 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
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
What
Fixes pre-existing test failures that were blocking a CI workflow, then adds CI.
Bugs fixed (red on a clean
main)_shui_promptwas an unimplemented stub (_shui_prompt() { : }) β theuser-prompt/input-prompttests got no output. Implemented it as a labelled-prompt renderer keyed off the mode's bracket icon (SHUI_ICON_USER_BRACKET/SHUI_ICON_INPUT_BRACKET).nerd/emojiwere missing the geometric tokens (CIRCLE,SQUARE,TRIANGLE,DIAMOND, β¦) thatnonealready had, and the three sets defined mismatched token names (POINTERonly innoneβ though theradiocomponent uses it;NPM/Powerline only innerd). All three sets now define an identical token set.nerduses plain non-PUA geometric glyphs (they render fine in a Nerd Font),emojiuses emoji,nonestays empty.Also
mise.tomltest task now fails fast (β¦ || exit 1) β the oldfor β¦ donereturned only the last file's exit code, so a mid-suite failure could be masked as green. This matters precisely because we're now gating CI on it..github/workflows/ci.yml(the repo had none): installs zsh, sets up mise, runsmise run lint+mise run teston PRs and pushes tomain.Verification
All six test files pass individually (
exit 0each);mise run lint(zsh -nacross all sources) clean.