Skip to content

fix(next): cleanup, full test suite, and org compliance#52

Merged
ss-o merged 24 commits into
mainfrom
next
May 20, 2026
Merged

fix(next): cleanup, full test suite, and org compliance#52
ss-o merged 24 commits into
mainfrom
next

Conversation

@ss-o
Copy link
Copy Markdown
Member

@ss-o ss-o commented May 20, 2026

Summary

  • Replace unsupported ```zi codeblock language tags with ```zsh in docs
  • Revert unintentional copyright change; restore PMSPEC fpath guard
  • Expand ZUnit test suite from 3 to 14 tests using fake eza stub (no real binary required)
  • Add CodeQL workflow scanning Actions language
  • Add CODEOWNERS, PR template, and structured issue templates
  • Switch test-native.yml and zsh-n.yml to org shared setup-zsh action
  • Add copilot-instructions.md with plugin conventions and public API reference
  • Add AGENTS.md with repo orientation and org cross-references

Test plan

  • All 14 ZUnit tests pass: export ZSH_EZA_REPO="$PWD" && zunit --tap tests/zsh-eza.zunit
  • No ```zi codeblocks remain in docs/: grep -rn ' ```zi ' docs/
  • Copyright reads # Copyright (c) 2022 Salvydas Lukosius
  • PMSPEC guard reads if [[ $PMSPEC != *f* ]]; then
  • CI: ZUnit workflow passes, Zsh syntax check passes, CodeQL scan completes

Copilot AI review requested due to automatic review settings May 20, 2026 07:00
Comment thread .github/workflows/test-native.yml Fixed
Comment thread .github/workflows/zsh-n.yml Fixed
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Note

Copilot was unable to run its full agentic suite in this review.

This PR cleans up the plugin’s load/unload behavior, expands the ZUnit test suite, and aligns the repo with z-shell org compliance/CI standards.

Changes:

  • Refactors plugin initialization and core logic (better error handling, AUTOCD hook via add-zsh-hook, alias save/restore, TERM=dumb behavior).
  • Adds an expanded ZUnit test suite with helper stubs (fake eza) and supporting tooling.
  • Updates repo hygiene and compliance: new CI workflows (ZUnit, Zsh -n, CodeQL), Trunk config updates, and standardized templates/docs.

Reviewed changes

Copilot reviewed 28 out of 31 changed files in this pull request and generated 9 comments.

Show a summary per file
File Description
zunit.git Adds/updates ZUnit submodule pointer for test runner sourcing.
zsh-eza.plugin.zsh Improves autoloading and failure behavior; adds zsh-eza_plugin_unload.
functions/.zsh-eza Refactors plugin logic for params, aliases, and AUTOCD hook; adjusts dumb-terminal behavior.
tests/zsh-eza.zunit Adds expanded ZUnit test suite validating params, aliases, hooks, and failure modes.
tests/setup.zsh Adds ZUnit setup/teardown for temp dirs and environment.
tests/helpers.zsh Adds fake eza stub + helpers to run isolated Zsh sessions.
docs/README.md Updates docs for new behavior/variables and corrects code block language tags.
bin/zunit Vendors ZUnit runner script into repo for local/CI use.
bin/revolver Vendors revolver dependency used by ZUnit output.
bin/color Vendors color helper used by ZUnit output.
GEMINI.md Points Gemini agent config to AGENTS.md.
CLAUDE.md Points Claude agent config to AGENTS.md.
AGENTS.md Adds repo orientation, plugin conventions, and test instructions.
.trunk/trunk.yaml Updates Trunk CLI/plugins/lint config and runtime versions.
.trunk/.gitignore Ignores additional Trunk tool/tmp directories.
.github/workflows/zsh-n.yml Adds Zsh syntax check workflow using shared org action.
.github/workflows/trunk-check.yml Switches to shared org Trunk workflow + adds schedule + permissions.
.github/workflows/test-native.yml Adds native ZUnit workflow to run the expanded test suite.
.github/workflows/sync-labels.yml Removes legacy labels sync workflow.
.github/workflows/stale.yml Removes stale bot workflow.
.github/workflows/pr-labels.yml Removes legacy PR label verification workflow.
.github/workflows/labeler.yml Removes legacy labeler workflow.
.github/workflows/codeql.yml Adds CodeQL workflow scanning GitHub Actions.
.github/labeler.yml Removes labeler configuration file.
.github/copilot-instructions.md Adds repo-specific Copilot guidance + public API reference.
.github/PULL_REQUEST_TEMPLATE.md Adds standardized PR template.
.github/ISSUE_TEMPLATE/config.yml Disables blank issues and adds support link.
.github/ISSUE_TEMPLATE/03_codebase_improvement.yml Adds structured codebase-improvement issue template.
.github/ISSUE_TEMPLATE/02_feature_request.yml Adds structured feature request template.
.github/ISSUE_TEMPLATE/01_bug_report.yml Adds structured bug report template.
.github/CODEOWNERS Adds CODEOWNERS entry for org ownership.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread zsh-eza.plugin.zsh Outdated
Comment thread zsh-eza.plugin.zsh Outdated
Comment thread functions/.zsh-eza Outdated
Comment thread functions/.zsh-eza Outdated
Comment thread docs/README.md
Comment thread AGENTS.md
Comment thread .github/copilot-instructions.md
Comment thread .github/workflows/test-native.yml Outdated
Comment thread .github/workflows/zsh-n.yml Outdated
ss-o added 2 commits May 20, 2026 08:40
- Add Antigen installation section from main (commit 717b231)
- Keep deleted labeler/stale workflows (org policy: remove these)
- Keep org-workflow trunk-check.yml (SHA-pinned, preferred over inline steps)
- Keep improved functions/.zsh-eza (modern param handling, proper hooks)
- Pin z-shell/.github/actions/setup-zsh to SHA 62b432b
- Switch ${=var} word splitting to ${(z)var} (respects quoted arguments)
- Store fpath entry in ZSH_EZA_FPATH for consistent load/unload paths
- Restore aliases via aliases[] assignment (avoids double-expansion)
- Use z-shell/{revolver,color,zunit} forks in test-native.yml
@ss-o
Copy link
Copy Markdown
Member Author

ss-o commented May 20, 2026

All review conversations have been addressed in commits 9b8cf73 and a10b547:

  • ${=var}${(z)var} (functions/.zsh-eza): switched to shell-like word splitting that respects quoted arguments.
  • Alias restore safety (zsh-eza.plugin.zsh): replaced builtin alias name=value with aliases[$alias_name]="..." to avoid double-expansion of the saved alias body.
  • fpath consistency (zsh-eza.plugin.zsh): introduced ZSH_EZA_FPATH to store the exact path appended at load time; unload uses the same variable, removing the Plugins[ZSH_EZA]/functions indirection.
  • setup-zsh@main → SHA-pinned (both workflows): pinned to 62b432bd to eliminate floating-ref supply-chain risk.
  • zdharma/ references (test-native.yml): updated to z-shell/revolver, z-shell/color, z-shell/zunit.
  • Merge conflict resolved: incorporated Antigen installation section from main; kept improved docs and workflow structure from next.

14/14 ZUnit tests pass on the updated branch.

@ss-o ss-o merged commit a8714af into main May 20, 2026
6 of 7 checks passed
@ss-o ss-o deleted the next branch May 20, 2026 09:40
@ss-o ss-o restored the next branch May 20, 2026 12:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants