-
Notifications
You must be signed in to change notification settings - Fork 17
fix(next): cleanup, full test suite, and org compliance #52
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Merged
Changes from all commits
Commits
Show all changes
24 commits
Select commit
Hold shift + click to select a range
f92b443
Update .zsh-eza
dc3d66a
fix(plugin): harden startup and modernize workflows
ss-o 7f6f794
fix(plugin): address copilot review feedback
ss-o 22f44c3
test(zunit): add plugin lifecycle coverage
ss-o 7314a1b
fix(docs): replace unsupported ```zi language tag with ```zsh
ss-o 8d45f66
fix(plugin): revert copyright and restore PMSPEC fpath guard
ss-o d76c7df
test(helpers): add run_zsh_eza_dumb_shell for TERM=dumb coverage
ss-o 35a220e
test(zunit): add default params and alias presence tests
ss-o 77fc7d6
test(zunit): add ls and ll alias expansion tests
ss-o 8a08179
test(zunit): add eza_user_params and eza_extra_params tests
ss-o 8f58402
test(zunit): add AUTOCD hook registration and invocation tests
ss-o d4b93aa
test(zunit): add dumb terminal and clean-unload tests
ss-o 10e660f
test(zunit): strengthen ll ordering and extra-params middle-flag asse…
ss-o 50320a9
chore(meta): secure workflows and unify agent instructions
ss-o 89d0de3
ci(codeql): add CodeQL Advanced workflow for Actions language
ss-o a10374b
chore(github): add CODEOWNERS and PR template
ss-o b1cbd53
chore(github): add issue templates (bug, feature, improvement)
ss-o 7f9a687
ci: replace inline apt zsh install with z-shell/.github/actions/setup…
ss-o 018c354
chore(github): add copilot-instructions.md with plugin conventions an…
ss-o 42d781c
chore: add AGENTS.md with repo orientation and org cross-references
ss-o 9b8cf73
chore(meta): update CI and Docker zdharma references to z-shell
ss-o a10b547
merge: incorporate main (Antigen docs) and address review feedback
ss-o 672b379
chore(agents): remove CLAUDE.md and GEMINI.md, fix broken workspace l…
ss-o 78b456e
ci: fix codeql SHA and use vendored bin instead of downloading zunit …
ss-o File filter
Filter by extension
Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
There are no files selected for viewing
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,2 @@ | ||
| # https://docs.github.com/en/repositories/managing-your-repositorys-settings-and-features/customizing-your-repository/about-code-owners#example-of-a-codeowners-file | ||
| * @ss-o |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,51 @@ | ||
| name: "Bug report 🐞" | ||
| description: File a bug report | ||
| labels: ["bug 🐞"] | ||
| title: "bug: " | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Thanks for taking the time to contribute! Any contributions you make are greatly appreciated. | ||
|
|
||
| - type: input | ||
| id: environment | ||
| attributes: | ||
| label: Environment | ||
| description: > | ||
| Your environment details with: echo "${OSTYPE}|$(uname -m)|${ZSH_VERSION}" | ||
| placeholder: "linux-gnu|x86_64|5.9" | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: description | ||
| attributes: | ||
| label: Current behavior | ||
| description: "Describe how the bug manifests" | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: reproduce | ||
| attributes: | ||
| label: Steps to reproduce | ||
| description: "Explain the steps required to duplicate the issue" | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: code-snippet | ||
| attributes: | ||
| label: Code snippet | ||
| description: "Paste your .zshrc snippet or the minimal reproducer" | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: additional | ||
| attributes: | ||
| label: Additional information | ||
| description: "Any other relevant information" | ||
| validations: | ||
| required: false |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,43 @@ | ||
| name: "Feature request 💡" | ||
| description: Suggest an idea for this project | ||
| labels: ["feature-request 💡"] | ||
| title: "feat: " | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Thanks for taking the time to contribute! Any contributions you make are greatly appreciated. | ||
|
|
||
| - type: input | ||
| id: description | ||
| attributes: | ||
| label: Feature description | ||
| description: A clear and concise description of what the feature request is | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: dropdown | ||
| id: assistance | ||
| attributes: | ||
| label: "Would you be willing to submit a PR?" | ||
| options: | ||
| - "Yes" | ||
| - "No" | ||
| validations: | ||
| required: true | ||
|
|
||
| - type: textarea | ||
| id: code-snippet | ||
| attributes: | ||
| label: Related code or example | ||
| description: "If you can illustrate the feature with an example, please provide it here" | ||
| validations: | ||
| required: false | ||
|
|
||
| - type: textarea | ||
| id: additional | ||
| attributes: | ||
| label: Additional context | ||
| description: "Any other relevant information, links, or screenshots" | ||
| validations: | ||
| required: false |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,16 @@ | ||
| name: "Codebase improvement ✨" | ||
| description: Suggest a better solution for algorithms, CI, or tooling | ||
| labels: ["enhancement ✨"] | ||
| title: "dev: " | ||
| body: | ||
| - type: markdown | ||
| attributes: | ||
| value: | | ||
| Thanks for taking the time to contribute! Any contributions you make are greatly appreciated. | ||
|
|
||
| - type: textarea | ||
| id: enhancement | ||
| attributes: | ||
| label: Your feedback for the existing codebase | ||
| validations: | ||
| required: false |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,6 @@ | ||
| --- | ||
| blank_issues_enabled: false | ||
| contact_links: | ||
| - name: Z-Shell Community Support | ||
| url: https://github.com/z-shell/zi/discussions | ||
| about: Please ask and answer questions here. |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,34 @@ | ||
| # Pull Request type | ||
|
|
||
| <!-- Please try to limit your pull request to one type --> | ||
|
|
||
| Type of change that PR introduces: | ||
|
|
||
| - [ ] CI | ||
| - [ ] Bugfix | ||
| - [ ] Feature | ||
| - [ ] Generic maintenance tasks | ||
| - [ ] Documentation content changes | ||
| - [ ] Code style update (formatting, renaming) | ||
| - [ ] Refactoring (no functional changes, no URL changes) | ||
| - [ ] Improving performance of the project (not introducing new features) | ||
| - [ ] Other (please describe): | ||
|
|
||
| ## What is the current behavior? | ||
|
|
||
| <!-- Please describe the current behavior that you are modifying or linking to a relevant issue. --> | ||
|
|
||
| Issue Number: N/A | ||
|
|
||
| ## What is the new behavior? | ||
|
|
||
| <!-- Please describe the behavior or changes that are being added by this PR. --> | ||
|
|
||
| ## Does this introduce a breaking change? | ||
|
|
||
| - [ ] Yes | ||
| - [ ] No | ||
|
|
||
| ## Other information | ||
|
|
||
| <!-- Any other information that is important to this PR, such as screenshots of how the component looks before and after the change. --> |
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,68 @@ | ||
| # Copilot instructions — z-shell/zsh-eza | ||
|
|
||
| This is a Zsh plugin that replaces GNU `ls` aliases with [`eza`](https://github.com/eza-community/eza). | ||
| It follows the [Z-Shell Plugin Standard](https://wiki.zshell.dev/community/zsh_plugin_standard) and | ||
| the org-wide patterns in [z-shell/.github/PATTERNS.md](https://github.com/z-shell/.github/blob/main/PATTERNS.md). | ||
|
|
||
| ## Plugin entry point | ||
|
|
||
| `zsh-eza.plugin.zsh` is the entry point sourced by the plugin manager. It: | ||
|
|
||
| 1. Resolves `$0` to an absolute path (ZERO-handling pattern). | ||
| 2. Registers `Plugins[ZSH_EZA]` with the plugin's directory. | ||
| 3. Guards `fpath` addition with `if [[ $PMSPEC != *f* ]]` (Zi-aware form — preferred for this repo). | ||
| 4. Autoloads `functions/.zsh-eza` with `autoload -Uz +X`. | ||
| 5. Calls `.zsh-eza` and propagates non-zero exit without killing the shell (`return`, never `exit`). | ||
| 6. Provides `zsh-eza_plugin_unload` that fully reverses all side effects. | ||
|
|
||
| ## Implementation file | ||
|
|
||
| `functions/.zsh-eza` contains the actual logic. Key rules: | ||
|
|
||
| - Use `builtin alias` when setting aliases to avoid user-defined alias shadowing. | ||
| - Expand array params with `${(@)eza_params}`, not `$eza_params`, to preserve word boundaries. | ||
| - Use `add-zsh-hook` (not direct `chpwd_functions` manipulation) to register the AUTOCD hook. | ||
| - Early-return guards: `TERM=dumb` → `return 0`; missing `eza` binary → `print -u2 …; return 1`. | ||
|
|
||
| ## Public API | ||
|
|
||
| | Variable | Type | Effect | | ||
| | ------------------ | ----------------- | -------------------------------------------------------------------- | | ||
| | `eza_user_params` | scalar or array | Replaces the built-in default `eza_params` array entirely | | ||
| | `eza_extra_params` | scalar or array | Appended to `eza_params` after defaults (or after `eza_user_params`) | | ||
| | `AUTOCD` | integer (`0`/`1`) | Set to `1` before loading to register an auto-list hook on `cd` | | ||
|
|
||
| ## Coding conventions | ||
|
|
||
| - 2-space indent, LF endings, UTF-8. | ||
| - Every `.zsh` file starts with the standard modeline: | ||
| ``` | ||
| # -*- mode: zsh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*- | ||
| # vim: ft=zsh sw=2 ts=2 et | ||
| ``` | ||
| - Use `print -u2` for error output (stderr), not `echo >&2`. | ||
| - No `exit` inside plugin files — use `return`. | ||
|
|
||
| ## Tests | ||
|
|
||
| Test runner: [ZUnit](https://github.com/z-shell/zunit) (see `tests/zsh-eza.zunit`). | ||
|
|
||
| ```bash | ||
| export ZSH_EZA_REPO="$PWD" | ||
| PATH="$PWD/bin:$PATH" zunit --tap --verbose tests/zsh-eza.zunit | ||
| ``` | ||
|
|
||
| All tests use a fake `eza` stub via `make_fake_eza` in `tests/helpers.zsh`. No real `eza` binary required. | ||
|
|
||
| ## Branching | ||
|
|
||
| - `next` — development branch; all work goes here. | ||
| - `main` — production branch; merge from `next` when ready. | ||
| - Hotfixes branch from `main`. | ||
| - Commit format: [Conventional Commits](https://www.conventionalcommits.org/). | ||
| - This repo is **Class 3 (git-consumed)** per the [org release runbook](https://github.com/z-shell/.github/blob/main/runbooks/release.md) — no release automation. | ||
|
|
||
| ## Consistency references | ||
|
|
||
| - Sibling plugin: [`z-shell/zsh-fancy-completions`](https://github.com/z-shell/zsh-fancy-completions) | ||
| - Org patterns: [`z-shell/.github/PATTERNS.md`](https://github.com/z-shell/.github/blob/main/PATTERNS.md) | ||
This file was deleted.
Oops, something went wrong.
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
| Original file line number | Diff line number | Diff line change |
|---|---|---|
| @@ -0,0 +1,47 @@ | ||
| --- | ||
| name: CodeQL Advanced | ||
|
|
||
| on: | ||
| push: | ||
| branches: ["main"] | ||
| pull_request: | ||
| branches: ["main"] | ||
| schedule: | ||
| - cron: "28 15 * * 5" | ||
|
|
||
| permissions: | ||
| contents: read | ||
|
|
||
| concurrency: | ||
| group: ${{ github.workflow }}-${{ github.ref }} | ||
| cancel-in-progress: true | ||
|
|
||
| jobs: | ||
| analyze: | ||
| name: Analyze (${{ matrix.language }}) | ||
| runs-on: ubuntu-latest | ||
| permissions: | ||
| security-events: write | ||
| packages: read | ||
| actions: read | ||
| contents: read | ||
| strategy: | ||
| fail-fast: false | ||
| matrix: | ||
| include: | ||
| - language: actions | ||
| build-mode: none | ||
| steps: | ||
| - name: Checkout repository | ||
| uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2 | ||
|
|
||
| - name: Initialize CodeQL | ||
| uses: github/codeql-action/init@f25eda876ebb741d872b63b9f2c6dfdd77f14b83 # v4.35.5 | ||
| with: | ||
| languages: ${{ matrix.language }} | ||
| build-mode: ${{ matrix.build-mode }} | ||
|
|
||
| - name: Perform CodeQL Analysis | ||
| uses: github/codeql-action/analyze@f25eda876ebb741d872b63b9f2c6dfdd77f14b83 # v4.35.5 | ||
| with: | ||
| category: "/language:${{ matrix.language }}" |
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
This file was deleted.
Oops, something went wrong.
Oops, something went wrong.
Oops, something went wrong.
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.
Uh oh!
There was an error while loading. Please reload this page.