Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 11 additions & 11 deletions .github/workflows/check-linux.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,15 +4,15 @@ on:
push:
branches: [main]
paths:
- "lib/sh/**"
- "lib/zsh/**"
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/check-linux.yml"
pull_request:
branches: [main]
paths:
- "lib/sh/**"
- "lib/zsh/**"
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/check-linux.yml"
workflow_dispatch:
Expand All @@ -34,7 +34,7 @@ jobs:
- name: ☑️ ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
scandir: "./lib/sh"
scandir: "./public/sh"

build:
runs-on: ubuntu-latest
Expand All @@ -50,20 +50,20 @@ jobs:
- name: "⚙️ Check: unit fixtures"
run: sh ./tests/installers.sh
- name: "⚙️ Check: install.sh -- -i skip"
run: sh -x ./lib/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install.sh -- -a annex"
run: sh -x ./lib/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install.sh -- -a loader"
run: sh -x ./lib/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install.sh -- -a zunit"
run: sh -x ./lib/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install_zpmod.sh"
run: sh -x ./lib/sh/install_zpmod.sh
run: sh -x ./public/sh/install_zpmod.sh
- name: ⚙️ Load zpmod module
run: |
module_path+=( "${XDG_DATA_HOME:-$HOME/.local/share}/zi/zmodules/zpmod/Src" )
zmodload zi/zpmod
zpmod source-study -l
shell: zsh {0}
- name: "⚙️ Check: init.zsh sync drift"
run: sh lib/sh/sync-init.sh
run: sh public/sh/sync-init.sh --local ./public/zsh/init.zsh --remote ./public/zsh/init.zsh --checksum-url ./public/checksum.txt
20 changes: 10 additions & 10 deletions .github/workflows/check-macos.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,15 +5,15 @@ on:
push:
branches: [main]
paths:
- "lib/sh/**"
- "lib/zsh/**"
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/check-macos.yml"
pull_request:
branches: [main]
paths:
- "lib/sh/**"
- "lib/zsh/**"
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/check-macos.yml"
workflow_dispatch:
Expand All @@ -35,7 +35,7 @@ jobs:
- name: ☑️ ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
scandir: "./lib/sh"
scandir: "./public/sh"

build:
runs-on: macos-latest
Expand All @@ -50,15 +50,15 @@ jobs:
- name: "⚙️ Check: unit fixtures"
run: sh ./tests/installers.sh
- name: "⚙️ Check: install.sh -- -i skip"
run: sh -x ./lib/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -i skip; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install.sh -- -a annex"
run: sh -x ./lib/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -a annex; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install.sh -- -a loader"
run: sh -x ./lib/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -a loader; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install.sh -- -a zunit"
run: sh -x ./lib/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
run: sh -x ./public/sh/install.sh -- -a zunit; command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" ~/.zi
- name: "⚙️ Check: install_zpmod.sh"
run: sh -x ./lib/sh/install_zpmod.sh
run: sh -x ./public/sh/install_zpmod.sh
- name: ⚙️ Load zpmod module
run: |
module_path+=( "${XDG_DATA_HOME:-$HOME/.local/share}/zi/zmodules/zpmod/Src" )
Expand Down
22 changes: 11 additions & 11 deletions .github/workflows/checksum.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,10 +3,10 @@ name: "🆗 Checksum"
on:
push:
paths:
- "lib/sh/install_zpmod.sh"
- "lib/sh/install.sh"
- "lib/sh/sync-init.sh"
- "lib/zsh/init.zsh"
- "public/sh/install_zpmod.sh"
- "public/sh/install.sh"
- "public/sh/sync-init.sh"
- "public/zsh/init.zsh"
- ".github/workflows/checksum.yml"
workflow_dispatch: {}

Expand All @@ -28,15 +28,15 @@ jobs:
uses: jmgilman/actions-generate-checksum@3ea6dc9bf8eecf28e2ecc982fab683484a1a8561 # v1.0.1
with:
patterns: |
lib/sh/install_zpmod.sh
lib/sh/install.sh
lib/sh/sync-init.sh
lib/zsh/init.zsh
- run: mv checksum.txt lib/
public/sh/install_zpmod.sh
public/sh/install.sh
public/sh/sync-init.sh
public/zsh/init.zsh
- run: mv checksum.txt public/
- name: "🆗 Commit"
uses: z-shell/.github/actions/commit@d36763069484d7b5bf3d958e8517dbb682942c82 # v1.0.9
uses: z-shell/.github/actions/commit@3222f53692e448ed6e2caf8b8722e74fb2ca2461 # v1.1.1
with:
commitMessage: Checksum ${{ github.sha }}
workDir: lib
workDir: public
commitUserName: ${{ secrets.ACTIONS_USER }}
commitUserEmail: ${{ secrets.ACTIONS_MAIL }}
4 changes: 2 additions & 2 deletions .github/workflows/deploy-gh-pages.yml
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ on:
branches: [main]
tags: ["v*.*.*"]
paths:
- "lib/**"
- "public/**"
- ".github/workflows/deploy-gh-pages.yml"

permissions:
Expand Down Expand Up @@ -49,7 +49,7 @@ jobs:
with:
github_token: ${{ secrets.GITHUB_TOKEN }}
publish_branch: gh-pages
publish_dir: ./lib
publish_dir: ./public
user_name: ${{ secrets.ACTIONS_USER }}
user_email: ${{ secrets.ACTIONS_MAIL }}
commit_message: ${{ steps.prepare_deploy.outputs.commit_message }}
Expand Down
9 changes: 3 additions & 6 deletions .github/workflows/rclone-action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,10 +2,7 @@
name: "🔄 Rclone"
on:
push:
branches: [main]
paths:
- "lib/**"
- ".github/workflows/rclone-action.yml"
branches: [gh-pages]
workflow_dispatch: {}

permissions:
Expand All @@ -21,13 +18,13 @@ jobs:
runs-on: ubuntu-latest
timeout-minutes: 15
env:
local_path: "lib"
local_path: "."
remote_path: "r2:r2-store/src"
steps:
- name: "⤵️ Check out code from GitHub"
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2
- name: "⏫ Run rclone/r2-store"
uses: z-shell/.github/actions/rclone@d36763069484d7b5bf3d958e8517dbb682942c82 # v1.0.9
uses: z-shell/.github/actions/rclone@3222f53692e448ed6e2caf8b8722e74fb2ca2461 # v1.1.1
with:
config: ${{ secrets.R2_STORE }}
args: "copy --check-first ${{ env.local_path }} ${{ env.remote_path }}"
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/win-install.yml
Original file line number Diff line number Diff line change
Expand Up @@ -4,14 +4,14 @@ name: ⚙️ Windows Install
on:
pull_request:
paths:
- "lib/sh/**"
- "lib/zsh/**"
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/win-install.yml"
push:
paths:
- "lib/sh/**"
- "lib/zsh/**"
- "public/sh/**"
- "public/zsh/**"
- "tests/**"
- ".github/workflows/win-install.yml"
workflow_dispatch: {}
Expand All @@ -28,7 +28,7 @@ jobs:
- name: ☑️ ShellCheck
uses: ludeeus/action-shellcheck@00cae500b08a931fb5698e11e79bfbd38e612a38 # 2.0.0
with:
scandir: "./lib/sh"
scandir: "./public/sh"
run-install:
runs-on: windows-latest
timeout-minutes: 30
Expand All @@ -50,15 +50,15 @@ jobs:
- name: 🪟 Run Install
run: |
sh ./tests/installers.sh
sh -x ./lib/sh/install.sh -- -i skip
sh -x ./public/sh/install.sh -- -i skip
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
sh -x ./lib/sh/install.sh -- -a annex
sh -x ./public/sh/install.sh -- -a annex
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
sh -x ./lib/sh/install.sh -- -a loader
sh -x ./public/sh/install.sh -- -a loader
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
sh -x ./lib/sh/install.sh -- -a zunit
sh -x ./public/sh/install.sh -- -a zunit
command rm -rf "${XDG_DATA_HOME:-$HOME/.local/share}/zi" /home/runneradmin/.zi
sh -x ./lib/sh/install.sh -- -a zpmod
sh -x ./public/sh/install.sh -- -a zpmod
shell: C:\tools\cygwin\bin\bash.exe --login -o igncr '{0}'
- name: 🪟 Smoke-test — verify zi.zsh present
run: |
Expand Down
103 changes: 60 additions & 43 deletions docs/README.md
Original file line number Diff line number Diff line change
@@ -1,63 +1,76 @@
<h1 align="center">
<p>
<a href="https://github.com/z-shell/zi">
<img src="https://raw.githubusercontent.com/z-shell/.github/main/profile/img/logo.png" alt="Logo" width="80" height="80" />❮ Zi ❯
</a>
</p>
</h1>
<h3 align="center">
<a href="https://github.com/orgs/z-shell/discussions/">《❔》Ask a Question </a>
<a href="https://wiki.zshell.devv/search/">《💡》Search Wiki </a>
<a href="https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+">《💜》Join </a>
<a href="https://translate.zshell.dev">《🌐》Localize </a>
</h3>
<p align="center">
<a target="_self" href="https://translate.zshell.dev">
<img alt="Crowdin" align="center" src="https://badges.crowdin.net/e/f108c12713ee8526ac878d5671ad6e29/localized.svg" />
</a>
<a target="_self" href="https://www.gnu.org/licenses/gpl-3.0/">
<img align="center" src="https://img.shields.io/badge/License-GPL%20v3-blue.svg" alt="Project License" />
</a>
<a target="_self" href="https://github.com/z-shell/zi-vim-syntax/">
<img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" />
</a>
<a target="_self" href="https://open.vscode.dev/z-shell/src/">
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff" alt="Visual Studio Code" />
</a></p><hr />
<!-- markdownlint-disable MD041 -->
<table style="background-color:transparent;">
<tr>
<td>
<h1 align="center">
<a target="_self" href="https://github.com/z-shell/zi">
<img style="width: 60px; height: 60px"
src="https://raw.githubusercontent.com/z-shell/zi/main/docs/images/logo.svg" alt="❮ Zi ❯ Logo" />
</a>❮ <strong>Src</strong> ❯
</h1>
<h2 align="center">
✨ Z-Shell source library — snippets, installer scripts and shared utilities
</h2>
<div align="center">
<a href="https://github.com/orgs/z-shell/discussions/"><strong>《 Ask a Question 》</strong></a>
·
<a href="https://wiki.zshell.dev/search"><strong>《💡》Search Wiki </strong></a>
·
<a
href="https://github.com/z-shell/community/issues/new?assignees=&labels=%F0%9F%91%A5+member&template=membership.yml&title=team%3A+"><strong>《💜》Join
</strong></a>
·
<a href="https://translate.zshell.dev/"><strong>《🌐》Localize </strong></a>
</div>
</tr>
</td>
<tr>
<td>
<div align="center">
<a title="Crowdin" target="_self" href="https://translate.zshell.dev/">
<img align="center" src="https://badges.crowdin.net/e/f108c12713ee8526ac878d5671ad6e29/localized.svg" alt="Crowdin Status" />
</a>
<a title="License" target="_self" href="https://www.gnu.org/licenses/gpl-3.0/">
<img align="center" src="https://img.shields.io/badge/License-GPL%20v3-blue.svg" alt="Project License" />
</a>
<a title="VIM" target="_self" href="https://github.com/z-shell/zi-vim-syntax/">
<img align="center" src="https://img.shields.io/badge/--019733?logo=vim" alt="VIM" />
</a>
<a target="_self" href="https://open.vscode.dev/z-shell/src/">
<img align="center" src="https://img.shields.io/badge/--007ACC?logo=visual%20studio%20code&logoColor=ffffff"
alt="Visual Studio Code" />
</a>
</div>
</tr>
</td>
</table>
<hr />

### Content

- Wiki Pages:
- https://wiki.zshell.dev
- Loader:
- https://init.zshell.dev
- Installer:
- https://get.zshell.dev
- R2:
- https://r2.zshell.dev
- IPFS:
- https://ipfs.zshell.dev
- jsDeliver:
- https://cdn.jsdelivr.net/gh/z-shell/src@main/
- **Wiki Pages**: [wiki.zshell.dev](https://wiki.zshell.dev)
- **Loader**: [init.zshell.dev](https://init.zshell.dev)
- **Installer**: [get.zshell.dev](https://get.zshell.dev)
- **jsDeliver CDN**: [cdn.jsdelivr.net/gh/z-shell/src@main/](https://cdn.jsdelivr.net/gh/z-shell/src@main/)

### Maintainer — Verify and Sync Loader

Check whether the local `lib/zsh/init.zsh` matches the canonical GitHub raw `main` copy:
Check whether the local `public/zsh/init.zsh` matches the canonical GitHub raw `main` copy:

```sh
sh lib/sh/sync-init.sh
sh public/sh/sync-init.sh
```

Replace the local file if it drifts:

```sh
sh lib/sh/sync-init.sh --write
sh public/sh/sync-init.sh --write
```

Run against local fixtures (no network required, useful in tests):

```sh
sh lib/sh/sync-init.sh \
sh public/sh/sync-init.sh \
--local /tmp/my-init.zsh \
--remote /tmp/remote-init.zsh \
--checksum-url /tmp/checksum.txt
Expand All @@ -66,5 +79,9 @@ sh lib/sh/sync-init.sh \
Skip checksum validation:

```sh
sh lib/sh/sync-init.sh --no-checksum
sh public/sh/sync-init.sh --no-checksum
```

---

> This repository is compatible with [Zi](https://github.com/z-shell/zi)
4 changes: 0 additions & 4 deletions lib/checksum.txt

This file was deleted.

4 changes: 0 additions & 4 deletions lib/zsh/snippets/welcome.zsh

This file was deleted.

File renamed without changes.
4 changes: 4 additions & 0 deletions public/checksum.txt
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
348b78e992d28ecebd23940d06944629ef7f8f9d93c17ef3469cd6eebd288451 public/sh/install_zpmod.sh
7408a1045f330a6e73bda55c6c7b48be7873a4e7f1fb00d7db989827cc9224a9 public/sh/install.sh
f8519bf7e3e42ad67cc9cff6d82a8367641611fc687b2f6793e26bd55dbbb553 public/sh/sync-init.sh
98f54a779985719e390b3e4559b7b0ac22101caac91d0569d41cd9229a05c6de public/zsh/init.zsh
File renamed without changes.
Loading