diff --git a/.github/CHANNELS.md b/.github/CHANNELS.md new file mode 100644 index 00000000..4a9f3271 --- /dev/null +++ b/.github/CHANNELS.md @@ -0,0 +1,13 @@ +# `main` + +The current tip-of-tree, absolute latest cutting edge build. Usually functional, though sometimes we accidentally break things. + +# `dev` + +The latest not fully-tested build. + +# `stable` + +When we believe we have a particularly useful build, we promote it to the stable channel. +We intend to do this more or less every quarter, but this may vary. We may ship hotfixes +to the stable channel for high-priority bugs, although we intend to do this rarely. diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 93f7876e..4dbea65e 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1 +1,19 @@ -* @ss-o +* @ss-o @z-shell + +# Order is important; the last matching pattern takes the most precedence. +#*.sh @z-shell +#*.md @z-shell + +# You can also use email addresses if you prefer. They'll be used to look up users just like we do for commit author emails. +#*.sh z-shell@digitalclouds.dev + +# The `docs/*` pattern will match files like +# `docs/getting-started.md` but not further nested files like +# `docs/build-app/troubleshooting.md`. +#docs/* @z-shell + +# In this example, @z-shell owns any file in an `lib` directory anywhere in your repository. +#lib/ @z-shell + +# In this example, @z-shell owns any file in the `.github` directory in the root of your repository. +#/.github/ @z-shell diff --git a/.github/label-commenter-config.yml b/.github/label-commenter-config.yml index 12a8086b..345e0b3e 100644 --- a/.github/label-commenter-config.yml +++ b/.github/label-commenter-config.yml @@ -1,9 +1,7 @@ comment: header: Hi, there. - footer: "\ - ---\n\n\ - > This is an automated comment. Responding to the bot or mentioning it won't have any effect.\n\n\" - + footer: "\n\n > This is an automated comment. Responding to the bot or mentioning it won't have any effect.\n\n" + labels: - name: invalid ⚠️ labeled: diff --git a/.github/labels.yml b/.github/labels.yml index d191164a..ecef60eb 100644 --- a/.github/labels.yml +++ b/.github/labels.yml @@ -30,11 +30,11 @@ color: 5319e7 description: "Work that improves the continuous integration." - name: "dependencies 📦" - color: fbcA04 + color: fbca04 description: "Change in project dependencies." - name: "in-progress ⚡" - color: fbca04 + color: f510f4 description: "Issue is currently being worked on by a developer." - name: "triage 📑" color: fbca04 diff --git a/.github/templates/release-notes.yml b/.github/templates/release-notes.yml deleted file mode 100644 index 2e3c85f3..00000000 --- a/.github/templates/release-notes.yml +++ /dev/null @@ -1,23 +0,0 @@ ---- -name: 💌 Release Notes Preview - -on: - pull_request_target: - branches: [ main ] - issue_comment: - types: [ edited ] - workflow_dispatch: - -jobs: - preview: - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v2 - - run: | - git fetch --prune --unshallow --tags - - uses: snyk/release-notes-preview@v1.6.1 - with: - releaseBranch: main - env: - GITHUB_PR_USERNAME: ${{ github.actor }} - GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/labeler.yml b/.github/workflows/labeler.yml index 01c08f38..13fe1bbf 100644 --- a/.github/workflows/labeler.yml +++ b/.github/workflows/labeler.yml @@ -1,7 +1,7 @@ --- name: 🔖 Pull Request Labeler on: -- pull_request_target + pull_request_target: permissions: contents: read @@ -13,4 +13,5 @@ jobs: steps: - uses: actions/labeler@v3 with: - repo-token: "${{ secrets.GH_PAT }}" + repo-token: "${{ secrets.GITHUB_TOKEN }}" + sync-labels: true diff --git a/.github/workflows/lock.yml b/.github/workflows/lock.yml index 2fe09241..f1807a90 100644 --- a/.github/workflows/lock.yml +++ b/.github/workflows/lock.yml @@ -4,7 +4,6 @@ name: 🔒 Lock closed issues and PRs on: schedule: - cron: "30 2 * * *" - workflow_dispatch: permissions: issues: write diff --git a/.github/workflows/rebase.yml b/.github/workflows/rebase.yml index fbd86d87..70b3a95b 100644 --- a/.github/workflows/rebase.yml +++ b/.github/workflows/rebase.yml @@ -9,7 +9,7 @@ jobs: if: github.event.issue.pull_request != '' && contains(github.event.comment.body, '/rebase') runs-on: ubuntu-latest steps: - - name: ☑️ Checkout the latest code + - name: ⤵️ Check out code from GitHub uses: actions/checkout@v2 with: token: ${{ secrets.GITHUB_TOKEN }} diff --git a/.github/workflows/zsh-check.yml b/.github/workflows/zsh-check.yml index e6e3d8f0..63f140b2 100644 --- a/.github/workflows/zsh-check.yml +++ b/.github/workflows/zsh-check.yml @@ -2,7 +2,6 @@ name: ✅ Zsh Check on: - workflow_dispatch: pull_request_target: jobs: @@ -11,7 +10,8 @@ jobs: outputs: matrix: ${{ steps.set-matrix.outputs.matrix }} steps: - - uses: actions/checkout@v2 + - name: ⤵️ Check out code from GitHub + uses: actions/checkout@v2 - name: "✨ Set matrix output" id: set-matrix run: | @@ -26,7 +26,8 @@ jobs: matrix: ${{ fromJSON(needs.build-matrix.outputs.matrix) }} steps: - - uses: actions/checkout@v2 + - name: ⤵️ Check out code from GitHub + uses: actions/checkout@v2 - name: "✨ Install dependencies" run: | sudo apt install -y zsh diff --git a/docs/CONTRIBUTING.md b/docs/CONTRIBUTING.md index bedc84b9..b6f73b2a 100644 --- a/docs/CONTRIBUTING.md +++ b/docs/CONTRIBUTING.md @@ -6,26 +6,14 @@ Please note we have a [code of conduct](CODE_OF_CONDUCT.md), please follow it in ## Knowledge Base - [ZI Wiki](https://github.com/z-shell/zi/wiki) - -### Zsh Official -- [Zsh Site](http://zsh.sourceforge.net/) - - [Zsh FAQ](https://zsh.sourceforge.io/FAQ/) - - [Zsh Documentation](https://zsh.sourceforge.io/Doc/) - - [The Z Shell Manual](https://zsh.sourceforge.io/Doc/Release/index.html#Top) -### Useful -- [Bash 2 Zsh](http://www.bash2zsh.com/) -- [Zsh tips](http://www.zzapper.co.uk/zshtips.html) -- [101 Powerful & Practical ZSH GLOBS](http://www.zzapper.co.uk/101ZshGlobs.php) -- [Practical differences between Bash ans Zsh](https://apple.stackexchange.com/questions/361870/what-are-the-practical-differences-between-bash-and-zsh/361957#361957) -> -- [zshdb - a gdb-like debugger for zsh](https://zshdb.readthedocs.io/en/latest/index.html) -- [Debian Bug report logs: Bugs in package zsh](https://bugs.debian.org/cgi-bin/pkgreport.cgi?pkg=zsh) +- [Zsh Plugin Standard](https://z-shell.github.io/docs/zsh/Zsh-Plugin-Standard.html) +- [Zsh Native Scripting Handbook](https://z-shell.github.io/docs/zsh/Zsh-Native-Scripting-Handbook.html) ## Development environment setup **Notes:** - - Any files to support prefered editor should be collaborated and respected across repositories. e.g. [.editorconfig](https://gist.github.com/ss-o/1e8d9f3a710f78330a09ccc47ef6ddb2). - - [Doxygen For Shell Scripts](https://github.com/z-shell/zsdoc) - parses Zsh and Bash scripts. +> Any files to support prefered editor should be collaborated and respected across repositories. e.g. [.editorconfig](https://gist.github.com/ss-o/1e8d9f3a710f78330a09ccc47ef6ddb2). +> [Doxygen For Shell Scripts](https://github.com/z-shell/zsdoc) - parses Zsh and Bash scripts. ### Clean Pull Request guidelines diff --git a/docs/Makefile b/docs/Makefile deleted file mode 100644 index 4579a73a..00000000 --- a/docs/Makefile +++ /dev/null @@ -1,35 +0,0 @@ -all: ../zi.zsh.zwc ../lib/zsh/side.zsh.zwc ../lib/zsh/install.zsh.zwc ../lib/zsh/autoload.zsh.zwc - -%.zwc: % - ../lib/zcompile $< - -alltest: test testB testC testD testE -test: - make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS=$(OPTS) -C test test -testB: - make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="kshglob" -C test test -testC: - make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="noextendedglob" -C test test -testD: - make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="ksharrays" -C test test -testE: - make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="ignoreclosebraces" -C test test - -doc: ../zi.zsh ../lib/zsh/side.zsh ../lib/zsh/install.zsh ../lib/zsh/autoload.zsh - rm -rf zsdoc/data zsdoc/*.adoc - zsd -v --scomm --cignore '(\#*FUNCTION:*{{{*|\#[[:space:]]#}}}*)' \ - ../zi.zsh ../lib/zsh/side.zsh ../lib/zsh/install.zsh ../lib/zsh/autoload.zsh - -html: doc - cd zsdoc && \ - asciidoctor zi.zsh.adoc && \ - asciidoctor side.zsh.adoc && \ - asciidoctor install.zsh.adoc && \ - asciidoctor autoload.zsh.adoc && \ - asciidoctor additional.zsh.adoc - -clean: - rm -f ../zi.zsh.zwc ../lib/zsh/side.zsh.zwc ../lib/zsh/install.zsh.zwc ../lib/zsh/autoload.zsh.zwc - rm -rf zsdoc/data - -.PHONY: all clean doc html diff --git a/docs/README.md b/docs/README.md index e5c0856e..282f314e 100644 --- a/docs/README.md +++ b/docs/README.md @@ -1,20 +1,19 @@ -

+

Logo -❮ ZI ❯ -

-
+❮ ZI ❯ +
+ +[![Project license](https://img.shields.io/github/license/z-shell/zi.svg?style=flat-square)](../LICENSE) [![Version][ver-badge]][ver-link] [![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/z-shell/zi/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) +[![Tweet][twitter-badge]][twitter-link] + 《 Report an issue 》 · 《 Request a Feature 》 · 《 Ask a Question 》

- -[![Project license](https://img.shields.io/github/license/z-shell/zi.svg?style=flat-square)](../LICENSE) [![Version][ver-badge]][ver-link] [![Pull Requests welcome](https://img.shields.io/badge/PRs-welcome-ff69b4.svg?style=flat-square)](https://github.com/z-shell/zi/issues?q=is%3Aissue+is%3Aopen+label%3A%22help+wanted%22) -[![Tweet][twitter-badge]][twitter-link] -
@@ -38,10 +37,8 @@
---- - ## About - +

**ZI is a fast and feature-rich plugin manager for [Zsh](https://zsh.sourceforge.io/) - [Unix shell](https://en.wikipedia.org/wiki/Unix_shell).** @@ -69,6 +66,8 @@ - [ZI Wiki](https://github.com/z-shell/zi/wiki) - [Code Documentation](https://github.com/z-shell/zi/wiki/Code-Documentation) +> **Tip:** [Advanced search](https://github.com/search/advanced?q=user%3Az-shell&type=Users) +> > Curentlly we are working on how to improve and unify documentation in to one place. > If you know how we could improve it, please let us know. Any feedback, **greatly appreciated**. @@ -76,15 +75,11 @@ ### Prerequisites -> **[?]** > Work in progress. ### Installation -> **[?]** > Interactive installation currently in development mode. -> -> After installing and reloading the shell run: zi self-update #### ZI Loader @@ -113,7 +108,7 @@ fi - This will: - Clone and install ZI if missing. - - If successful or not required will load ZI. + - If install successful or not required will load ZI. - Enable ZI completions. - All can be accomplished individually or skipped. The functionality will be attached in documentation subsequently. @@ -122,8 +117,8 @@ fi - Visiting Wiki: - [Introduction](https://github.com/z-shell/zi/wiki/Introduction) - [ZI Annex meta plugins](https://github.com/z-shell/zi/wiki/z-a-meta-plugins) - - [Oh My Zsh integration](https://github.com/z-shell/zi/wiki/Example-Oh-My-Zsh-setup) - - [Gallery](https://github.com/z-shell/zi/wiki/GALLERY) + - [Oh My Zsh integration](https://github.com/z-shell/zi/wiki/Oh-My-Zsh-setup) + - [Gallery](https://github.com/z-shell/zi/wiki/Gallery) #### Interactive install (beta) @@ -198,7 +193,7 @@ _For more information and to report security issues, please refer to our [securi ## Acknowledgements The [**Z-Shell**](https://github.com/z-shell) was created to recover the `zdharma` organization project which was deleted by the owner. -We don't want to depend on an unreliable source. For this reason started maintaining all tools, everyone interested is welcome join. +We don't want to depend on an unreliable source. [**ZI**](https://github.com/z-shell/zi), formerly known as zplugin, zinit, is an open source community project released under the [MIT License](../LICENSE). ### Authors & contributors diff --git a/docs/zsdoc/Makefile b/docs/zsdoc/Makefile deleted file mode 100644 index 7f19f11a..00000000 --- a/docs/zsdoc/Makefile +++ /dev/null @@ -1,62 +0,0 @@ -# This Makefile is to convert supplied Asciidoc files into -# other formats like pdf and man. The files contain ZI's -# code documentation. -# *.adoc files are generated root directory Makefile. - -all: man pdf - -# MAN -# Converted with a2x from asciidoc package - -man: man/zi.zsh.1 man/side.zsh.1 man/install.zsh.1 man/autoload.zsh.1 - -man/zi.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man zi.zsh.adoc - -man/side.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man side.zsh.adoc - -man/install.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man install.zsh.adoc - -man/autoload.zsh.1: - @mkdir -p man - a2x --verbose -L --doctype manpage --format manpage -D man autoload.zsh.doc - -# PDF -# Uses asciidoctor not a2x (i.e. not asciidoc) - -pdf: pdf/zi.zsh.pdf pdf/side.zsh.pdf pdf/install.zsh.pdf pdf/autoload.zsh.pdf - -pdf/zi.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zi.zsh.adoc - -pdf/side.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf side.zsh.adoc - -pdf/install.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf install.zsh.adoc - -pdf/autoload.zsh.pdf: - @mkdir -p pdf - asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf autoload.zsh.adoc - -move: pdf - git clone https://github.com/z-shell/wiki.git - mv *.adoc wiki/ - mv pdf/*.pdf wiki/pdf/ - echo "Docs update: ["`date "+%m/%d/%Y %H:%M:%S"`"]" > wiki/.git/COMMIT_EDITMSG_ - git -C wiki add . - git -C wiki commit -F wiki/.git/COMMIT_EDITMSG_ - git -C wiki push -f origin main - -clean: - rm -rf man pdf data wiki - -.PHONY: man pdf clean diff --git a/lib/git/hooks/post-checkout/README.md b/lib/git/hooks/post-checkout/README.md deleted file mode 100644 index 482084f6..00000000 --- a/lib/git/hooks/post-checkout/README.md +++ /dev/null @@ -1,10 +0,0 @@ -# Branch specific `.gitignore` - -This `post-checkout` hook will copy `.gitignore.branch_name in place` of `.git/info/exclude` each time with `git checkout branch_name`. - -## Setup - -1. Create new `.gitignore` files for each branch and name it : `.gitignore.branch_name` -2. In your git repo, go to `.git/hooks/` and copy `post-checkout` file there. -3. Make sure permissions are: `chmod +x post-checkout` and `chmod 755 post-checkout` -4. Just go to the branch you want and type `git status`: **TADAAA** ! diff --git a/lib/git/hooks/post-checkout/post-checkout b/lib/git/hooks/post-checkout/post-checkout deleted file mode 100755 index 18fa29d2..00000000 --- a/lib/git/hooks/post-checkout/post-checkout +++ /dev/null @@ -1,27 +0,0 @@ -#!/usr/bin/env bash - -old_ref="$1" -new_ref="$2" -branch_switched="$3" - -if [[ $branch_switched != '1' ]]; then - exit 0 -fi - -echo "=== POST CHECKOUT ===" -current_branch="$(git rev-parse --abbrev-ref HEAD)" -hook_dir="$(dirname $0)" -root_dir="$(pwd -P)" -info_dir="$root_dir/.git/info" -exclude_target='.gitignore' - -if [[ -f "${root_dir}/${exclude_target}.${current_branch}" ]]; then - echo -e "Use .gitignore.${current_branch} to exclude files" - exclude_target=.gitignore.${current_branch} -fi - -builtin cd "$info_dir" || exit -rm exclude -echo -e "Copy .gitignore.${current_branch} where required" -cp "${root_dir}/${exclude_target}" exclude -echo -e "=== POST CHECKOUT END ===" diff --git a/lib/git/hooks/pre-commit/.pre-commit-config.yaml b/lib/git/hooks/pre-commit/.pre-commit-config.yaml deleted file mode 100644 index ef001939..00000000 --- a/lib/git/hooks/pre-commit/.pre-commit-config.yaml +++ /dev/null @@ -1,27 +0,0 @@ -repos: - - repo: https://github.com/pre-commit/pre-commit-hooks - rev: v4.0.1 - hooks: - - id: check-merge-conflict - - id: no-commit-to-branch - name: Don't commit to main branch - - id: trailing-whitespace - - id: mixed-line-ending - - id: end-of-file-fixer - - id: check-added-large-files - - id: check-toml - - id: check-yaml - args: [--allow-multiple-documents] - # - repo: https://github.com/koalaman/shellcheck-precommit - # rev: v0.8.0 - # hooks: - # - id: shellcheck - # args: ["--severity=warning"] - # - repo: https://github.com/thlorenz/doctoc - # rev: v2.1.0 - # hooks: - # - id: doctoc - - repo: https://github.com/pre-commit/mirrors-prettier - rev: v2.4.1 - hooks: - - id: prettier diff --git a/lib/git/hooks/pre-commit/README.md b/lib/git/hooks/pre-commit/README.md deleted file mode 100644 index a7c61cf5..00000000 --- a/lib/git/hooks/pre-commit/README.md +++ /dev/null @@ -1,5 +0,0 @@ -# Pre-commit - -Pre-commit config to help while working with specific files, for example generate TOC for '.md' files. - -> See [pre-commit.com](https://pre-commit.com/) for more information. diff --git a/lib/zsh/autoload.zsh b/lib/zsh/autoload.zsh index 9cf0dace..cda81d30 100755 --- a/lib/zsh/autoload.zsh +++ b/lib/zsh/autoload.zsh @@ -2635,7 +2635,7 @@ builtin print -Pr \"\$ZI[col-obj]Done (with the exit code: \$_retval).%f%b\"" local year="${$(command date "+%Y"):-2020}" command cat >! "${plugin:t}.plugin.zsh" <>! .git/config <