mirror of
https://github.com/zdharma-continuum/zinit.git
synced 2026-09-10 15:46:36 -04:00
Compare commits
No commits in common. "main" and "v1.61" have entirely different histories.
|
|
@ -1,10 +0,0 @@
|
|||
.git/
|
||||
.github/
|
||||
.git*
|
||||
doc/
|
||||
scripts/
|
||||
test/
|
||||
tests/
|
||||
|
||||
*.zwc
|
||||
Makefile
|
||||
16
.gitattributes
vendored
16
.gitattributes
vendored
|
|
@ -1,16 +0,0 @@
|
|||
# By default, everything is text
|
||||
* text=auto
|
||||
|
||||
# These must be unix EOLs
|
||||
*.sh eol=lf
|
||||
*.zsh diff=zsh eol=lf
|
||||
*.zunit diff=zsh eol=lf
|
||||
Makefile eol=lf
|
||||
|
||||
# Use the markdown differ.
|
||||
*.md diff=markdown
|
||||
|
||||
# Binary files
|
||||
*.png binary
|
||||
|
||||
# EOF
|
||||
3
.github/CODEOWNERS
vendored
3
.github/CODEOWNERS
vendored
|
|
@ -1,3 +0,0 @@
|
|||
* @alichtman @pschmitt @vladdoster
|
||||
|
||||
# Should consider adding @psprint as well
|
||||
99
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
99
.github/ISSUE_TEMPLATE/bug-report.yml
vendored
|
|
@ -1,99 +0,0 @@
|
|||
name: Bug Report
|
||||
description: File a bug report
|
||||
title: "[bug]: "
|
||||
labels: ["bug", "triage"]
|
||||
assignees:
|
||||
- vladdoster
|
||||
body:
|
||||
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
Thanks for taking the time to fill out this bug report!
|
||||
|
||||
## Self Check
|
||||
|
||||
- Look for similar errors in existing [GitHub Issues](https://github.com/zdharma-continuum/zinit/issues?q=is%3Aissue) (open or closed).
|
||||
- Try reaching out on the [Gitter server](https://matrix.to/#/#zdharma-continuum_community:gitter.im) for help.
|
||||
|
||||
- type: textarea
|
||||
id: what-happened
|
||||
attributes:
|
||||
label: What happened?
|
||||
description: Also tell us, what did you expect to happen?
|
||||
placeholder: Tell us what you see!
|
||||
value: "A bug happened!"
|
||||
validations:
|
||||
required: true
|
||||
|
||||
- type: textarea
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Steps to reproduce
|
||||
description: |
|
||||
Steps to reproduce the problem
|
||||
placeholder: |
|
||||
1. Enable plugin 'foo'
|
||||
2. Run 'foo bar' or try to complete command 'foo --widget'
|
||||
3. See error
|
||||
|
||||
- type: textarea
|
||||
id: logs
|
||||
attributes:
|
||||
label: Relevant output
|
||||
description: Please copy and paste any relevant output. This will be automatically formatted into code, so no need for backticks.
|
||||
render: shell
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Screenshots and recordings
|
||||
description: |
|
||||
If applicable, add screenshots or [asciinema](https://asciinema.org) session to explain your problem
|
||||
|
||||
- type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Operating System & Version
|
||||
description: |
|
||||
Output of
|
||||
```
|
||||
echo "OS: ${OSTYPE:-N/A} | Vendor: ${VENDOR:-N/A} | Machine: ${MACHTYPE:-N/A} | CPU: ${CPUTYPE:-N/A} | Processor: ${$(uname -p 2>/dev/null):-N/A} | Hardware: ${$(uname -m 2>/dev/null):-N/A}"
|
||||
```
|
||||
|
||||
- type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Zsh version
|
||||
description: Output of `zsh --version`
|
||||
|
||||
- type: input
|
||||
validations:
|
||||
required: true
|
||||
attributes:
|
||||
label: Terminal emulator
|
||||
description: Terminal name & output of `echo "${TERM}"`
|
||||
|
||||
- type: dropdown
|
||||
attributes:
|
||||
label: If using WSL on Windows, which version of WSL
|
||||
description: Output `wsl -l -v`
|
||||
options:
|
||||
- 'WSL 1'
|
||||
- 'WSL 2'
|
||||
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context about the problem. This can be themes, plugins, custom settings, etc.
|
||||
|
||||
- type: checkboxes
|
||||
id: terms
|
||||
attributes:
|
||||
label: Code of Conduct
|
||||
description: By submitting this issue, you agree to follow our [Code of Conduct](../../CODE_OF_CONDUCT.md)
|
||||
options:
|
||||
- label: I agree to follow this project's Code of Conduct
|
||||
required: true
|
||||
8
.github/ISSUE_TEMPLATE/config.yml
vendored
8
.github/ISSUE_TEMPLATE/config.yml
vendored
|
|
@ -1,8 +0,0 @@
|
|||
blank_issues_enabled: true
|
||||
contact_links:
|
||||
- name: Support
|
||||
url: https://github.com/zdharma-continuum/zinit/discussions
|
||||
about: Ask the community for support
|
||||
- name: Get help on Matrix
|
||||
url: https://matrix.to/#/#zdharma-continuum_community:gitter.im
|
||||
about: Have a quick question? Join the Gitter community and ask your question.
|
||||
32
.github/ISSUE_TEMPLATE/documentation.yml
vendored
32
.github/ISSUE_TEMPLATE/documentation.yml
vendored
|
|
@ -1,32 +0,0 @@
|
|||
name: Documentation
|
||||
description: Create a report to help us improve the documentation
|
||||
labels: [documentation]
|
||||
title: "[doc]: "
|
||||
body:
|
||||
- type: input
|
||||
id: link
|
||||
attributes:
|
||||
label: Documentation Link
|
||||
description: |
|
||||
Link to any documentation or examples that you are referencing.
|
||||
Suggested improvements should be based on the development version of the docs: https://zdharma-continuum.github.io/zinit/wiki/
|
||||
placeholder: https://zdharma-continuum.github.io/zinit/wiki/...
|
||||
- type: textarea
|
||||
id: problem
|
||||
attributes:
|
||||
label: Problem
|
||||
description: What is missing, unclear, or wrong in the documentation?
|
||||
placeholder: |
|
||||
* I found [...] to be unclear because [...]
|
||||
* [...] made me think that [...] when really it should be [...]
|
||||
* There is no example showing how to do [...]
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: improvement
|
||||
attributes:
|
||||
label: Suggested improvement
|
||||
placeholder: |
|
||||
* This line should be be changed to say [...]
|
||||
* Include a paragraph explaining [...]
|
||||
* Add a figure showing [...]
|
||||
38
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
38
.github/ISSUE_TEMPLATE/feature-request.yml
vendored
|
|
@ -1,38 +0,0 @@
|
|||
name: Feature request
|
||||
description: Suggest a feature for Zinit
|
||||
labels: ["feature"]
|
||||
title: "[feat]: "
|
||||
body:
|
||||
- type: markdown
|
||||
attributes:
|
||||
value: |
|
||||
## Self Check
|
||||
- Look for similar features in existing [GitHub Issues](https://github.com/zdharma-continuum/zinit/issues?q=is%3Aissue) (open or closed).
|
||||
- type: input
|
||||
attributes:
|
||||
label: If the feature request is for a plugin or theme, specify it here.
|
||||
description: The name of the plugin or theme that you would like us to improve.
|
||||
placeholder: e.g. Git plugin, Agnoster theme
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: If the feature solves a problem you have, specify it here.
|
||||
description: A description of what the problem is.
|
||||
placeholder: Ex. I'm always frustrated when...
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe the proposed feature.
|
||||
description: A description of what you want to happen. Be as specific as possible.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Describe alternatives you've considered
|
||||
description: A description of any alternative solutions or features you've considered. This can also include other plugins or themes.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Additional context
|
||||
description: Add any other context, screenshots or Gitter conversations about the feature request here. Also if you have any PRs related to this issue that are already open that you would like us to look at.
|
||||
- type: textarea
|
||||
attributes:
|
||||
label: Related Issues
|
||||
description: Is there any open or closed issues that is related to this feature request? If so please link them below!
|
||||
17
.github/ISSUE_TEMPLATE/maintenance.yml
vendored
17
.github/ISSUE_TEMPLATE/maintenance.yml
vendored
|
|
@ -1,17 +0,0 @@
|
|||
name: Maintenance
|
||||
description: Help improve performance, usability and/or consistency.
|
||||
title: "[maint]: "
|
||||
labels: [Maintenance]
|
||||
body:
|
||||
- type: textarea
|
||||
id: summary
|
||||
attributes:
|
||||
label: Summary
|
||||
description: Please provide 1-2 short sentences that succinctly describes what could be improved.
|
||||
validations:
|
||||
required: true
|
||||
- type: textarea
|
||||
id: fix
|
||||
attributes:
|
||||
label: Proposed fix
|
||||
description: Please describe how you think this could be improved.
|
||||
7
.github/dependabot.yaml
vendored
7
.github/dependabot.yaml
vendored
|
|
@ -1,7 +0,0 @@
|
|||
version: 2
|
||||
updates:
|
||||
# Maintain dependencies for GitHub Actions
|
||||
- package-ecosystem: "github-actions"
|
||||
directory: "/"
|
||||
schedule:
|
||||
interval: "daily"
|
||||
41
.github/labeler.yml
vendored
41
.github/labeler.yml
vendored
|
|
@ -1,41 +0,0 @@
|
|||
ci/cd:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '.github/**'
|
||||
|
||||
docker:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'docker/**'
|
||||
|
||||
scripts:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'docker/**'
|
||||
|
||||
tests:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: ['.zunit.yml', 'tests/**/*']
|
||||
|
||||
completion:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: '_zinit'
|
||||
|
||||
# Add 'Documentation' label to any file changes within 'docs' folder
|
||||
docs:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'doc/**'
|
||||
- any-glob-to-any-file: '**/*.md'
|
||||
|
||||
# Add 'source' label to any change to src files within the source dir EXCEPT for the docs sub-folder
|
||||
zinit:
|
||||
- changed-files:
|
||||
- any-glob-to-any-file: 'zinit*.zsh*'
|
||||
|
||||
# Add 'feature' label to any PR where the head branch name starts with `feature` or has a `feature` section in the name
|
||||
feature:
|
||||
- head-branch: ['^feat']
|
||||
|
||||
fix:
|
||||
- head-branch: ['^fix']
|
||||
|
||||
# Add 'release' label to any PR that is opened against the `main` branch
|
||||
release:
|
||||
- base-branch: 'main'
|
||||
38
.github/stale.yml
vendored
38
.github/stale.yml
vendored
|
|
@ -1,38 +0,0 @@
|
|||
# Configuration for probot-stale - https://github.com/probot/stale
|
||||
|
||||
# Number of days of inactivity before an Issue or Pull Request becomes stale
|
||||
daysUntilStale: 180
|
||||
# Number of days of inactivity before an Issue or Pull Request with the stale label is closed.
|
||||
daysUntilClose: 7
|
||||
# Only issues or pull requests with all of these labels are check if stale. Defaults to `[]` (disabled)
|
||||
onlyLabels: []
|
||||
# Set to true to ignore issues in a project (defaults to false)
|
||||
exemptProjects: false
|
||||
# Set to true to ignore issues in a milestone
|
||||
exemptMilestones: false
|
||||
# Set to true to ignore issues with an assignee
|
||||
exemptAssignees: false
|
||||
# Label to use when marking as stale
|
||||
staleLabel: stale
|
||||
# Limit the number of actions per hour, from 1-30. Default is 30
|
||||
limitPerRun: 30
|
||||
# configuration settings that are specific to just 'issues' or 'pulls':
|
||||
pulls:
|
||||
daysUntilStale: 30
|
||||
markComment: >
|
||||
This pull request has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
unmarkComment: >
|
||||
This pull request has been automatically marked as not stale anymore due to the recent activity.
|
||||
closeComment: >
|
||||
This pull request has been automatically closed because it had not recent activity during the stale period.
|
||||
issues:
|
||||
markComment: >
|
||||
This issue has been automatically marked as stale because it has not had
|
||||
recent activity. It will be closed if no further activity occurs. Thank you
|
||||
for your contributions.
|
||||
unmarkComment: >
|
||||
This issue has been automatically marked as not stale anymore due to the recent activity.
|
||||
closeComment: >
|
||||
This issue has been automatically closed because it had not recent activity during the stale period.
|
||||
24
.github/workflows/bump-homebrew-formula.yml
vendored
24
.github/workflows/bump-homebrew-formula.yml
vendored
|
|
@ -1,24 +0,0 @@
|
|||
name: Bump Homebrew Formula
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
push:
|
||||
tags:
|
||||
- '*'
|
||||
|
||||
jobs:
|
||||
bump-homebrew-formula:
|
||||
runs-on: macos-latest
|
||||
steps:
|
||||
- name: Checkout repository
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Bump Homebrew formulae
|
||||
uses: dawidd6/action-homebrew-bump-formula@v8
|
||||
with:
|
||||
formula: zinit
|
||||
# A Personal Access Token (PAT) is instead of the default
|
||||
# GITHUB_TOKEN because brew bump-formula-pr creates a fork of the
|
||||
# formula's tap repository (if needed) and then creates a pull
|
||||
# request.
|
||||
token: ${{ secrets.HOMEBREW_GITHUB_API_TOKEN }}
|
||||
99
.github/workflows/containers.yaml
vendored
99
.github/workflows/containers.yaml
vendored
|
|
@ -1,99 +0,0 @@
|
|||
name: Container images
|
||||
|
||||
on:
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
tags:
|
||||
- v[0-9]+.[0-9]+.[0-9]+
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
build-containers-with-zsh:
|
||||
runs-on: ubuntu-latest
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
zsh_version:
|
||||
- 5.8
|
||||
- 5.9
|
||||
steps:
|
||||
- name: check out repository code
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: Grab git slugs (short commit id, branch etc.)
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: set up qemu
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: setup docker buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
with:
|
||||
install: true
|
||||
use: true
|
||||
|
||||
- name: login to github container registry
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: build and push
|
||||
id: docker_build_zsh_versions
|
||||
uses: docker/build-push-action@v7
|
||||
timeout-minutes: 90 # compiling older zsh versions take a long time
|
||||
with:
|
||||
push: ${{ github.event.number == 0 }}
|
||||
file: ./docker/Dockerfile
|
||||
build-args: |
|
||||
ZINIT_ZSH_VERSION=${{ matrix.zsh_version }}-tcsetpgrp
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:zsh-${{ matrix.zsh_version }}
|
||||
ghcr.io/${{ github.repository }}:zsh-${{ matrix.zsh_version }}-${{ env.GITHUB_SHA_SHORT }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
|
||||
build-container-latest:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- name: checkout code
|
||||
uses: actions/checkout@v7
|
||||
|
||||
- name: get vcs details
|
||||
uses: rlespinasse/github-slug-action@v3.x
|
||||
|
||||
- name: setup docker qemu
|
||||
uses: docker/setup-qemu-action@v4
|
||||
|
||||
- name: setup docker buildx
|
||||
id: buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
with:
|
||||
install: true
|
||||
use: true
|
||||
|
||||
- name: github container registry authentication
|
||||
uses: docker/login-action@v4
|
||||
with:
|
||||
registry: ghcr.io
|
||||
username: ${{ github.actor }}
|
||||
password: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
||||
- name: build & push new image
|
||||
id: docker_build_latest
|
||||
uses: docker/build-push-action@v7
|
||||
if: github.ref == 'refs/heads/main'
|
||||
with:
|
||||
push: true
|
||||
file: ./docker/Dockerfile
|
||||
tags: |
|
||||
ghcr.io/${{ github.repository }}:latest
|
||||
ghcr.io/${{ github.repository }}:${{ env.GITHUB_SHA_SHORT }}
|
||||
ghcr.io/${{ github.repository }}:${{ env.GITHUB_REF_SLUG }}
|
||||
platforms: linux/amd64,linux/arm64/v8
|
||||
cache-from: type=gha
|
||||
cache-to: type=gha,mode=max
|
||||
41
.github/workflows/documentation.yaml
vendored
41
.github/workflows/documentation.yaml
vendored
|
|
@ -1,41 +0,0 @@
|
|||
name: Documentation
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'zinit*.zsh'
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- 'zinit*.zsh'
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
zshelldoc:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
|
||||
- name: checkout repository
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
repository: ${{ github.event.pull_request.head.repo.full_name || github.repository }}
|
||||
ref: ${{ github.event.pull_request.head.ref || github.ref }}
|
||||
|
||||
- name: re-generate documentation
|
||||
run: |
|
||||
make doc/container
|
||||
sudo chown -R "$(id -u):$(id -g)" .
|
||||
|
||||
- name: commit and push updated docs
|
||||
if: github.event_name != 'pull_request'
|
||||
uses: EndBug/add-and-commit@v11
|
||||
with:
|
||||
add: 'doc'
|
||||
author_name: GitHub Actions
|
||||
author_email: actions@github.com
|
||||
commit: --signoff
|
||||
message: 'docs: generate'
|
||||
push: true
|
||||
67
.github/workflows/installer.yaml.disabled
vendored
67
.github/workflows/installer.yaml.disabled
vendored
|
|
@ -1,67 +0,0 @@
|
|||
# name: Installer
|
||||
|
||||
# concurrency:
|
||||
# cancel-in-progress: true
|
||||
# group: ${{ github.workflow }}-${{ github.ref }}
|
||||
|
||||
# defaults:
|
||||
# run:
|
||||
# shell: bash
|
||||
|
||||
# env:
|
||||
# NO_INPUT: true
|
||||
# TERM: xterm
|
||||
# ZINIT_BRANCH: ${{ github.ref_name }}
|
||||
# ZINIT_COMMIT: ${{ github.sha }}
|
||||
# ZINIT_REPO: ${{ github.repository }}
|
||||
|
||||
# on:
|
||||
# pull_request:
|
||||
# branches:
|
||||
# - main
|
||||
# paths:
|
||||
# - .github/workflows/installer.yaml
|
||||
# - scripts/**
|
||||
# - share/**
|
||||
# - zinit*.zsh
|
||||
# push:
|
||||
# branches:
|
||||
# - main
|
||||
# workflow_dispatch:
|
||||
|
||||
# jobs:
|
||||
|
||||
# zinit-installer:
|
||||
|
||||
# runs-on: ${{ matrix.os }}
|
||||
# strategy:
|
||||
# fail-fast: true
|
||||
# matrix:
|
||||
# annexes: ["with annexes", "no annexes"]
|
||||
# os: [macos-latest, ubuntu-latest, windows-latest]
|
||||
|
||||
# steps:
|
||||
|
||||
# - name: check out repository
|
||||
# uses: actions/checkout@v3
|
||||
|
||||
# - name: windows dependencies
|
||||
# if: runner.os == 'Windows'
|
||||
# uses: egor-tensin/setup-cygwin@v3
|
||||
# with:
|
||||
# platform: x64
|
||||
# packages: curl git zsh
|
||||
|
||||
# - name: remove \r
|
||||
# if: runner.os == 'Windows'
|
||||
# run: sed -i 's/\r$//' scripts/*.sh
|
||||
|
||||
# - name: linux/macos dependencies
|
||||
# if: runner.os != 'Windows'
|
||||
# run: brew install --force curl subversion unzip xz zsh
|
||||
|
||||
# - name: install
|
||||
# run: ./scripts/install.sh
|
||||
|
||||
# - name: verify install
|
||||
# run: zsh -silc 'zinit --help'
|
||||
19
.github/workflows/labeler.yaml
vendored
19
.github/workflows/labeler.yaml
vendored
|
|
@ -1,19 +0,0 @@
|
|||
name: label
|
||||
on:
|
||||
pull_request_target: # https://securitylab.github.com/research/github-actions-preventing-pwn-requests
|
||||
|
||||
jobs:
|
||||
label-pull-requests:
|
||||
name: "pull requests"
|
||||
|
||||
permissions:
|
||||
contents: read
|
||||
pull-requests: write
|
||||
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
steps:
|
||||
- uses: actions/labeler@v7
|
||||
with:
|
||||
repo-token: "${{ secrets.GITHUB_TOKEN }}"
|
||||
sync-labels: true
|
||||
82
.github/workflows/linting.yaml
vendored
82
.github/workflows/linting.yaml
vendored
|
|
@ -1,82 +0,0 @@
|
|||
name: lint
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
commit:
|
||||
name: "commit convention"
|
||||
uses: zdharma-continuum/.github/.github/workflows/commit-job.yml@main
|
||||
|
||||
mdlint:
|
||||
name: markdown
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
|
||||
- uses: xt0rted/markdownlint-problem-matcher@v3
|
||||
|
||||
- run: npm install -g markdownlint-cli@0.44.0
|
||||
# disabled checks:
|
||||
# MD013/line-length
|
||||
# MD024/no-duplicate-heading
|
||||
# MD033/no-inline-html
|
||||
# MD034/no-bare-urls
|
||||
# MD036/no-emphasis-as-heading
|
||||
# MD041/first-line-heading/first-line-h1
|
||||
# MD059/descriptive-link-text
|
||||
# MD060/table-column-style
|
||||
- run: |
|
||||
markdownlint --version
|
||||
|
||||
# List files to lint
|
||||
ls *.md **/*.md
|
||||
|
||||
markdownlint \
|
||||
--disable MD013 MD024 MD029 MD033 MD034 MD036 MD041 MD059 MD060 \
|
||||
--ignore '**/CHANGELOG.md' \
|
||||
-- *.md **/*.md
|
||||
|
||||
zshlint:
|
||||
name: zsh
|
||||
runs-on: ubuntu-latest
|
||||
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
task: [noexec, zcompile]
|
||||
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- uses: actions/setup-python@v7
|
||||
|
||||
- name: install dependencies
|
||||
run: |
|
||||
sudo apt-get update
|
||||
sudo apt-get install --yes zsh
|
||||
|
||||
- name: "run lint (${{ matrix.task }})"
|
||||
run: |
|
||||
case "${{ matrix.task }}" in
|
||||
noexec)
|
||||
find . -name '*.zsh' -type f -print0 \
|
||||
| xargs -0 -n1 -P4 zsh -n
|
||||
;;
|
||||
zcompile)
|
||||
find . -name '*.zsh' -type f \
|
||||
-exec zsh -fc "zcompile {}" \;
|
||||
;;
|
||||
*)
|
||||
echo "ERROR: unknown task ${{ matrix.task }}" >&2
|
||||
exit 1
|
||||
;;
|
||||
esac
|
||||
32
.github/workflows/release.yml
vendored
32
.github/workflows/release.yml
vendored
|
|
@ -1,32 +0,0 @@
|
|||
name: Release
|
||||
|
||||
on:
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
release:
|
||||
name: release
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v7
|
||||
- uses: actions/setup-node@v7
|
||||
with:
|
||||
node-version: '20'
|
||||
|
||||
- name: Fetch dependencies
|
||||
run: |
|
||||
npm install --no-package-lock \
|
||||
@semantic-release/changelog @semantic-release-plus/docker @semantic-release/exec @semantic-release/git \
|
||||
conventional-changelog-eslint @google/semantic-release-replace-plugin
|
||||
|
||||
- name: Set up Docker Buildx
|
||||
uses: docker/setup-buildx-action@v4
|
||||
|
||||
- name: Generate release
|
||||
run: npx semantic-release --ci --
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
GIT_AUTHOR_EMAIL: 'mvdoster@gmail.com'
|
||||
GIT_AUTHOR_NAME: 'Vladislav Doster'
|
||||
GIT_COMMITTER_EMAIL: 'mvdoster@gmail.com'
|
||||
GIT_COMMITTER_NAME: 'Vladislav Doster'
|
||||
105
.github/workflows/tests.yaml
vendored
105
.github/workflows/tests.yaml
vendored
|
|
@ -1,105 +0,0 @@
|
|||
name: tests
|
||||
|
||||
concurrency:
|
||||
group: ${{ github.workflow }}-${{ github.ref }}
|
||||
cancel-in-progress: true
|
||||
|
||||
env:
|
||||
HOMEBREW_NO_INSTALLED_DEPENDENTS_CHECK: 0
|
||||
HOMEBREW_NO_REQUIRE_TAP_TRUST: 1
|
||||
TERM: xterm-256color
|
||||
# TERM: dumb
|
||||
|
||||
on:
|
||||
pull_request:
|
||||
branches:
|
||||
- main
|
||||
paths:
|
||||
- "tests/**"
|
||||
- "share/**"
|
||||
- "zinit*.zsh"
|
||||
- ".github/workflows/tests.yaml"
|
||||
push:
|
||||
branches:
|
||||
- main
|
||||
workflow_dispatch:
|
||||
|
||||
jobs:
|
||||
zunit-tests:
|
||||
name: "${{ matrix.zunit_test }} | ${{ matrix.os }}"
|
||||
runs-on: "${{ matrix.os }}-latest"
|
||||
strategy:
|
||||
fail-fast: false
|
||||
matrix:
|
||||
zunit_test:
|
||||
- annexes
|
||||
- commands
|
||||
- compile
|
||||
- config-zstyle
|
||||
- gh-r
|
||||
- hook-handler
|
||||
- ice-validation
|
||||
- ices
|
||||
- plugins
|
||||
- snippets
|
||||
os: [macos, ubuntu]
|
||||
include:
|
||||
- zunit_test: gh-r
|
||||
zunit_flag: --slice
|
||||
- zunit_test: plugins
|
||||
zunit_flag: --slice
|
||||
|
||||
steps:
|
||||
- name: "checkout ${{ github.repository }}"
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: "install homebrew"
|
||||
id: setup-homebrew
|
||||
uses: Homebrew/actions/setup-homebrew@f8d4222eb633e65c2a0157383cf80861fc7fae7f
|
||||
|
||||
- name: "install ${{ runner.os }} dependencies"
|
||||
if: runner.os == 'Linux'
|
||||
run: |
|
||||
sudo apt-get update --yes
|
||||
sudo apt-get install --no-install-recommends --yes \
|
||||
autoconf automake autotools-dev \
|
||||
build-essential byacc \
|
||||
file \
|
||||
gcc gettext glibc-source grep \
|
||||
libc6 libc6-dev libevent-dev libncurses5-dev libncursesw5-dev libtool libuvc0 lua5.1 \
|
||||
m4 \
|
||||
ninja-build \
|
||||
pkg-config \
|
||||
xz-utils \
|
||||
zsh \
|
||||
zstd
|
||||
|
||||
- name: "install dependencies via brew"
|
||||
id: install-deps
|
||||
run: |
|
||||
brew install --quiet --force --overwrite autoconf automake binutils byacc coreutils curl gettext gnu-sed jemalloc libevent libtool libuv lua lua@5.4 make ninja parallel pkg-config texinfo unzip xz zsh zstd
|
||||
brew unlink ncurses && brew link --force ncurses
|
||||
|
||||
- name: "checkout zdharma-continuum/zunit"
|
||||
uses: actions/checkout@v7
|
||||
with:
|
||||
repository: "zdharma-continuum/zunit"
|
||||
path: zunit
|
||||
ref: "feat/run-tests-in-parallel-support"
|
||||
|
||||
- name: "install zunit"
|
||||
id: install-zunit
|
||||
shell: zsh {0}
|
||||
working-directory: zunit
|
||||
run: |
|
||||
mkdir -p "${HOME}/.local/bin"
|
||||
echo "$HOME/.local/bin" >> $GITHUB_PATH
|
||||
./configure --prefix=${HOME}/.local
|
||||
make all install
|
||||
|
||||
- name: "run ${{ matrix.zunit_test }} tests"
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
run: zunit run ${{ matrix.zunit_flag }} tests/${{ matrix.zunit_test }}.zunit
|
||||
24
.gitignore
vendored
24
.gitignore
vendored
|
|
@ -1,24 +0,0 @@
|
|||
*.[aos]
|
||||
*.bundle
|
||||
*.dll
|
||||
*.orig
|
||||
*.txt
|
||||
*.zini
|
||||
*.zwc
|
||||
*deploy*key*
|
||||
*~
|
||||
.*.sw?
|
||||
.project
|
||||
TAGS
|
||||
TODO*
|
||||
\#*
|
||||
doc/zsdoc/data
|
||||
other
|
||||
site*/
|
||||
tags
|
||||
test/
|
||||
txt/
|
||||
zmodules/
|
||||
tests/_output/
|
||||
tests/_support/tmp*
|
||||
.idea
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
{
|
||||
"repositoryUrl": "https://github.com/zdharma-continuum/zinit.git",
|
||||
"branches": [
|
||||
"main"
|
||||
],
|
||||
"plugins": [
|
||||
[ "@semantic-release/commit-analyzer", { } ],
|
||||
[
|
||||
"@google/semantic-release-replace-plugin",
|
||||
{
|
||||
"replacements": [
|
||||
{
|
||||
"files": [
|
||||
"VERSION"
|
||||
],
|
||||
"from": "^([0-9]).+([0-9]).+([0-9])$",
|
||||
"to": "${nextRelease.version}",
|
||||
"results": [
|
||||
{
|
||||
"file": "VERSION",
|
||||
"hasChanged": true
|
||||
}
|
||||
]
|
||||
}
|
||||
]
|
||||
}
|
||||
],
|
||||
[ "@semantic-release/release-notes-generator", { } ],
|
||||
[
|
||||
"@semantic-release/changelog",
|
||||
{
|
||||
"changelogFile": "CHANGELOG.md"
|
||||
}
|
||||
],
|
||||
[
|
||||
"@semantic-release/git",
|
||||
{
|
||||
"assets": [
|
||||
"CHANGELOG.md",
|
||||
"VERSION"
|
||||
],
|
||||
"message": "release: v${lastRelease.version} → v${nextRelease.version}\n\n${nextRelease.notes}"
|
||||
}
|
||||
],
|
||||
"@semantic-release/github"
|
||||
]
|
||||
}
|
||||
14
.zunit.yml
14
.zunit.yml
|
|
@ -1,14 +0,0 @@
|
|||
allow_risky: false
|
||||
directories:
|
||||
output: tests/_output
|
||||
support: tests/_support
|
||||
tests: tests
|
||||
fail_fast: false
|
||||
# Both parallel keys stay false, and the flags stay on the command line.
|
||||
# zunit's config booleans are one-way -- there is no --no-parallel or
|
||||
# --no-verbose -- so a `true' here could never be turned off again, not even
|
||||
# for `zunit run tests/commands.zunit@"help"'. parallel_slice additionally
|
||||
# implies parallel, and only does anything for a run that queues one file.
|
||||
parallel: false
|
||||
parallel_slice: false
|
||||
verbose: false
|
||||
278
CHANGELOG.md
278
CHANGELOG.md
|
|
@ -1,278 +0,0 @@
|
|||
# [3.17.0](https://github.com/zdharma-continuum/zinit/compare/v3.16.0...v3.17.0) (2026-09-02)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **ziextract:** support zst archive format ([b8855c7](https://github.com/zdharma-continuum/zinit/commit/b8855c7887e26f79934b6122232b141cdd3106bf))
|
||||
|
||||
# [3.16.0](https://github.com/zdharma-continuum/zinit/compare/v3.15.3...v3.16.0) (2026-08-31)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **self-update:** honor -q in changelog display ([a85e9dc](https://github.com/zdharma-continuum/zinit/commit/a85e9dcc3ee2beebf3947ef6091ccd540d94f6f3))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* **self-update:** support -n/--no-pager ([cc3baf3](https://github.com/zdharma-continuum/zinit/commit/cc3baf395fa51de11e7d76b11104e36d8d142601)), closes [#632](https://github.com/zdharma-continuum/zinit/issues/632)
|
||||
|
||||
## [3.15.3](https://github.com/zdharma-continuum/zinit/compare/v3.15.2...v3.15.3) (2026-08-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **install:** retry and auth github api downloads ([eaa1056](https://github.com/zdharma-continuum/zinit/commit/eaa10566992e8371a27fbb1300e6fdc2e4161f17)), closes [#r](https://github.com/zdharma-continuum/zinit/issues/r)
|
||||
|
||||
## [3.15.2](https://github.com/zdharma-continuum/zinit/compare/v3.15.1...v3.15.2) (2026-08-28)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **install:** treat non-archive single file gracefully in ziextract. ([981cb15](https://github.com/zdharma-continuum/zinit/commit/981cb1582ece95dfad9d6c53d34a601f6b25391f)), closes [#771](https://github.com/zdharma-continuum/zinit/issues/771) [#r](https://github.com/zdharma-continuum/zinit/issues/r) [Pre-#771](https://github.com/Pre-/issues/771)
|
||||
|
||||
## [3.15.1](https://github.com/zdharma-continuum/zinit/compare/v3.15.0...v3.15.1) (2026-08-27)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ices:** expand the atinit'!' ice correctly ([ed80701](https://github.com/zdharma-continuum/zinit/commit/ed807014262aca939d24d9e0e9356aa64ad5ae73))
|
||||
* **ices:** restore $OLDPWD around plugin directory hooks ([712cac1](https://github.com/zdharma-continuum/zinit/commit/712cac1952fb4d35861082748068ae33c757f125))
|
||||
* **ices:** restore cwd even when the ice body cds ([264526a](https://github.com/zdharma-continuum/zinit/commit/264526ab26715e54fdc7fa36d5b23b881459e19f))
|
||||
* **install:** restore cwd after the configure hook ([d875651](https://github.com/zdharma-continuum/zinit/commit/d875651d5986f42b6ba8b37ca07f66d45d083749))
|
||||
* **install:** restore cwd on early atclone return ([736403c](https://github.com/zdharma-continuum/zinit/commit/736403cb39e66ec7da7c4c373fdb99961bde5a83))
|
||||
|
||||
# [3.15.0](https://github.com/zdharma-continuum/zinit/compare/v3.14.0...v3.15.0) (2026-07-01)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* .zi-check-for-git-changes runs git fetch before checking for changes ([1107460](https://github.com/zdharma-continuum/zinit/commit/1107460bcd533c1a9003d1cf3db2918425f11c4a))
|
||||
* add markdownlint exceptions to linting ([507b4e5](https://github.com/zdharma-continuum/zinit/commit/507b4e5722ecfde21c42cc4e6502b0049e3ef192))
|
||||
* avoid apostrophe that breaks typeset -f round-trip of :zinit-tmp-subst-autoload ([#783](https://github.com/zdharma-continuum/zinit/issues/783)) ([d2d4237](https://github.com/zdharma-continuum/zinit/commit/d2d4237715081ea138eb1a9d4a7d1634eec7a36e))
|
||||
* correct SSH URL format for private repos ([#721](https://github.com/zdharma-continuum/zinit/issues/721)) ([991e4a8](https://github.com/zdharma-continuum/zinit/commit/991e4a816efc426bb1c2c0b13a01acff298b8005))
|
||||
* corrected print-out message in self-update routine ([bb37f3b](https://github.com/zdharma-continuum/zinit/commit/bb37f3bbd829485b006ef95ca24edbb462347731))
|
||||
* impl gh-r version detection using GitHub API ([#731](https://github.com/zdharma-continuum/zinit/issues/731)) ([f1e503d](https://github.com/zdharma-continuum/zinit/commit/f1e503dc3b6ac689331180e577b4e7da79e17b02)), closes [#r](https://github.com/zdharma-continuum/zinit/issues/r)
|
||||
* prevent "permission denied" errors from empty hook handlers ([#729](https://github.com/zdharma-continuum/zinit/issues/729)) ([2167408](https://github.com/zdharma-continuum/zinit/commit/2167408db27720031983d1067c156837cf522ff3))
|
||||
* prevent double extraction when exclamation mark modifier is used in extract'!' ([4fd38b3](https://github.com/zdharma-continuum/zinit/commit/4fd38b34e76fb97fb20d2345256e80526a4921c8)), closes [#r](https://github.com/zdharma-continuum/zinit/issues/r) [#r](https://github.com/zdharma-continuum/zinit/issues/r)
|
||||
* remove `local -A OPTS` that shadows caller's parallel flag ([#774](https://github.com/zdharma-continuum/zinit/issues/774)) ([e88ed77](https://github.com/zdharma-continuum/zinit/commit/e88ed77319c9a2e0187b964f9ad99f17a33d5999))
|
||||
* resolve a bug where the `-q` option for quiet mode was never dispatched ([6cf2f29](https://github.com/zdharma-continuum/zinit/commit/6cf2f2990d45d72f58d88433c9831b2ea64e8d76))
|
||||
* resolve a second issue where `git -C <path>` had to be used instead of `git --work-tree <path>` ([2e83176](https://github.com/zdharma-continuum/zinit/commit/2e83176b23d7be5db48c8bfcdea67197692d2569))
|
||||
* resolves a bug with github action trying to push updated docs back to external forks ([#763](https://github.com/zdharma-continuum/zinit/issues/763)) ([34a1811](https://github.com/zdharma-continuum/zinit/commit/34a18112e8866a7a7570b0ee1da44298677cc8d2))
|
||||
* silenced `zinit self-update` when in quiet mode (`-q`) ([8d154b0](https://github.com/zdharma-continuum/zinit/commit/8d154b0609e1dbb0387fb15cd93507c794ee9ec2))
|
||||
* trust archive permissions instead of `file(1)` heuristics in `ziextract` ([#771](https://github.com/zdharma-continuum/zinit/issues/771)) ([1334994](https://github.com/zdharma-continuum/zinit/commit/1334994f20d58e7279d308401dea2b680c0cade1))
|
||||
* update `git-chglog` to `git-cliff` in gh-r tests ([18fc2cc](https://github.com/zdharma-continuum/zinit/commit/18fc2cc5b903450d17f340898e4abbbb48ad975c)), closes [#r](https://github.com/zdharma-continuum/zinit/issues/r)
|
||||
* Update various tools in gh-r tests ([#759](https://github.com/zdharma-continuum/zinit/issues/759)) ([01eb65f](https://github.com/zdharma-continuum/zinit/commit/01eb65f8cea521779dd0eb23ac1d92239e36d8d6)), closes [#r](https://github.com/zdharma-continuum/zinit/issues/r)
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* validate ice arguments ([#778](https://github.com/zdharma-continuum/zinit/issues/778)) ([424b241](https://github.com/zdharma-continuum/zinit/commit/424b241bc7112bde7bfb906f8726b43bed0ecd1f))
|
||||
* **zsh:** allow configuring settings like HOME_DIR/BIN_DIR via zstyle ([8f89f88](https://github.com/zdharma-continuum/zinit/commit/8f89f88cfdda42afbf5e1f7a3f2d510caff7354d))
|
||||
|
||||
## [3.13.1](https://github.com/zdharma-continuum/zinit/compare/v3.13.0...v3.13.1) (2024-01-22)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* `plugins` command correctly handles keyword argument ([#626](https://github.com/zdharma-continuum/zinit/issues/626)) ([f26d387](https://github.com/zdharma-continuum/zinit/commit/f26d387e51c9103f2ba7142a8c1a25ba1d62e065))
|
||||
|
||||
# [3.13.0](https://github.com/zdharma-continuum/zinit/compare/v3.12.1...v3.13.0) (2024-01-18)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* **ci:** remove duplicate gh-r zunit job ([#623](https://github.com/zdharma-continuum/zinit/issues/623)) ([70cefc0](https://github.com/zdharma-continuum/zinit/commit/70cefc086a8b2277476e7f4fa3e00e0f7d4fd4cf))
|
||||
* debug logging logic and format ([#592](https://github.com/zdharma-continuum/zinit/issues/592)) ([3c7e5be](https://github.com/zdharma-continuum/zinit/commit/3c7e5be07d79b8f1a7fbd5dfd150a09a6309e461))
|
||||
* handle zinit --help ([#597](https://github.com/zdharma-continuum/zinit/issues/597)) ([8cf9104](https://github.com/zdharma-continuum/zinit/commit/8cf9104ac08da3f7f108a32e0a3b117e22681d46))
|
||||
* link ice check in .zinit-download-snippet function ([#608](https://github.com/zdharma-continuum/zinit/issues/608)) ([358ef03](https://github.com/zdharma-continuum/zinit/commit/358ef03785a18e694e94fd4560e0582c4024bcc3))
|
||||
* pin dua gh-r test to v2.20.3 ([#605](https://github.com/zdharma-continuum/zinit/issues/605)) ([0ba778a](https://github.com/zdharma-continuum/zinit/commit/0ba778ac734e33c960fe08bbd56a351b1b86dcd4))
|
||||
* silence unzip command in ziextract ([#614](https://github.com/zdharma-continuum/zinit/issues/614)) ([71764bf](https://github.com/zdharma-continuum/zinit/commit/71764bf2caa553f52435ed374bb48b74b0a8ad96))
|
||||
* tar permissions when `ziextract` ran as root user ([#557](https://github.com/zdharma-continuum/zinit/issues/557)) ([e2d477c](https://github.com/zdharma-continuum/zinit/commit/e2d477cde4e87d13ebc6b99e7f95022f75ca075e))
|
||||
* update labeler config to v5 ([#604](https://github.com/zdharma-continuum/zinit/issues/604)) ([794723c](https://github.com/zdharma-continuum/zinit/commit/794723cc4829e0f9293fc441100913ac7f02566a))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* configure, make, cmake, and build ices ([#613](https://github.com/zdharma-continuum/zinit/issues/613)) ([#616](https://github.com/zdharma-continuum/zinit/issues/616)) ([22e66db](https://github.com/zdharma-continuum/zinit/commit/22e66db478716005d6fec52cd412fad3fc94a9a2))
|
||||
* **delete:** fix unsetting plugin state & add `--debug` / `--quiet` flags ([#622](https://github.com/zdharma-continuum/zinit/issues/622)) ([3f4b685](https://github.com/zdharma-continuum/zinit/commit/3f4b68562265e6b06f55124e34fab0fe58c53adf))
|
||||
* remove zpextract and use ziextract ([#611](https://github.com/zdharma-continuum/zinit/issues/611)) ([2ccac85](https://github.com/zdharma-continuum/zinit/commit/2ccac85e376965a6e6d9fe1dc3f1470b706e9fac))
|
||||
|
||||
## [3.12.1](https://github.com/zdharma-continuum/zinit/compare/v3.12.0...v3.12.1) (2023-11-20)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* container zshelldoc install ([#591](https://github.com/zdharma-continuum/zinit/issues/591)) ([8170753](https://github.com/zdharma-continuum/zinit/commit/8170753a5d21f2e54ba30901cdb0afb6399a7b51))
|
||||
* from'gh-r' skips compile by default ([#590](https://github.com/zdharma-continuum/zinit/issues/590)) ([1f52eee](https://github.com/zdharma-continuum/zinit/commit/1f52eee1b1ef4a76b779d2017f2e7d2151516544))
|
||||
* respect delete flags after positional arguments ([#587](https://github.com/zdharma-continuum/zinit/issues/587)) ([e18f9a7](https://github.com/zdharma-continuum/zinit/commit/e18f9a7da273fa44079b16a90e89df76664fcbee))
|
||||
* set home dir to test env in gh-r tests ([#582](https://github.com/zdharma-continuum/zinit/issues/582)) ([9b33288](https://github.com/zdharma-continuum/zinit/commit/9b33288b4aa88a1d41786eacfe31eb966b6c0455))
|
||||
* use $MACHTYPE instead of arch command ([#588](https://github.com/zdharma-continuum/zinit/issues/588)) ([bcf70e8](https://github.com/zdharma-continuum/zinit/commit/bcf70e8268dd09737d262919dcba0ff3301a705d))
|
||||
|
||||
# [3.12.0](https://github.com/zdharma-continuum/zinit/compare/v3.11.0...v3.12.0) (2023-08-30)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* build container for tagged releases ([f933dc0](https://github.com/zdharma-continuum/zinit/commit/f933dc028e9968ed434c21775c2bfc85a722ee04))
|
||||
* gh-r linux regex & gh-r zunit tests ([#564](https://github.com/zdharma-continuum/zinit/issues/564)) ([207ab9f](https://github.com/zdharma-continuum/zinit/commit/207ab9f281214bc07da82e7e542126745bf878dd))
|
||||
* gh-r zunit tests ([#561](https://github.com/zdharma-continuum/zinit/issues/561)) ([97b087e](https://github.com/zdharma-continuum/zinit/commit/97b087e68ae0c87cc31bcc9172cedf1cf5fcab68))
|
||||
* Ignore .yaml and .py files when installing completions ([#528](https://github.com/zdharma-continuum/zinit/issues/528)) ([113cfc4](https://github.com/zdharma-continuum/zinit/commit/113cfc47fb6ec1ed753222b7ba4542ef48ca2fde))
|
||||
* jq has moved from stedolan/jq to jqlang/jq ([#530](https://github.com/zdharma-continuum/zinit/issues/530)) ([de85908](https://github.com/zdharma-continuum/zinit/commit/de85908f8d0b89ff6327adfa285ca5a0c4302f2d))
|
||||
* math expression in plugins command ([#559](https://github.com/zdharma-continuum/zinit/issues/559)) ([68a6b42](https://github.com/zdharma-continuum/zinit/commit/68a6b42caf224b2ca2c172d58daf9faf5c86beb9))
|
||||
* pin fclones version to v0.31.0 ([497d519](https://github.com/zdharma-continuum/zinit/commit/497d519d99c3d3cdb8e71dfdf4583cadef9220a0))
|
||||
* quote parens so that they aren't used as globs ([#549](https://github.com/zdharma-continuum/zinit/issues/549)) ([1375adf](https://github.com/zdharma-continuum/zinit/commit/1375adf8f8edadbdcfc18445d852c7f08e723887))
|
||||
* self-update check for updates ([#562](https://github.com/zdharma-continuum/zinit/issues/562)) ([b456a2d](https://github.com/zdharma-continuum/zinit/commit/b456a2dba65673f4cf5a9a8c2bc16d7d0dcb3ace))
|
||||
* update gomi repo owner ([#568](https://github.com/zdharma-continuum/zinit/issues/568)) ([19ca2dc](https://github.com/zdharma-continuum/zinit/commit/19ca2dc361f9995a3e6a8a8aed0ade435168cd3d))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* build container with zsh 5.9 ([#525](https://github.com/zdharma-continuum/zinit/issues/525)) ([238e843](https://github.com/zdharma-continuum/zinit/commit/238e843d60de27b8f3deaf2d0b5e6657b293c9eb))
|
||||
|
||||
# [3.11.0](https://github.com/zdharma-continuum/zinit/compare/v3.10.0...v3.11.0) (2023-05-04)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* add `.gitignore` with '*' pattern in a plugins `._zinit/` directory ([#397](https://github.com/zdharma-continuum/zinit/issues/397)) ([fccb508](https://github.com/zdharma-continuum/zinit/commit/fccb5080ab4b1df83f01906082eea444f218776f)), closes [#395](https://github.com/zdharma-continuum/zinit/issues/395)
|
||||
* broken update command ([336ca85](https://github.com/zdharma-continuum/zinit/commit/336ca85ade5d4c5c99bd903610baf9961753192b))
|
||||
* cleanup style, naming, and completion ([6c82d67](https://github.com/zdharma-continuum/zinit/commit/6c82d6788dec6a60c4c217d03c45c327bc0e59a1))
|
||||
* compile and completion log messages ([c4446da](https://github.com/zdharma-continuum/zinit/commit/c4446da57e5375f4a89ea94e1e8c04eacfc4e494))
|
||||
* csearch ignores lua files ([4d1840b](https://github.com/zdharma-continuum/zinit/commit/4d1840b883e86cc46df2050c01bd0731e29023aa))
|
||||
* makefile clean target less verbose ([3396f5e](https://github.com/zdharma-continuum/zinit/commit/3396f5e3aa1fb81d128d4f34b9ff868011d68981))
|
||||
* pin git-mkver gh-r test to v.1.2.2 ([a05cc1a](https://github.com/zdharma-continuum/zinit/commit/a05cc1ab59db5b82c5a0f7ee0b6bbef84f0e8b0e))
|
||||
* pin git-mkver unit test to v1.2.2 ([08f02e0](https://github.com/zdharma-continuum/zinit/commit/08f02e00d0fbc86b10d44d18f5b774c9c00806cc))
|
||||
* regenerate docs ([e0177e2](https://github.com/zdharma-continuum/zinit/commit/e0177e20382d8336d55bc2637a6f2c515d25ce19))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* expand gh-r zunit tests ([c323116](https://github.com/zdharma-continuum/zinit/commit/c3231164836c8ca3ca9ebded8d95c31c0a186567))
|
||||
* refactor debug commands ([930b25e](https://github.com/zdharma-continuum/zinit/commit/930b25ee3c6cc66931eda0030c422fddd69ef9c4))
|
||||
* refactor ls, list, and loaded commands ([a865907](https://github.com/zdharma-continuum/zinit/commit/a86590762ac2bb5244db5d3cd7d99d32a9dc11fe))
|
||||
|
||||
# [3.10.0](https://github.com/zdharma-continuum/zinit/compare/v3.9.0...v3.10.0) (2023-04-02)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* absolute path support in the symbol browser ([d29a8ba](https://github.com/zdharma-continuum/zinit/commit/d29a8ba2b757b936663c16d12e46d3638f44027a))
|
||||
* assign to functions hash to make %x work ([bd65a01](https://github.com/zdharma-continuum/zinit/commit/bd65a017345ac891b6b14eb5feb4182bc9c74ace))
|
||||
* broken symbolic link after `creinstall .` ([da0d6b7](https://github.com/zdharma-continuum/zinit/commit/da0d6b712c6466d11165ac9e27a6cd7de856e537))
|
||||
* bump node version in release workflow ([938f483](https://github.com/zdharma-continuum/zinit/commit/938f48375b20545078b63d6c1dba0a905599afe4))
|
||||
* change prefix `~zi::` to `__zi::` ([0e45493](https://github.com/zdharma-continuum/zinit/commit/0e45493e36ff350c79c164895bd4718103e2cf7a))
|
||||
* container build & shell make targets ([a72fb83](https://github.com/zdharma-continuum/zinit/commit/a72fb83f0999a7fa4a26c6e1bb71d6cab3858b4f))
|
||||
* container build & shell make targets ([14b2cda](https://github.com/zdharma-continuum/zinit/commit/14b2cda0397c343b1bfdc041cba7c4ab216e3803))
|
||||
* container build & shell make targets ([370808d](https://github.com/zdharma-continuum/zinit/commit/370808dd5186f4b9c8a214e7ef6f4350df243b5b))
|
||||
* container build & shell make targets ([47bd74f](https://github.com/zdharma-continuum/zinit/commit/47bd74f8a7c74761e9b03943d3c40fc523df585f))
|
||||
* container build & shell make targets ([f8eb967](https://github.com/zdharma-continuum/zinit/commit/f8eb967b0e98f135b43cb5065aceb8a4f058aa09))
|
||||
* container build & shell make targets ([3af321e](https://github.com/zdharma-continuum/zinit/commit/3af321e8e4975a07634df08acda383e4cf53e99c))
|
||||
* do not run `make docs` ([3802893](https://github.com/zdharma-continuum/zinit/commit/3802893c74988fc03bad086601c905a1046a9fc1))
|
||||
* failing zunit tests & bootstrap script ([d618467](https://github.com/zdharma-continuum/zinit/commit/d618467ff090a6dbfb327ca0a29141d0c9312b24))
|
||||
* file modelines ([75bb735](https://github.com/zdharma-continuum/zinit/commit/75bb73547ed24ab6d25e1aed03684caebba39f5e))
|
||||
* gh-r & bpick ice log format and content ([ad88a89](https://github.com/zdharma-continuum/zinit/commit/ad88a890ad25505acb764f9551ee00d5264daa9a))
|
||||
* gh-r parsing logic for arm64 & logging style ([7e48651](https://github.com/zdharma-continuum/zinit/commit/7e486519d7aad48a8b6009ae5075f0efec2409f9))
|
||||
* gh-r pattern for 64bit linux-gnu systems ([b5a31c0](https://github.com/zdharma-continuum/zinit/commit/b5a31c07f2bd2d823ce9e99b98228ec68db523bd))
|
||||
* lsd repo owner changed to lsd-rs organization ([#489](https://github.com/zdharma-continuum/zinit/issues/489)) ([824d9d3](https://github.com/zdharma-continuum/zinit/commit/824d9d36177dac00a81333205e2b3dfbc35cb758))
|
||||
* make gh-r release search case-insensitive ([3eb75b7](https://github.com/zdharma-continuum/zinit/commit/3eb75b7ee9db4dd01455811cf4ca4539dd07246b))
|
||||
* make target docker cmd flags ([dd04896](https://github.com/zdharma-continuum/zinit/commit/dd048964491b9a63f4622b591b9a227d5e981408))
|
||||
* pin `ggsrun` version in gh-r z-unit test ([9f67798](https://github.com/zdharma-continuum/zinit/commit/9f677989e8386469bc2d5dcb0d2cb5d62d489e34))
|
||||
* the starship example does not work properly ([4933b62](https://github.com/zdharma-continuum/zinit/commit/4933b62f400a1b6b29b82a9ff233911b336a33c5))
|
||||
* update pygmentize flags in glance subcommand ([#488](https://github.com/zdharma-continuum/zinit/issues/488)) ([b773763](https://github.com/zdharma-continuum/zinit/commit/b773763bdc37d414a5d954ccb00877374177f0ec))
|
||||
* use correct return code in zinit-confirm ([d467738](https://github.com/zdharma-continuum/zinit/commit/d467738c1b1c834e938b4b4bb6e83cab5bfdc429))
|
||||
* vim modelines & zsdoc pdf rendering ([2b460a7](https://github.com/zdharma-continuum/zinit/commit/2b460a74f236178cd8d06b55069049381d79256e))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* delete subcommand refactor ([9eee215](https://github.com/zdharma-continuum/zinit/commit/9eee215e3f8ee7d8404e4e54f8ef57a57a21fde2)), closes [#57](https://github.com/zdharma-continuum/zinit/issues/57) [#239](https://github.com/zdharma-continuum/zinit/issues/239)
|
||||
* zinit completion improvements ([b8d12e5](https://github.com/zdharma-continuum/zinit/commit/b8d12e555d4cadff7769ef67c5d4c0d403f0b11e))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* "Merge branch 'refactor/zinit-function-names' into main" ([515688b](https://github.com/zdharma-continuum/zinit/commit/515688bc976e793422d21ba9debfdd1a982c611e))
|
||||
|
||||
# [3.9.0](https://github.com/zdharma-continuum/zinit/compare/v3.8.0...v3.9.0) (2022-12-17)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* remove broken gh-r zunit test for "warp" ([#430](https://github.com/zdharma-continuum/zinit/issues/430)) ([64fa4ae](https://github.com/zdharma-continuum/zinit/commit/64fa4aef3ae517afe5444b24df9603e9d1a77a55))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* add `completions` ice ([#417](https://github.com/zdharma-continuum/zinit/issues/417)) ([59975d7](https://github.com/zdharma-continuum/zinit/commit/59975d70d7101651b0bb01f4e22c23db0dae8133))
|
||||
* display version via `version` sub command ([bfb01e6](https://github.com/zdharma-continuum/zinit/commit/bfb01e65d7b9a98c643f3ee0a92f2df06372f52e))
|
||||
|
||||
|
||||
### Performance Improvements
|
||||
|
||||
* reduce scheduler task check to 10 second interval ([#429](https://github.com/zdharma-continuum/zinit/issues/429)) ([1681ce4](https://github.com/zdharma-continuum/zinit/commit/1681ce40ebf98e5bf48b78ac5d6c060c1ecada99))
|
||||
|
||||
|
||||
### Reverts
|
||||
|
||||
* "perf: reduce scheduler task check to 10 second interval ([#429](https://github.com/zdharma-continuum/zinit/issues/429))" ([#432](https://github.com/zdharma-continuum/zinit/issues/432)) ([cfd3261](https://github.com/zdharma-continuum/zinit/commit/cfd32618921ce0626a6deadc794da962750a845d))
|
||||
|
||||
# [3.8.0](https://github.com/zdharma-continuum/zinit/compare/v3.7.0...v3.8.0) (2022-11-07)
|
||||
|
||||
|
||||
### Bug Fixes
|
||||
|
||||
* account for systems where musl is present ([#269](https://github.com/zdharma-continuum/zinit/issues/269)) ([8620574](https://github.com/zdharma-continuum/zinit/commit/8620574a5533695525260fd88df8d249c701217f))
|
||||
* alist repository for gh-r test ([#305](https://github.com/zdharma-continuum/zinit/issues/305)) ([fb3c082](https://github.com/zdharma-continuum/zinit/commit/fb3c082551ee9f48676c3183d5a4e9e842d3d874))
|
||||
* allow zinit to be run from non-interactive scripts ([#227](https://github.com/zdharma-continuum/zinit/issues/227)) ([c3d1bb5](https://github.com/zdharma-continuum/zinit/commit/c3d1bb586c77a98566c552358fd9aee084e30da8)), closes [#199](https://github.com/zdharma-continuum/zinit/issues/199)
|
||||
* broken yaml syntax in issue template ([#355](https://github.com/zdharma-continuum/zinit/issues/355)) ([f729e06](https://github.com/zdharma-continuum/zinit/commit/f729e065db88a5cd0daa8a6f2bd2f8ee0439545a))
|
||||
* calico gh-r zunit test ([#356](https://github.com/zdharma-continuum/zinit/issues/356)) ([56fb9e0](https://github.com/zdharma-continuum/zinit/commit/56fb9e0b1df21de809a2efc935882b49e9161618))
|
||||
* change ctags symbols browser key binding from `ctrl-k` to `alt-Q` ([#387](https://github.com/zdharma-continuum/zinit/issues/387)) ([7f6dc7d](https://github.com/zdharma-continuum/zinit/commit/7f6dc7da6c824b30c0e8e30ae0ecbda5be118e68)), closes [#386](https://github.com/zdharma-continuum/zinit/issues/386)
|
||||
* Do not try to escape exclamation marks ([#399](https://github.com/zdharma-continuum/zinit/issues/399)) ([0e55b2e](https://github.com/zdharma-continuum/zinit/commit/0e55b2ea673915c462af752ee7d46fff55e6f436))
|
||||
* docs workflow should fail if out-of-date ([#278](https://github.com/zdharma-continuum/zinit/issues/278)) ([07cde66](https://github.com/zdharma-continuum/zinit/commit/07cde660081c91382ce73b60485839710154c7c6))
|
||||
* Don't error if $OPTS is not yet defined in .zinit-compinit call ([44765e0](https://github.com/zdharma-continuum/zinit/commit/44765e0bcb8d3f1ee3eb55286e33ad17b8c72a5e))
|
||||
* filter by runtime detected CPU before compiled CPU ([#304](https://github.com/zdharma-continuum/zinit/issues/304)) ([a4dc13f](https://github.com/zdharma-continuum/zinit/commit/a4dc13f66a65c4fa52953104c13e44a7d7c0a945)), closes [#287](https://github.com/zdharma-continuum/zinit/issues/287)
|
||||
* gh-r & plugin zunit tests ([dd12fce](https://github.com/zdharma-continuum/zinit/commit/dd12fce3f49db284de7cf18a03ef891cc46bc7cc))
|
||||
* gh-r filters i686 (32 bit) for x86_64 ([#226](https://github.com/zdharma-continuum/zinit/issues/226)) ([57f0d82](https://github.com/zdharma-continuum/zinit/commit/57f0d82118ed626f04d4b9b8b26de48c9d7e0956)), closes [#225](https://github.com/zdharma-continuum/zinit/issues/225)
|
||||
* gh-r logic ignores [36]86 assets ([#235](https://github.com/zdharma-continuum/zinit/issues/235)) ([d60638f](https://github.com/zdharma-continuum/zinit/commit/d60638f2217875056a061b3411c4bcc678dce5f6)), closes [#225](https://github.com/zdharma-continuum/zinit/issues/225) [#246](https://github.com/zdharma-continuum/zinit/issues/246) [#247](https://github.com/zdharma-continuum/zinit/issues/247)
|
||||
* gh-r removes linux32 assets on 64 bit OS ([1864c0b](https://github.com/zdharma-continuum/zinit/commit/1864c0be09faa0e4d9a7c549cafed7d296d7517e))
|
||||
* gh-r retrieves release data GH REST API ([#373](https://github.com/zdharma-continuum/zinit/issues/373)) ([4a2a120](https://github.com/zdharma-continuum/zinit/commit/4a2a120b341793b1abaef5f12fbb4808277d8570)), closes [#374](https://github.com/zdharma-continuum/zinit/issues/374)
|
||||
* modify regex in gh-r for assets to not consider for selection ([#244](https://github.com/zdharma-continuum/zinit/issues/244)) ([6ef8439](https://github.com/zdharma-continuum/zinit/commit/6ef84398b2c92073d88f440dfbfd554cb8e75343))
|
||||
* more cleaning up urls ([672ae51](https://github.com/zdharma-continuum/zinit/commit/672ae514142b433708ea10486556fe3f0ba54e3e)), closes [#47](https://github.com/zdharma-continuum/zinit/issues/47)
|
||||
* names of ctag Make target deps ([#407](https://github.com/zdharma-continuum/zinit/issues/407)) ([9987d5c](https://github.com/zdharma-continuum/zinit/commit/9987d5c781d4a95698ed649dc59b11c34006b1c1))
|
||||
* package are broken again ([24f10f6](https://github.com/zdharma-continuum/zinit/commit/24f10f6367cbab6039bd0c1ca07dd9449bbc3557))
|
||||
* permissions for PR labeler GH action workflow ([#236](https://github.com/zdharma-continuum/zinit/issues/236)) ([8a0d567](https://github.com/zdharma-continuum/zinit/commit/8a0d5678d1ee0eeed91d2c3a094578a2cd39ba04))
|
||||
* read without -r is generally bad. ([00c70a4](https://github.com/zdharma-continuum/zinit/commit/00c70a434d50a1591bcdc73185150b2fdce96c77))
|
||||
* remove curl option "--tcp-fastopen" which is not always available ([#299](https://github.com/zdharma-continuum/zinit/issues/299)) ([308c9d4](https://github.com/zdharma-continuum/zinit/commit/308c9d4cd82f3e41d2ae21ff31fba0dc4a7c6cb5))
|
||||
* remove macOS 10.5 & 11 from test matrix ([c613193](https://github.com/zdharma-continuum/zinit/commit/c61319378df5b0deae68fc467b9a2449fcf67336))
|
||||
* remove use less line ([4f87076](https://github.com/zdharma-continuum/zinit/commit/4f870766011d36c871d8afd07afe56733c8de76d))
|
||||
* rename `docs` to `doc` to match doc dir ([#212](https://github.com/zdharma-continuum/zinit/issues/212)) ([3a7dc95](https://github.com/zdharma-continuum/zinit/commit/3a7dc95f02340fb56693ca0f304e31be8c8a9652))
|
||||
* rm linux32 assets in aarch64/arm64 gh-r regex ([#414](https://github.com/zdharma-continuum/zinit/issues/414)) ([529aa20](https://github.com/zdharma-continuum/zinit/commit/529aa20f42a249f609b9e8248d6fd00d609a35ce))
|
||||
* syntax error when checking for `realpath` command ([#259](https://github.com/zdharma-continuum/zinit/issues/259)) ([05559eb](https://github.com/zdharma-continuum/zinit/commit/05559ebdbcda77622daaf3935d20fdf9b9c09c6c)), closes [#257](https://github.com/zdharma-continuum/zinit/issues/257)
|
||||
* trigger for PR labeler GH action workflow ([#237](https://github.com/zdharma-continuum/zinit/issues/237)) ([49af866](https://github.com/zdharma-continuum/zinit/commit/49af86688bc8c5882744a679f9c0094e2f4c7fa6))
|
||||
* typo & triggers in documentation workflow ([#308](https://github.com/zdharma-continuum/zinit/issues/308)) ([161d7c1](https://github.com/zdharma-continuum/zinit/commit/161d7c1ee1fc2bbb43442cd90b48e502bf62603f))
|
||||
* unmatched "(" in windows gh-r patterns ([#280](https://github.com/zdharma-continuum/zinit/issues/280)) ([1f4ba5a](https://github.com/zdharma-continuum/zinit/commit/1f4ba5ae0ccf928d1914dc3a11d00393e0fd94a8))
|
||||
* update `zdharma` to `zdharma-continuum` ([66b1700](https://github.com/zdharma-continuum/zinit/commit/66b17007523321f9afee91dbe75b487de5db4fec))
|
||||
* update docs for new jq-check ([6207427](https://github.com/zdharma-continuum/zinit/commit/62074272563f88a32a701f56f914297930a9da19))
|
||||
* use [*] inside arbitrary strings. ([73a8c92](https://github.com/zdharma-continuum/zinit/commit/73a8c92d43f57bca514e44b9fed14e941168c61f))
|
||||
* workflow pkg mgmt due to base OS changes ([195f72d](https://github.com/zdharma-continuum/zinit/commit/195f72d54b80051fc71d1f73909f5dabe6745649))
|
||||
* ziextract execs discovery regex ([#410](https://github.com/zdharma-continuum/zinit/issues/410)) ([105b38a](https://github.com/zdharma-continuum/zinit/commit/105b38a195e2a67eaba9d7a69bcef7738c57d12d))
|
||||
* zunit install in GH workflow ([#412](https://github.com/zdharma-continuum/zinit/issues/412)) ([f4787dc](https://github.com/zdharma-continuum/zinit/commit/f4787dcac803ed9055c4032c516dba66737beebf))
|
||||
|
||||
|
||||
### Features
|
||||
|
||||
* ability to set program for `zinit ls` to use ([#221](https://github.com/zdharma-continuum/zinit/issues/221)) ([bad7af3](https://github.com/zdharma-continuum/zinit/commit/bad7af3ae2d8aab18feb11a0251987fe3c08c31b)), closes [#170](https://github.com/zdharma-continuum/zinit/issues/170)
|
||||
* add `-a` (actual time) to `zinit times` cmd ([#223](https://github.com/zdharma-continuum/zinit/issues/223)) ([450d3c1](https://github.com/zdharma-continuum/zinit/commit/450d3c10a8f6728ee8c76bfb99f777658b8d3f35))
|
||||
* add `krew` and `prebuilt-ripgrep` gh-r zunit tests ([#267](https://github.com/zdharma-continuum/zinit/issues/267)) ([f25b4ae](https://github.com/zdharma-continuum/zinit/commit/f25b4ae2b9951bf0d1306a17ef512a1868211b78))
|
||||
* add compile vim from source zunit test ([#232](https://github.com/zdharma-continuum/zinit/issues/232)) ([126528c](https://github.com/zdharma-continuum/zinit/commit/126528ccd50e98c0e71f06971ae16aceb571fb97))
|
||||
* add configure"" ice ([#334](https://github.com/zdharma-continuum/zinit/issues/334)) ([40a46c6](https://github.com/zdharma-continuum/zinit/commit/40a46c6d2250af7e01d91b2f8ec3e01cf392c3d1))
|
||||
* add GH action to remove old workflow logs ([#248](https://github.com/zdharma-continuum/zinit/issues/248)) ([6647bdc](https://github.com/zdharma-continuum/zinit/commit/6647bdc31c5b82378195ce71055099a7b36734a1))
|
||||
* add PR labeler to show what parts of Zinit are changed ([#211](https://github.com/zdharma-continuum/zinit/issues/211)) ([42e83d7](https://github.com/zdharma-continuum/zinit/commit/42e83d7f99254c16e408f52848b914f7aa264372))
|
||||
* add releases via semantic-release ([73542b4](https://github.com/zdharma-continuum/zinit/commit/73542b490981e43adca4a09b64c327fe811d01e1))
|
||||
* add releases via semantic-release ([#415](https://github.com/zdharma-continuum/zinit/issues/415)) ([cfa2f0e](https://github.com/zdharma-continuum/zinit/commit/cfa2f0ebcd674706d5cb91533cf362f6f4ddd7ee))
|
||||
* expand linted file types to markdown and shell ([96fe03f](https://github.com/zdharma-continuum/zinit/commit/96fe03f85baf8eae33270a09a5ca82f108f6cc25))
|
||||
* **git-process-output:** simplify progress-bar ([#204](https://github.com/zdharma-continuum/zinit/issues/204)) ([c888917](https://github.com/zdharma-continuum/zinit/commit/c888917edbafa3772870ad1f320da7a5f169cc6f))
|
||||
* update output messaging to be more informative ([047320a](https://github.com/zdharma-continuum/zinit/commit/047320a9234be4de8299ff4796e28e2363e77984))
|
||||
|
||||
# [v3.7.0](https://github.com/zdharma-continuum/zinit/compare/v3.1...v3.7.0)
|
||||
|
|
@ -1,101 +0,0 @@
|
|||
# Contributor Covenant Code of Conduct
|
||||
|
||||
## Our Pledge
|
||||
|
||||
We as members, contributors, and leaders pledge to make participation in our community a harassment-free experience for
|
||||
everyone, regardless of age, body size, visible or invisible disability, ethnicity, sex characteristics, gender identity
|
||||
and expression, level of experience, education, socio-economic status, nationality, personal appearance, race, religion,
|
||||
or sexual identity and orientation.
|
||||
|
||||
We pledge to act and interact in ways that contribute to an open, welcoming, diverse, inclusive, and healthy community.
|
||||
|
||||
## Our Standards
|
||||
|
||||
Examples of behavior that contributes to a positive environment for our community include:
|
||||
|
||||
- Demonstrating empathy and kindness toward other people
|
||||
- Being respectful of differing opinions, viewpoints, and experiences
|
||||
- Giving and gracefully accepting constructive feedback
|
||||
- Accepting responsibility and apologizing to those affected by our mistakes, and learning from the experience
|
||||
- Focusing on what is best not just for us as individuals, but for the overall community
|
||||
|
||||
Examples of unacceptable behavior include:
|
||||
|
||||
- The use of sexualized language or imagery, and sexual attention or advances of any kind
|
||||
- Trolling, insulting or derogatory comments, and personal or political attacks
|
||||
- Public or private harassment
|
||||
- Publishing others' private information, such as a physical or email address, without their explicit permission
|
||||
- Other conduct which could reasonably be considered inappropriate in a professional setting
|
||||
|
||||
## Enforcement Responsibilities
|
||||
|
||||
Community leaders are responsible for clarifying and enforcing our standards of acceptable behavior and will take
|
||||
appropriate and fair corrective action in response to any behavior that they deem inappropriate, threatening, offensive,
|
||||
or harmful.
|
||||
|
||||
Community leaders have the right and responsibility to remove, edit, or reject comments, commits, code, wiki edits,
|
||||
issues, and other contributions that are not aligned to this Code of Conduct, and will communicate reasons for
|
||||
moderation decisions when appropriate.
|
||||
|
||||
## Scope
|
||||
|
||||
This Code of Conduct applies within all community spaces, and also applies when an individual is officially representing
|
||||
the community in public spaces. Examples of representing our community include using an official e-mail address, posting
|
||||
via an official social media account, or acting as an appointed representative at an online or offline event.
|
||||
|
||||
## Enforcement
|
||||
|
||||
Instances of abusive, harassing, or otherwise unacceptable behavior may be reported to the community leaders responsible
|
||||
for enforcement at . All complaints will be reviewed and investigated promptly and fairly.
|
||||
|
||||
All community leaders are obligated to respect the privacy and security of the reporter of any incident.
|
||||
|
||||
## Enforcement Guidelines
|
||||
|
||||
Community leaders will follow these Community Impact Guidelines in determining the consequences for any action they deem
|
||||
in violation of this Code of Conduct:
|
||||
|
||||
### 1. Correction
|
||||
|
||||
**Community Impact**: Use of inappropriate language or other behavior deemed unprofessional or unwelcome in the
|
||||
community.
|
||||
|
||||
**Consequence**: A private, written warning from community leaders, providing clarity around the nature of the violation
|
||||
and an explanation of why the behavior was inappropriate. A public apology may be requested.
|
||||
|
||||
### 2. Warning
|
||||
|
||||
**Community Impact**: A violation through a single incident or series of actions.
|
||||
|
||||
**Consequence**: A warning with consequences for continued behavior. No interaction with the people involved, including
|
||||
unsolicited interaction with those enforcing the Code of Conduct, for a specified period of time. This includes avoiding
|
||||
interactions in community spaces as well as external channels like social media. Violating these terms may lead to a
|
||||
temporary or permanent ban.
|
||||
|
||||
### 3. Temporary Ban
|
||||
|
||||
**Community Impact**: A serious violation of community standards, including sustained inappropriate behavior.
|
||||
|
||||
**Consequence**: A temporary ban from any sort of interaction or public communication with the community for a specified
|
||||
period of time. No public or private interaction with the people involved, including unsolicited interaction with those
|
||||
enforcing the Code of Conduct, is allowed during this period. Violating these terms may lead to a permanent ban.
|
||||
|
||||
### 4. Permanent Ban
|
||||
|
||||
**Community Impact**: Demonstrating a pattern of violation of community standards, including sustained inappropriate
|
||||
behavior, harassment of an individual, or aggression toward or disparagement of classes of individuals.
|
||||
|
||||
**Consequence**: A permanent ban from any sort of public interaction within the community.
|
||||
|
||||
## Attribution
|
||||
|
||||
This Code of Conduct is adapted from the [Contributor Covenant][homepage], version 2.0, available at
|
||||
https://www.contributor-covenant.org/version/2/0/code_of_conduct.html.
|
||||
|
||||
Community Impact Guidelines were inspired by
|
||||
[Mozilla's code of conduct enforcement ladder](https://github.com/mozilla/diversity).
|
||||
|
||||
For answers to common questions about this code of conduct, see the FAQ at https://www.contributor-covenant.org/faq.
|
||||
Translations are available at https://www.contributor-covenant.org/translations.
|
||||
|
||||
[homepage]: https://www.contributor-covenant.org
|
||||
14
LICENSE
14
LICENSE
|
|
@ -1,7 +1,7 @@
|
|||
MIT License
|
||||
This software is licensed under MIT.
|
||||
|
||||
Copyright (c) 2016-2020 Sebastian Gniazdowski and contributors
|
||||
Copyright (c) 2021-2022 zdharma-continuum
|
||||
MIT License
|
||||
-----------
|
||||
|
||||
Permission is hereby granted, free of charge, to any person obtaining a copy
|
||||
of this software and associated documentation files (the "Software"), to deal
|
||||
|
|
@ -10,13 +10,13 @@ to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
|
|||
copies of the Software, and to permit persons to whom the Software is
|
||||
furnished to do so, subject to the following conditions:
|
||||
|
||||
The above copyright notice and this permission notice shall be included in all
|
||||
copies or substantial portions of the Software.
|
||||
The above copyright notice and this permission notice shall be included in
|
||||
all copies or substantial portions of the Software.
|
||||
|
||||
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
||||
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
||||
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
|
||||
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
|
||||
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
|
||||
SOFTWARE.
|
||||
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN
|
||||
THE SOFTWARE.
|
||||
|
|
|
|||
54
Makefile
54
Makefile
|
|
@ -1,54 +0,0 @@
|
|||
.EXPORT_ALL_VARIABLES:
|
||||
|
||||
ZSH := $(shell command -v zsh 2> /dev/null)
|
||||
SRC := zinit{'','-additional','-autoload','-install','-side'}.zsh
|
||||
DOC_SRC := $(foreach wrd,$(SRC),../$(wrd))
|
||||
|
||||
.PHONY: all clean container doc doc/container tags tags/emacs tags/vim test zwc
|
||||
|
||||
clean:
|
||||
rm -rf *.zwc doc/zsdoc/zinit{'','-additional','-autoload','-install','-side'}.zsh.adoc doc/zsdoc/data/
|
||||
|
||||
container:
|
||||
docker build --tag=ghcr.io/zdharma-continuum/zinit:latest --file=docker/Dockerfile .
|
||||
|
||||
doc: clean
|
||||
cd doc; zsh -l -d -f -i -c "zsd -v --scomm --cignore '(\#*FUNCTION:[[:space:]][\:\∞\.\+\@\-a-zA-Z0-9]*[\[]*|}[[:space:]]\#[[:space:]][\]]*)' $(DOC_SRC)"
|
||||
|
||||
doc/container: container
|
||||
./scripts/docker-run.sh --docs --debug
|
||||
|
||||
# Run ctags to generate Emacs and Vim's format tag file.
|
||||
tags: tags/emacs tags/vim
|
||||
|
||||
tags/emacs: ## Build Emacs-style ctags file
|
||||
@if type ctags >/dev/null 2>&1; then \
|
||||
if ctags --version | grep >/dev/null 2>&1 "Universal Ctags"; then \
|
||||
ctags -e -R --options=share/zsh.ctags --languages=zsh \
|
||||
--pattern-length-limit=250 --maxdepth=1; \
|
||||
else \
|
||||
ctags -e -R --languages=sh --langmap=sh:.zsh; \
|
||||
fi; \
|
||||
printf "Created the Emacs \`TAGS\` file.\\n"; \
|
||||
else \
|
||||
printf 'Error: Please install a Ctags (e.g.: either the Exuberant or Universal %b' \
|
||||
'version) utility first.\n'; \
|
||||
fi
|
||||
|
||||
tags/vim: ## Build the Vim-style ctags file
|
||||
@if type ctags >/dev/null 2>&1; then \
|
||||
if ctags --version | grep >/dev/null 2>&1 "Universal Ctags"; then \
|
||||
ctags --languages=zsh --maxdepth=1 --options=share/zsh.ctags --pattern-length-limit=250 -R; \
|
||||
else \
|
||||
ctags -R --languages=sh --langmap=sh:.zsh; \
|
||||
fi; \
|
||||
printf "Created the Vim's style \`tags\` file.\\n"; \
|
||||
else \
|
||||
printf 'Error: Please install a ctags first.\n'; \
|
||||
fi
|
||||
|
||||
test:
|
||||
zunit run
|
||||
|
||||
zwc:
|
||||
$(or $(ZSH),:) -fc 'for f in *.zsh; do zcompile -R -- $$f.zwc $$f || exit; done'
|
||||
376
_zinit
376
_zinit
|
|
@ -1,376 +0,0 @@
|
|||
#compdef zinit
|
||||
#autoload
|
||||
#
|
||||
# Zinit ZSH completion function
|
||||
# Copyright (c) 2016-2020 Sebastian Gniazdowski
|
||||
# Copyright (c) 2016-2023 zdharma-continuum
|
||||
# Homepage: https://github.com/zdharma-continuum/zinit
|
||||
# License: MIT License
|
||||
#
|
||||
|
||||
# FUNCTION: __zinit_commands [[[
|
||||
__zinit_commands(){
|
||||
local -a commands
|
||||
commands=(
|
||||
'add-fpath:Add plugin folder to $FPATH'
|
||||
'bindkeys:List of plugin defined key bindings'
|
||||
'cclear:Clear completions list'
|
||||
'cd:Go to a plugin or snippet direcorty'
|
||||
'cdclear:Clear the compdef replay list'
|
||||
'cdisable:Disable completions'
|
||||
'cdreplay:Replay compdef list'
|
||||
'cenable:Enable completions'
|
||||
'changes:View plugins git log'
|
||||
'compile:Compile plugin (or all plugins if --all passed)'
|
||||
'compiled:List of compiled plugins'
|
||||
'compinit:Refresh installed completions'
|
||||
'completions:List status of all installed completions'
|
||||
'create:Generate Zsh plugin boilerplate'
|
||||
'creinstall:Install completions for plugin'
|
||||
'csearch:Search for available completions from any plugin'
|
||||
'cuninstall:Uninstall completions for plugin'
|
||||
'debug:Functions for debugging Zinit'
|
||||
'delete:Uninstall a plugin or snippet'
|
||||
'edit:Edit a plugins or snippet with \$EDITOR'
|
||||
'env-whitelist:Specify names (also patterns) of parameters to be left unchanged during an unload'
|
||||
'glance:Look at plugins source'
|
||||
'help:Usage information'
|
||||
'load:Load plugin'
|
||||
'man:Display Zinit'\''s manpage'
|
||||
'module:Manage binary Zsh module shipped with Zinit'
|
||||
'plugins:List status of all installed plugins'
|
||||
'recall:Fetch saved ice modifiers and construct '
|
||||
'recently:Show plugins that changed recently'
|
||||
'report:Show plugins report'
|
||||
'run:Run a command inside plugins folder'
|
||||
'self-update:Fetch the newest version of Zinit from GitHub using `git`(1) and recompile'
|
||||
'snippet:Source a local or remote file'
|
||||
'snippets:List status of all installed snippets'
|
||||
'srv:Control a service, command'
|
||||
'status:Git status for plugin'
|
||||
'stress:Test plugin for compatibility with set of options'
|
||||
'times:Display brief statistics for your Zinit installation'
|
||||
'uncompile:Remove compiled plugin'
|
||||
'uninstall:Uninstall a formula or cask'
|
||||
'unload:Unload a plugin or snippet'
|
||||
'update:Upgrade outdated plugins and snippets using the same options they were originally installed with'
|
||||
'version:Print the version numbers of Zinit to standard output'
|
||||
'zstatus:Overall Zinit status'
|
||||
)
|
||||
_describe -t commands 'zinit commands' commands
|
||||
} # ]]]
|
||||
###
|
||||
# Commands in the debug context
|
||||
###
|
||||
_zinit_debug_commands=(
|
||||
'clear:Clear report of debug tracing session'
|
||||
'report:Show report of debug tracing session'
|
||||
'revert:Revert changes detected during debug tracing session'
|
||||
'start:Start debug tracing session'
|
||||
'status:Show current state of debug mode'
|
||||
'stop:Stop debug tracing session'
|
||||
)
|
||||
# FUNCTION: __zinit_completion_caching_policy [[[
|
||||
__zinit_completion_caching_policy(){
|
||||
local -a tmp
|
||||
(( $#tmp )) || return 0
|
||||
tmp=( $ZINIT[BIN_DIR]/*.git/index(om[1]N) )
|
||||
[[ -z $tmp || $tmp -nt $1 ]]
|
||||
} # ]]]
|
||||
# FUNCTION: __zinit_installed [[[
|
||||
__zinit_installed() {
|
||||
_alternative \
|
||||
'plugins:installed:__zinit_installed_plugins' \
|
||||
'snippets:installed:__zinit_installed_snippets'
|
||||
} # ]]]
|
||||
# FUNCTION: __zinit_installed_plugins [[[
|
||||
__zinit_installed_plugins(){
|
||||
# [[ -prefix '-' ]] && return 0
|
||||
typeset -a list
|
||||
local expl
|
||||
list=( "${ZINIT[PLUGINS_DIR]}"/*(N:t) )
|
||||
list=( "${list[@]//---//}" )
|
||||
list=( "${list[@]:#_local/zinit}" )
|
||||
list=( "${list[@]:#custom}" )
|
||||
_wanted list expl 'plugins' compadd -a - list
|
||||
} # ]]]
|
||||
# FUNCTION: __zinit_installed_snippets [[[
|
||||
__zinit_installed_snippets(){
|
||||
# [[ -prefix '-' ]] && return 0
|
||||
typeset -a snippets
|
||||
local expl
|
||||
snippets=( "${ZINIT[SNIPPETS_DIR]}"/**/._zinit(D/:h) )
|
||||
snippets=( ${(Q)snippets[@]#${ZINIT[SNIPPETS_DIR]}/} )
|
||||
# formulae=( ${(qq)formulae[@]/(#b)(http|https|ftp|ftps|scp)--/${match[1]}://} )
|
||||
# formulae=( ${formulae[@]/--//} )
|
||||
#
|
||||
_wanted snippets expl 'snippets' compadd -a - snippets
|
||||
} # ]]]
|
||||
# FUNCTION: __zinit_list_aliases [[[
|
||||
__zinit_list_aliases(){
|
||||
local -a aliases
|
||||
aliases=( ls list uninstall delete )
|
||||
builtin print -- "$aliases"
|
||||
} # ]]]
|
||||
|
||||
# FUNCTION: _zinit_add_fpath [[[
|
||||
_zinit_add_fpath(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_bindkeys [[[
|
||||
_zinit_bindkeys(){
|
||||
_message 'Hit enter to list the defined key bindings replay' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cclear [[[
|
||||
_zinit_cclear(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Turn off messages from the operation]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cd [[[
|
||||
_zinit_cd(){
|
||||
_arguments - plugin '1::plugin:__zinit_installed_plugins' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cdclear [[[
|
||||
_zinit_cdclear(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Turn off messages from the operation]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cdisable [[[
|
||||
_zinit_cdisable(){
|
||||
_message 'Press enter to disable completions' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cdlist [[[
|
||||
_zinit_cdlist(){
|
||||
_message 'List of compdef replays' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cdreplay [[[
|
||||
_zinit_cdreplay(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Turn off messages from the operation]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cenable [[[
|
||||
_zinit_cenable(){
|
||||
_message 'Hit enter to enable completions' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_changes [[[
|
||||
_zinit_changes(){
|
||||
_message 'View git log of a plugin' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_compiled [[[
|
||||
_zinit_compiled(){
|
||||
_message 'Hit enter to get list of compiled plugins and snippets'
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_compinit [[[
|
||||
_zinit_compinit(){
|
||||
_message "Refresh completions" && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_completions [[[
|
||||
_zinit_completions(){
|
||||
_message "Display a list of completions" && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_create [[[
|
||||
_zinit_compile(){
|
||||
_arguments \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Make some output more quiet]' \
|
||||
+ '(operation)' \
|
||||
'(-a --all)'{-a,--all}'[Compile all plugins]' \
|
||||
'*::installed:__zinit_installed' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_create [[[
|
||||
_zinit_create(){
|
||||
_arguments \
|
||||
'1:Plugin Name' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_creinstall [[[
|
||||
_zinit_creinstall(){
|
||||
_arguments - plugin '1::plugin:__zinit_installed_plugins' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_csearch [[[
|
||||
_zinit_csearch(){
|
||||
ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_cunistall [[[
|
||||
_zinit_cunistall(){
|
||||
_arguments - installed '*::installed:__zinit_installed' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_delete [[[
|
||||
_zinit_delete(){
|
||||
_arguments \
|
||||
{-d,--debug}'[Enable xtrace]' \
|
||||
{-h,--help}'[Show this help message]' \
|
||||
{-q,--quiet}'[Make some output more quiet]' \
|
||||
{-y,--yes}'[Automatically confirm any yes/no prompts]' \
|
||||
+ '(operation)' \
|
||||
'*::installed:__zinit_installed' \
|
||||
{-a,--all}'[Delete all plugins and snippets]' \
|
||||
{-c,--clean}'[Delete only the currently-not loaded plugins and snippets]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
_zinit_debug(){
|
||||
_arguments \
|
||||
'1: :_zinit_debug_cmds'
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_edit [[[
|
||||
_zinit_edit(){
|
||||
_arguments \
|
||||
- installed '*::plugin:__zinit_installed_plugins' \
|
||||
- snippet '*::snippet:__zinit_installed_snippets' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_env_whitelist [[[
|
||||
_zinit_env_whitelist(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Make some output more verbose]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_glance [[[
|
||||
_zinit_glance(){
|
||||
_arguments - installed '1:installed:__zinit_installed' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_list [[[
|
||||
_zinit_list(){
|
||||
_message 'Hit enter to list the defined key bindings replay' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_loaded [[[
|
||||
_zinit_loaded(){
|
||||
_message 'Hit enter to list the defined key bindings replay' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_man [[[
|
||||
_zinit_man(){
|
||||
_message "Hit enter to view the Zinit man page" && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_module [[[
|
||||
_zinit_module(){
|
||||
_arguments \
|
||||
- subcommand '*::subcommand:(build help info)' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_recall [[[
|
||||
_zinit_recall(){
|
||||
_message 'Hit enter to list the defined key bindings replay' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_recently [[[
|
||||
_zinit_recently(){
|
||||
ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_report [[[
|
||||
_zinit_report(){
|
||||
_message 'Hit enter to list the defined key bindings replay' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_run [[[
|
||||
_zinit_run(){
|
||||
_arguments \
|
||||
- installed '1:installed:__zinit_installed' \
|
||||
'2:command to run:' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_self_update [[[
|
||||
_zinit_self_update(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-n --no-pager)'{-n,--no-pager}'[Disable the use of the pager]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Turn off messages from the operation]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_snippet [[[
|
||||
_zinit_snippet(){
|
||||
_arguments -A \
|
||||
'(-c --command)'{-c,--command}'[Load the snippet as a command (i.e., make executable and apend to $PATH])' \
|
||||
'(-f --force)'{-f,--force}'[Force new download of the snippet file]' \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]'
|
||||
_arguments - snippet '*::snippet:__zinit_installed_snippets' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_status [[[
|
||||
_zinit_status(){
|
||||
_message 'Display current status of Zinit' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_stress [[[
|
||||
_zinit_stress(){
|
||||
_message 'Stress' && ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_times [[[
|
||||
_zinit_times(){
|
||||
_arguments \
|
||||
'--help[Show this help message]' \
|
||||
+ '(operation)' \
|
||||
'(-a --all)'{-a,--all}'[show both load times and loading moments]' \
|
||||
'(-m --moments)'{-m,--moments}'[Display loading moments]' \
|
||||
'(-s --seconds)'{-s,--seconds}'[Load times displayed in seconds]' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_uncompile [[[
|
||||
_zinit_uncompile(){
|
||||
_arguments \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Make some output more quiet]' \
|
||||
+ '(operation)' \
|
||||
'(-a --all)'{-a,--all}'[Uncompile all plugins]' \
|
||||
'*::installed:__zinit_installed' \
|
||||
&& ret=0
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_unload [[[
|
||||
_zinit_unload(){
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Turn off messages from the operation]' \
|
||||
- installed '*:installed:__zinit_installed'
|
||||
} # ]]]
|
||||
# FUNCTION: _zinit_update [[[
|
||||
_zinit_update(){
|
||||
_arguments \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]' \
|
||||
'(-n --no-pager)'{-n,--no-pager}'[Disable the use of the pager]' \
|
||||
'(-q --quiet)'{-q,--quiet}'[Turn off almost-all messages from the update operation FOR the objects which don'\''t have any new version available]' \
|
||||
'(-r --reset)'{-r,--reset}'[Reset the repository before updating (or remove the files for single-file snippets and gh-r plugins)]' \
|
||||
'(-s --snippets)'{-s,--snippets}'[Update only snippets (i.e.: skip updating plugins)]' \
|
||||
'(-u --urge)'{-u,--urge}'[Cause all the hooks like: atpull'\'\'', cp'\'\'', etc. to execute even when there aren'\''t any new commits / any new version of the gh-r file / etc.… available for download↔ simulate a non-empty update]' \
|
||||
'(-v --verbose)'{-v,--verbose}'[Turn on more messages from the operation]' \
|
||||
- set1 \
|
||||
'(-p --parallel)'{-p,--parallel}'[Turn on concurrent, multi-thread update (of all objects)]' \
|
||||
'(-a --all)'{-a,--all}'[Update all plugins and snippets]' \
|
||||
- set2 \
|
||||
'1:installed:__zinit_installed'
|
||||
} # ]]]
|
||||
# FUNCTION: _zunit_load [[[
|
||||
_zinit_load() {
|
||||
_message 'Hit enter to list the defined key bindings replay' && ret=0
|
||||
} # ]]]
|
||||
|
||||
# FUNCTION: _zinit [[[
|
||||
_zinit(){
|
||||
local curcontext="$curcontext" state state_descr line expl
|
||||
local tmp ret=1
|
||||
_arguments -A \
|
||||
'(-h --help)'{-h,--help}'[Show this help message]'
|
||||
_arguments -C \
|
||||
"1: :->cmds" \
|
||||
"*::arg:->args"
|
||||
case "$state" in
|
||||
cmds)
|
||||
__zinit_commands && return 0
|
||||
;;
|
||||
args)
|
||||
local cmd="${line[1]}"
|
||||
curcontext="${curcontext%:*}-${cmd}:${curcontext##*:}"
|
||||
local completion_func="_zinit_${cmd//-/_}"
|
||||
_call_function ret "${completion_func}" && return ret
|
||||
_message "a completion function is not defined for command or alias: ${cmd}"
|
||||
return 1
|
||||
;;
|
||||
esac
|
||||
} # ]]]
|
||||
|
||||
(( $+functions[_zinit_debug_cmds] )) || _zinit_debug_cmds() {
|
||||
_describe -t commands 'commands' _zinit_debug_commands "$@"
|
||||
}
|
||||
|
||||
_zinit "$@"
|
||||
|
||||
#vim: filetype=zsh foldmarker=[[[,]]] foldmethod=marker shiftwidth=2 softtabstop=2 tabstop=2:
|
||||
232
_zplugin
Normal file
232
_zplugin
Normal file
|
|
@ -0,0 +1,232 @@
|
|||
#compdef zplugin
|
||||
|
||||
local context state state_descr line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
typeset -a commands
|
||||
commands=(
|
||||
zstatus:'overall Zplugin status'
|
||||
self-update:'updates Zplugin'
|
||||
help:'usage information'
|
||||
man:'manual'
|
||||
load:'load plugin'
|
||||
unload:'unload plugin'
|
||||
snippet:"source local or remote file (-f: force - don't use cache)"
|
||||
update:'update plugin (Git)'
|
||||
update-all:'update all plugins (Git)'
|
||||
status:'status for plugin (Git)'
|
||||
status-all:'status for all plugins (Git)'
|
||||
report:'show plugin'"'"'s report'
|
||||
all-reports:'show all plugin reports'
|
||||
loaded:'show what plugins are loaded'
|
||||
list:'show what plugins are loaded'
|
||||
cd:"go into plugin's directory"
|
||||
create:'create plugin (also together with Github repository)'
|
||||
edit:"edit plugin's file with \$EDITOR"
|
||||
glance:"look at plugin's source (pygmentize, {,source-}highlight)"
|
||||
stress:'test plugin for compatibility with set of options'
|
||||
changes:"view plugin's git log"
|
||||
recently:"show plugins that changed recently, argument is e.g. 1 month 2 days"
|
||||
clist:'list completions in use'
|
||||
completions:'list completions in use'
|
||||
cdisable:'disable completion'
|
||||
cenable:'enable completion'
|
||||
creinstall:'install completions for plugin'
|
||||
cuninstall:'uninstall completions for plugin'
|
||||
csearch:'search for available completions from any plugin'
|
||||
compinit:'refresh installed completions'
|
||||
dtrace:"start tracking what's going on in session"
|
||||
dstart:"start tracking what's going on in session"
|
||||
dstop:"stop tracking what's going on in session"
|
||||
dunload:'revert changes recorded between dstart and dstop'
|
||||
dreport:"report what was going on in session"
|
||||
dclear:'clear report of what was going on in session'
|
||||
compile:'compile plugin'
|
||||
compile-all:'compile all downloaded plugins'
|
||||
uncompile:'remove compiled version of plugin'
|
||||
uncompile-all:'remove compiled versions of all downloaded plugins'
|
||||
compiled:'show which plugins are compiled'
|
||||
cdlist:'show compdef replay list'
|
||||
cdreplay:'replay compdefs (to be done after compinit)'
|
||||
cdclear:'clear compdef replay list'
|
||||
)
|
||||
|
||||
_arguments -C \
|
||||
'1: :->command'\
|
||||
'*: :->argument' && ret=0
|
||||
|
||||
case $state in
|
||||
command)
|
||||
_describe -t commands "Zplugin command" commands && ret=0
|
||||
;;
|
||||
argument)
|
||||
case $words[2] in
|
||||
help)
|
||||
_message "Hit enter to get usage information" && ret=0
|
||||
;;
|
||||
man)
|
||||
_message "Hit enter to view manual" && ret=0
|
||||
;;
|
||||
zstatus)
|
||||
_message "Hit enter to get overall status information" && ret=0
|
||||
;;
|
||||
load|light|update|status|compile|stress|cd|edit|glance|changes)
|
||||
typeset -a plugins
|
||||
plugins=( "$ZPLG_PLUGINS_DIR"/*(N:t) )
|
||||
plugins=( "${plugins[@]/---//}" )
|
||||
plugins=( "${plugins[@]:#_local/zplugin}" )
|
||||
plugins=( "${plugins[@]:#custom}" )
|
||||
|
||||
_wanted plugins expl "Plugins" \
|
||||
compadd "$@" -a - plugins && ret=0
|
||||
;;
|
||||
unload|report)
|
||||
typeset -a plugins
|
||||
plugins=( "${ZPLG_REGISTERED_PLUGINS[@]:#_local/zplugin}" )
|
||||
_wanted plugins expl "Plugins" \
|
||||
compadd "$@" -a - plugins && ret=0
|
||||
;;
|
||||
all-reports)
|
||||
_message "Hit enter to get all reports (for all loaded plugins)" && ret=0
|
||||
;;
|
||||
loaded|list)
|
||||
_message "Hit enter or give part of plugin name" && ret=0
|
||||
;;
|
||||
clist|completions)
|
||||
_message "Hit enter to get list of completions" && ret=0
|
||||
;;
|
||||
cdisable)
|
||||
# Find enabled completions
|
||||
typeset -a completions
|
||||
completions=( "$ZPLG_COMPLETIONS_DIR"/_*(N:t) )
|
||||
completions=( "${completions[@]#_}" )
|
||||
compadd "$@" -a - completions && ret=0
|
||||
;;
|
||||
cenable)
|
||||
# Find disabled
|
||||
typeset -a completions
|
||||
completions=( "$ZPLG_COMPLETIONS_DIR"/[^_]*(N:t) )
|
||||
compadd "$@" -a - completions && ret=0
|
||||
;;
|
||||
creinstall)
|
||||
# Complete only plugins that have any completions
|
||||
# We must iterate each plugin to check
|
||||
# for completions that can be installed
|
||||
typeset -a plugins completions
|
||||
local p c user plugin
|
||||
for p in "${ZPLG_PLUGINS_DIR[@]}"/*; do
|
||||
completions=( "$p"/_*(N) )
|
||||
for c in "${completions[@]}"; do
|
||||
p="${p:t}"
|
||||
user="${p%%---*}"
|
||||
plugin="${p#*---}"
|
||||
plugins+=( "$user/$plugin" )
|
||||
break
|
||||
done
|
||||
done
|
||||
_wanted plugins expl "Plugins" \
|
||||
compadd "$@" -a - plugins && ret=0
|
||||
;;
|
||||
cuninstall)
|
||||
# We must iterate each plugin and check if
|
||||
# it has completions that are installed
|
||||
typeset -a plugins completions
|
||||
local p c user plugin
|
||||
for p in "${ZPLG_PLUGINS_DIR[@]}"/*; do
|
||||
completions=( "$p"/_*(N) )
|
||||
for c in "${completions[@]}"; do
|
||||
cfile="${c:t}"
|
||||
bkpfile="${cfile#_}"
|
||||
# Completion installed, either enabled or disabled?
|
||||
if [[ -e "$ZPLG_COMPLETIONS_DIR"/"$cfile" || -e "$ZPLG_COMPLETIONS_DIR"/"$bkpfile" ]]; then
|
||||
p="${p:t}"
|
||||
user="${p%%---*}"
|
||||
plugin="${p#*---}"
|
||||
plugins+=( "$user/$plugin" )
|
||||
break
|
||||
fi
|
||||
done
|
||||
done
|
||||
_wanted plugins expl "Plugins" \
|
||||
compadd "$@" -a - plugins && ret=0
|
||||
;;
|
||||
compinit)
|
||||
_message "Hit enter to refresh completion system" && ret=0
|
||||
;;
|
||||
snippet)
|
||||
typeset -a list
|
||||
list=( "-f" )
|
||||
_files || _wanted soptions expl "Options" \
|
||||
compadd "$@" -a - list
|
||||
;;
|
||||
dstart|dtrace)
|
||||
_message "Hit enter to start tracking this session" && ret=0
|
||||
;;
|
||||
dstop)
|
||||
_message "Hit enter to stop tracking this session" && ret=0
|
||||
;;
|
||||
dunload)
|
||||
_message "Hit enter to revert changes recorded between dstart and dstop" && ret=0
|
||||
;;
|
||||
dreport)
|
||||
_message "Hit enter to show report of what was going on in session" && ret=0
|
||||
;;
|
||||
dclear)
|
||||
_message "Hit enter to clear report of what was going on in session" && ret=0
|
||||
;;
|
||||
compile-all)
|
||||
_message 'Hit enter to compile all downloaded plugins' && ret=0
|
||||
;;
|
||||
uncompile)
|
||||
typeset -a plugins
|
||||
plugins=( "$ZPLG_PLUGINS_DIR"/*(N) )
|
||||
|
||||
typeset -a show_plugins p matches
|
||||
for p in "${plugins[@]}"; do
|
||||
matches=( $p/*.zwc(N) )
|
||||
if [ "$#matches" -ne "0" ]; then
|
||||
p="${p:t}"
|
||||
[ "$p" = "_local---zplugin" ] && continue
|
||||
[ "$p" = "custom" ] && continue
|
||||
p="${p/---//}"
|
||||
show_plugins+=( "$p" )
|
||||
fi
|
||||
done
|
||||
|
||||
_wanted plugins expl "Plugins" \
|
||||
compadd "$@" -a - show_plugins && ret=0
|
||||
;;
|
||||
uncompile-all)
|
||||
_message 'Hit enter remove compiled versions of all downloaded plugins' && ret=0
|
||||
;;
|
||||
compiled)
|
||||
_message 'Hit enter to get list of compiled plugins' && ret=0
|
||||
;;
|
||||
cdlist)
|
||||
_message 'Hit enter to show compdef replay list' && ret=0
|
||||
;;
|
||||
cdreplay)
|
||||
_message 'Hit enter to replay recorded compdefs' && ret=0
|
||||
;;
|
||||
cdclear)
|
||||
_message 'Hit enter to clear compdef replay list' && ret=0
|
||||
;;
|
||||
recently)
|
||||
typeset -a timespecs
|
||||
timespecs=(
|
||||
"3 days":"code modified during last 3 days"
|
||||
"1 week":"code modified during last 7 days (default)"
|
||||
"1 month":"code modified during last month"
|
||||
)
|
||||
_describe -t timespecs "Time spec" timespecs && ret=0
|
||||
;;
|
||||
create)
|
||||
_message 'Plugin spec or just enter, to create new plugin' && ret=0
|
||||
;;
|
||||
*)
|
||||
ret=1
|
||||
;;
|
||||
esac
|
||||
esac
|
||||
|
||||
return "$ret"
|
||||
735
doc/CHANGELOG.md
735
doc/CHANGELOG.md
|
|
@ -1,735 +0,0 @@
|
|||
<!-- START doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
<!-- DON'T EDIT THIS SECTION, INSTEAD RE-RUN doctoc TO UPDATE -->
|
||||
|
||||
**Table of Contents** *generated with [DocToc](https://github.com/thlorenz/doctoc)*
|
||||
|
||||
- [Changelog](#changelog)
|
||||
|
||||
<!-- END doctoc generated TOC please keep comment here to allow auto update -->
|
||||
|
||||
# Changelog
|
||||
|
||||
All notable changes to this project will be documented in this file.
|
||||
|
||||
- 29-11-2021
|
||||
- zinit calls no longer silently fail when ices such as `atclone`, `atpull` or `compile` fail. Any hook returning with
|
||||
!= 0 will log a warning to stdout at runtime:
|
||||
|
||||
```zsh
|
||||
zinit null atclone'echo "intentional failure"; return 69' \
|
||||
for zdharma-continuum/null
|
||||
echo $?
|
||||
69
|
||||
```
|
||||
|
||||
- 28-11-2021
|
||||
- **‼️ BREAKING CHANGE** zinit now requires [jq](https://github.com/stedolan/jq) for JSON parsing. This only affects
|
||||
the `pack` ice. Users who do not have jq installed will be greeted with a warning when they try to install packages.
|
||||
To install jq with zinit, you can follow
|
||||
[these instructions in the wiki](https://github.com/zdharma-continuum/zinit/wiki/%F0%9F%A7%8A-Recommended-ices#jq)
|
||||
- `zinit pack` now better supports installation from local files (previously only relative paths worked), and **custom
|
||||
repositories!** By default, zinit uses
|
||||
[zhdarma-continuum/zinit-packages](https://github.com/p/zdharma-continuum/zinit-packages).
|
||||
|
||||
To use a custom repo you can set `ZINIT[PACKAGES_REPO]=github_org/repo`.
|
||||
|
||||
For installing from a specific branch you can:
|
||||
|
||||
1. Leverage the `ver` ice (eg: `ver"my-branch`)
|
||||
1. Override zinit's default branch with `ZINIT[PACKAGES_BRANCH]=my-branch`
|
||||
|
||||
zinit package repos that are not hosted on GitHub can be installed from the local filesystem like so:
|
||||
`zinit pack"local/path/to/package.json:profile" for mypackage`
|
||||
|
||||
- 22-11-2021
|
||||
- We updated zinit's main branch from `master` to `main`. `zinit self-update` will try to update the branch locally.
|
||||
If it fails please try to:
|
||||
|
||||
```zsh
|
||||
cd ${ZINIT[BIN_DIR]}
|
||||
git branch -m master main
|
||||
git fetch origin
|
||||
git branch -u origin/main main
|
||||
git remote set-head origin -a
|
||||
```
|
||||
|
||||
- 21-11-2021
|
||||
|
||||
- [(z)unit tests](https://github.com/zdharma-continuum/zinit/actions/workflows/tests.yaml) have been added to our dear
|
||||
repository. This should help us to sniff out some bugs and improve the overall quality of zinit. Stay tuned! More
|
||||
information available [here](https://github.com/zdharma-continuum/zinit/pull/96).
|
||||
|
||||
- 20-11-2021
|
||||
|
||||
- zinit is now [XDG compliant](https://specifications.freedesktop.org/basedir-spec/basedir-spec-latest.html). This
|
||||
means that the default value of `ZINIT[HOME_DIR]` is now `XDG_DATA_HOME/zinit`, ie `HOME/.local/share/zinit`, we
|
||||
won't clutter your `HOME` anymore! Fear not though: if you update zinit without moving your config to the new
|
||||
default location it will still fall back to `HOME/.zinit` if this directory exists. In the same spirit, if you
|
||||
overrode `ZINIT[HOME_DIR]` yourself in your `zshrc` we will use that value instead. NOTE: Since its rewrite the
|
||||
installer has been installing zinit's repo to `XDG_DATA_HOME/zinit/zinit.git` (see 16-11-2021 entry)
|
||||
|
||||
- 18-11-2021
|
||||
|
||||
- The packages (`zinit pack`) have all been migrated to
|
||||
[a new repository](https://github.com/zdharma-continuum/zinit-packages). Nothing fundamentally changes for users,
|
||||
the original repos have only been archived and not deleted, so that older zinit versions can still use these.
|
||||
|
||||
For more information, please refer to [this issue](https://github.com/zdharma-continuum/zinit/issues/69) and/or to
|
||||
[the corresponding PR](https://github.com/zdharma-continuum/zinit/pull/75)
|
||||
|
||||
- The zinit module has been relocated to [its own repository](https://github.com/zdharma-continuum/zinit-module)
|
||||
|
||||
* 17-11-2021
|
||||
- Containers! If you want to try out zinit inside a container, you can now. Several versions of zsh are available, as
|
||||
well as arm64. Check out the available tags on
|
||||
[ghcr](https://github.com/zdharma-continuum/zinit/pkgs/container/zinit).
|
||||
|
||||
```shell
|
||||
docker run -it --rm ghcr.io/zdharma-continuum/zinit:latest
|
||||
```
|
||||
|
||||
- 16-11-2021
|
||||
- A brand-new installer has been developed. A few new features have been added. There are a bunch of new env vars you
|
||||
can set:
|
||||
|
||||
- `NO_INPUT=1`: non-interactive mode (`NO_INPUT=1`)
|
||||
- `NO_EDIT=1`: do not modify `.zshrc`
|
||||
- `ZSHRC=/home/user01/.config/zsh/zshrc`: custom path to your `.zshrc`
|
||||
- `ZINIT_REPO=zdharma-continuum/zinit`: Install zinit from a custom GitHub repo
|
||||
- `ZINIT_BRANCH=master`: zinit branch to install
|
||||
- `ZINIT_COMMIT=master`: zinit commit to install (takes precedence over `ZINIT_BRANCH`)
|
||||
- `ZINIT_INSTALL_DIR=~/.local/share/zinit/zinit.git`: Where to install the zinit repo
|
||||
|
||||
⚠️ Please note that the download URL for the installer has changed. It is now:
|
||||
https://raw.githubusercontent.com/zdharma-continuum/zinit/HEAD/scripts/install.sh
|
||||
|
||||
For more details check out [PR #61](https://github.com/zdharma-continuum/zinit/pull/61)
|
||||
|
||||
- 11-11-2021
|
||||
|
||||
- The annexes repos have been renamed to improve discoverability. They used to be called `z-a-${name}` and have been
|
||||
renamed to `zinit-annex-${name}`. You don't *need* to update your configs right away since GitHub redirects to the
|
||||
new URLs.
|
||||
|
||||
- 06-11-2021
|
||||
|
||||
- 🚧 zinit has a new home: https://github.com/zdharma-continuum/zinit
|
||||
- The migration from @zdharma, @Zsh-Packages and @zinit-zsh is still in progress. If you are interested in helping
|
||||
or want to let us know that a particular project is missing, please head to
|
||||
[I_WANT_TO_HELP](https://github.com/zdharma-continuum/I_WANT_TO_HELP/issues?q=is%3Aissue+is%3Aopen+sort%3Aupdated-desc)
|
||||
- 📚 zinit now ensures that the man dirs under `$ZPFX/man` are created on startup. Please note that these directories
|
||||
will not necessarily be part of your `manpath`. You may need to set `$MANPATH`. See #8 (and #7) for more details.
|
||||
|
||||
- 21-01-2020
|
||||
|
||||
- A few tips for the project rename following the field reports (the issues created by users):
|
||||
- the `ZPLGM` hash is now `ZINIT`,
|
||||
- the annexes are moved under [zinit-zsh](https://github.com/zinit-zsh) organization (it needs a logo, could you
|
||||
create one, if you're skilled in graphics?).
|
||||
|
||||
- 19-01-2020
|
||||
|
||||
- The name has been changed to **Zinit** based on the results of the
|
||||
[poll](https://web.archive.org/web/20201008014128/https://github.com/zdharma/zinit/issues/235)
|
||||
- In general, you don't have to do anything after the name change.
|
||||
- Only a run of `zinit update --all` might be necessary.
|
||||
- You might also want to rename your `zplugin` calls in `zshrc` to `zinit`.
|
||||
- Zinit will reuse `~/.zplugin` directory if it exists, otherwise it'll create `~/.zinit`.
|
||||
|
||||
- 15-01-2020
|
||||
|
||||
- There's a new function, `zpextract`, which unpacks the given file. It supports many formats (notably also `dmg`
|
||||
images) – if there's a format that's unsupported please don't hesitate to
|
||||
[make a request](https://github.com/zdharma-continuum/zinit/issues/new?assignees=&labels=%F0%9F%8E%81+feature+request%2C%F0%9F%8E%B2+triage&template=feature-request.yml&title=%F0%9F%8E%81+Feature+request%3A+)
|
||||
for it to be added. A few facts:
|
||||
- the function is available only at the time of the plugin/snippet installation,
|
||||
- it's to be used within `atclone` and `atpull` ices,
|
||||
- it has an optional `--move` option which moves all the files from a subdirectory up one level,
|
||||
- one other option `--norm` prevents the archive from being deleted upon unpacking.
|
||||
- snippets now aren't re-downloaded unless they're newer on the HTTP server; use this with the `--norm` option of
|
||||
`zpextract` to prevent unnecessary updates; for example, the
|
||||
[firefox-dev package](https://github.com/zdharma-continuum/zsh-package-firefox-dev) uses this option for this
|
||||
purpose,
|
||||
- GitHub doesn't report proper `Last-Modified` HTTP server for the files in the repositories so the feature doesn't
|
||||
yet work with such files.
|
||||
|
||||
- 13-12-2019
|
||||
|
||||
- The packages have been disconnected from NPM registry and now live only on Zsh Packages organization. Publishing to
|
||||
NPM isn't needed.
|
||||
|
||||
- There are two interesting packages, [any-gem](https://github.com/zdharma-continuum/zsh-package-any-gem) and
|
||||
[any-node](https://github.com/zdharma-continuum/zsh-package-any-node). They allow to install any Gem(s) or Node
|
||||
module(s) locally in a newly created plugin directory. For example:
|
||||
|
||||
```zsh
|
||||
zinit pack param='GEM -> rails' for any-gem
|
||||
zinit pack param='MOD -> doctoc' for any-node
|
||||
# To have the command in zshrc, add an id-as'' ice so that
|
||||
# Zinit knows that the package is already installed
|
||||
# (also: the Unicode arrow is allowed)
|
||||
zinit id-as=jekyll pack param='GEM → jekyll' for any-gem
|
||||
```
|
||||
|
||||
The binaries will be exposed without altering the PATH via shims
|
||||
([Bin-Gem-Node](https://github.com/zinit-zsh/zinit-annex-bin-gem-node) annex is needed). Shims are correctly removed
|
||||
when deleting a plugin with `zinit delete …`.
|
||||
|
||||
- 11-12-2019
|
||||
|
||||
- Zinit now supports installing special-Zsh NPM packages! Bye-bye the long and complex ice-lists! Check out the
|
||||
[Wiki](https://zdharma-continuum.github.io/zinit/wiki/NPM-Packages/) for an introductory document on the feature.
|
||||
|
||||
- 25-11-2019
|
||||
|
||||
- A new subcommand `run` that executes a command in the given plugin's directory. It has an `-l` option that will
|
||||
reuse the previously provided plugin. So that it's possible to do:
|
||||
|
||||
```zsh
|
||||
zplg run my/plugin ls
|
||||
zplg run -l cat \*.plugin.zsh
|
||||
zplg run -l pwd
|
||||
```
|
||||
|
||||
- 07-11-2019
|
||||
|
||||
- Added a prefix-char: `@` that can be used before plugins if their name collides with one of the ice-names. For
|
||||
example `sharkdp/fd` collides with the `sh` ice (which causes the plugin to be loaded with the POSIX `sh` emulation
|
||||
applied). To load it, do e.g.:
|
||||
|
||||
```zsh
|
||||
zinit as"null" wait"2" lucid from"gh-r" for \
|
||||
mv"exa* -> exa" sbin"exa" ogham/exa \
|
||||
mv"fd* -> fd" sbin"fd/fd" @sharkdp/fd \
|
||||
sbin"fzf" junegunn/fzf-bin
|
||||
```
|
||||
|
||||
i.e.: precede the plugin name with `@`. Note: `sbin''` is an ice added by the
|
||||
[zinit-annex-bin-gem-node](https://github.com/zinit/zinit-annex-bin-gem-node) annex, it provides the command to the
|
||||
command line without altering `$PATH`.
|
||||
|
||||
See the [Zinit Wiki](https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/) for more information on the
|
||||
for-syntax.
|
||||
|
||||
- 06-11-2019
|
||||
|
||||
- A new syntax, called for-syntax. Example:
|
||||
|
||||
```zsh
|
||||
zinit as"program" atload'print Hi!' for \
|
||||
atinit'print First!' zdharma/null \
|
||||
atinit'print Second!' svn OMZ::plugins/git
|
||||
```
|
||||
|
||||
The output:
|
||||
|
||||
```
|
||||
First!
|
||||
Hi!
|
||||
Second!
|
||||
Hi!
|
||||
```
|
||||
|
||||
And also:
|
||||
|
||||
```zsh
|
||||
% print -rl $path | egrep -i '(/git|null)'
|
||||
/root/.zinit/snippets/OMZ::plugins/git
|
||||
/root/.zinit/plugins/zdharma---null
|
||||
```
|
||||
|
||||
To load in light mode, use a new `light-mode` ice. More examples and information can be found on the
|
||||
[Zinit Wiki](https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/).
|
||||
|
||||
- 03-11-2019
|
||||
|
||||
- A new value for the `as''` ice – `null`. Specifying `as"null"` is like specifying `pick"/dev/null" nocompletions`,
|
||||
i.e.: it disables the sourcing of the default script file of a plugin or snippet and also disables the installation
|
||||
of completions.
|
||||
|
||||
- 30-10-2019
|
||||
|
||||
- A new ice `trigger-load''` – create a function that loads given plugin/snippet, with an option (to use it, precede
|
||||
the ice content with `!`) to automatically forward the call afterwards. Example use:
|
||||
|
||||
```zsh
|
||||
# Invoking the command `crasis' will load the plugin that
|
||||
# provides the function `crasis', and it will be then
|
||||
# immediately invoked with the same arguments
|
||||
zinit ice trigger-load'!crasis'
|
||||
zinit load zdharma/zinit-crasis
|
||||
```
|
||||
|
||||
- 22-10-2019
|
||||
|
||||
- A new ice `countdown` – causes an interruptable (by Ctrl-C) countdown 5…4…3…2…1…0 to be displayed before running the
|
||||
`atclone''`, `atpull''` and `make` ices.
|
||||
|
||||
- 21-10-2019
|
||||
|
||||
- The `times` command has a new option `-m` – it shows the **moments** of the plugin load times – i.e.: how late after
|
||||
loading Zinit a plugin has been loaded.
|
||||
|
||||
- 20-10-2019
|
||||
|
||||
- The `zinit` completion now completes also snippets! The command `snippet`, but also `delete`, `recall`, `edit`,
|
||||
`cd`, etc. all receive such completing.
|
||||
- The `ice` subcommand can now be skipped – just pass in the ices, e.g.:
|
||||
```zsh
|
||||
zinit atload"zicompinit; zicdreplay" blockf
|
||||
zinit light zsh-users/zsh-completions
|
||||
```
|
||||
- The `compile` command is able to compile snippets.
|
||||
- The plugins that add their subdirectories into `$fpath` can be now `blockf`-ed – the functions located in the dirs
|
||||
will be correctly auto-loaded.
|
||||
|
||||
- 12-10-2019
|
||||
|
||||
- Special value for the `id-as''` ice – `auto`. It sets the plugin/snippet ID automatically to the last component of
|
||||
its spec, e.g.:
|
||||
|
||||
```zsh
|
||||
zinit ice id-as"auto"
|
||||
zinit load robobenklein/zinc
|
||||
```
|
||||
|
||||
will load the plugin as `id-as'zinc'`.
|
||||
|
||||
- 14-09-2019
|
||||
|
||||
- There's a Vim plugin which extends syntax highlighting of zsh scripts with coloring of the Zinit commands.
|
||||
[Project homepage](https://github.com/zinit/zinit-vim-syntax).
|
||||
|
||||
- 13-09-2019
|
||||
|
||||
- New ice `aliases` which loads plugin with the aliases mechanism enabled. Use for plugins that define **and use**
|
||||
aliases in their scripts.
|
||||
|
||||
- 11-09-2019
|
||||
|
||||
- New ice-mods `sh`,`bash`,`ksh`,`csh` that load plugins (and snippets) with the **sticky emulation** feature of Zsh –
|
||||
all functions defined within the plugin will automatically switch to the desired emulation mode before executing and
|
||||
switch back thereafter. In other words it is now possible to load e.g. bash plugins with Zinit, provided that the
|
||||
emulation level done by Zsh is sufficient, e.g.:
|
||||
|
||||
```zsh
|
||||
zinit ice bash pick"bash_it.sh" \
|
||||
atinit"BASH_IT=${ZINIT[PLUGINS_DIR]}/Bash-it---bash-it" \
|
||||
atclone"yes n | ./install.sh"
|
||||
zinit load Bash-it/bash-it
|
||||
```
|
||||
|
||||
This script loads correctly thanks to the emulation, however it isn't functional because it uses `type -t …` to
|
||||
check if a function exists.
|
||||
|
||||
- 10-09-2019
|
||||
|
||||
- A new ice-mod `reset''` that ivokes `git reset --hard` (or the provided command) before `git pull` and `atpull''`
|
||||
ice. It can be used it to implement altering (i.e. patching) of the plugin's files inside the `atpull''` ice – `git`
|
||||
will report no conflicts when doing `pull`, and the changes can be then again introduced by the `atpull''` ice..
|
||||
|
||||
- Three new Zplugin annexes (i.e. [extensions](https://zdharma-continuum.github.io/zplugin/wiki/Annexes/)):
|
||||
|
||||
- [zinit-annex-man](https://github.com/zplugin/zinit-annex-man)
|
||||
|
||||
Generates man pages and code-documentation man pages from plugin's README.md and source files (the code
|
||||
documentation is obtained from [Zshelldoc](https://github.com/zdharma/zshelldoc)).
|
||||
|
||||
- [zinit-annex-test](https://github.com/zplugin/zinit-annex-test)
|
||||
|
||||
Runs tests (if detected `test' target in a `Makefile`or any`\*.zunit\` files) on plugin installation and non-empty
|
||||
update.
|
||||
|
||||
- [zinit-annex-patch-dl](https://github.com/zplugin/zinit-annex-patch-dl)
|
||||
|
||||
Allows easy download and applying of patches, to e.g. aid building a binary program equipped in the plugin.
|
||||
|
||||
- A new variable is being recognized by the installation script: `$ZPLG_BIN_DIR_NAME`. It configures the directory
|
||||
within `$ZPLG_HOME` to which Zplugin should be cloned.
|
||||
|
||||
- 09-08-2019
|
||||
|
||||
- A new ice-mod `wrap-track''` which gets `;`-separated list of functions that are to be tracked **once** when
|
||||
executing. In other words you can extend the tracking beyond the moment of loading of a plugin.
|
||||
- The unloading of Zle widgets is now more smart – it takes into account the chains of plugins that can overload the
|
||||
Zle widgets, and solves the interactions that result out of it.
|
||||
|
||||
- 29-07-2019
|
||||
|
||||
- `delete` now supports following options:
|
||||
- `--all` – deletes all plugins and snippets (a purge, similar to
|
||||
`rm -rf ${ZPLGM[PLUGINS_DIR]} ${ZPLGM[SNIPPETS_DIR]}`)
|
||||
- `--clean` – deletes only plugins and snippets that are **currently not loaded** in the current session.
|
||||
|
||||
- 09-07-2019
|
||||
|
||||
- Zplugin can now have **its own plugins**, called **z-plugins**! Check out an example but fully functional z-plugin
|
||||
[zdharma/z-p-submods](https://github.com/zdharma/z-p-submods) and a document that explains on how to implement your
|
||||
own z-plugin ([here](../../wiki/Z-PLUGINS)).
|
||||
|
||||
- 08-07-2019
|
||||
|
||||
- You can now do `zplugin ice wait ...` and it will work as `zplugin ice wait'0' ...` :) I.e. when there's no value to
|
||||
the `wait''` ice then a value of `0` is being substituted.
|
||||
|
||||
- 02-07-2019
|
||||
|
||||
- [Cooperation of Fast-Syntax-Highlighting and Zplugin](https://asciinema.org/a/254630) – a new precise highlighting
|
||||
for Zplugin in F-Sy-H.
|
||||
|
||||
- 01-07-2019
|
||||
|
||||
- `atclone''`, `atpull''` & `make''` get run in the same subshell, thus an e.g. export done in `atclone''` will be
|
||||
visible during the `make`.
|
||||
|
||||
- 26-06-2019
|
||||
|
||||
- `notify''` contents gets evaluated, i.e. can contain active code like `$(tail -1 /var/log/messages)`, etc.
|
||||
|
||||
- 23-06-2019
|
||||
|
||||
- New ice mod `subscribe''`/`on-update-of''` which works like the `wait''` ice-mod, i.e. defers loading of a plugin,
|
||||
but it **looks at modification time of the given file(s)**, and when it changes, it then triggers loading of the
|
||||
plugin/snippet:
|
||||
|
||||
```zsh
|
||||
% zplugin ice on-update-of'{~/files-*,/tmp/files-*}' lucid \
|
||||
atload"echo I have been loaded" \
|
||||
notify"Yes that's true :)"
|
||||
% zplugin load zdharma/null
|
||||
% touch ~/files-1
|
||||
The plugin has been loaded
|
||||
%
|
||||
Yes that's true :)
|
||||
```
|
||||
|
||||
The plugin/snippet will be sourced as many times as the file gets updated.
|
||||
|
||||
- 22-06-2019
|
||||
|
||||
- New ice mod `reset-prompt` that will issue `zle .reset-prompt` after loading the plugin or snippet, causing the
|
||||
prompt to be recomputed. Useful with themes & turbo-mode.
|
||||
|
||||
- New ice-mod `notify''` which will cause to display an under-prompt notification when the plugin or snippet gets
|
||||
loaded. E.g.:
|
||||
|
||||
```zsh
|
||||
% zplugin ice wait"0" lucid notify"zdharma/null has been loaded"
|
||||
% zplugin light zdharma/null
|
||||
%
|
||||
zdharma/null has been loaded
|
||||
```
|
||||
|
||||
In case of problems with the loading a warning message will be output:
|
||||
|
||||
```
|
||||
% zplugin ice notify atload'return 7'
|
||||
% zplugin light zdharma/null
|
||||
%
|
||||
notify: Plugin not loaded / loaded with problem, the return code: 7
|
||||
```
|
||||
|
||||
Refer to [Ice Modifiers](#ice-modifiers) section for a complete description.
|
||||
|
||||
- 29-05-2019
|
||||
|
||||
- Turbo-Mode, i.e. the `wait''` ice-mode now supports a suffix – the letter `a`, `b` or `c`. The meaning is
|
||||
illustrated by the following example:
|
||||
|
||||
```zsh
|
||||
zplugin ice wait"0b" as"command" pick"wd.sh" atinit"echo Firing 1" lucid
|
||||
zplugin light mfaerevaag/wd
|
||||
zplugin ice wait"0a" as"command" pick"wd.sh" atinit"echo Firing 2" lucid
|
||||
zplugin light mfaerevaag/wd
|
||||
|
||||
# The output
|
||||
Firing 2
|
||||
Firing 1
|
||||
```
|
||||
|
||||
As it can be seen, the second plugin has been loaded first. That's because there are now three sub-slots (the `a`,
|
||||
`b` and `c`) in which the plugin/snippet loadings can be put into. Plugins from the same time-slot with suffix `a`
|
||||
will be loaded before plugins with suffix `b`, etc.
|
||||
|
||||
In other words, instead of `wait'1'` you can enter `wait'1a'`, `wait'1b'` and `wait'1c'` – to this way **impose
|
||||
order** on the loadings **regardless of the order of `zplugin` commands**.
|
||||
|
||||
- 26-05-2019
|
||||
|
||||
- Turbo-Mode now divides the scheduled events (i.e. loadings of plugins or snippets) into packs of 5. In other words,
|
||||
after loading each series of 5 plugins or snippets the prompt is activated, i.e. it is feed an amount of CPU time.
|
||||
This will help to deliver the promise of background loading without interferences visible to the user. If you have
|
||||
some two slow-loading plugins and/or snippets, you can put them into some separate blocks of 5 events.
|
||||
|
||||
- 18-05-2019
|
||||
|
||||
- New ice-mod `nocd` – it prevents changing current directory into the plugin's directory before evaluating
|
||||
`atinit''`, `atload''` etc. ice-mods.
|
||||
|
||||
- 12-03-2019
|
||||
|
||||
- Finally reorganizing the `README.md`. Went on asciidoc path, the side-documents are written in it and the
|
||||
`README.md` will also be converted (example page: [Introduction](doc/INTRODUCTION.adoc))
|
||||
|
||||
- 12-10-2018
|
||||
|
||||
- New `id-as''` ice-mod. You can nickname a plugin or snippet, to e.g. load it twice, with different `pick''` ice-mod,
|
||||
or from Github binary releases and regular Github repository at the same time. More information in
|
||||
[blog post](https://zdharma-continuum.github.io/2018-10-12/Nickname-a-plugin-or-snippet).
|
||||
|
||||
- 30-08-2018
|
||||
|
||||
- New `as''` ice-mod value: `completion`. Can be used to install completion-only "plugins", even single files:
|
||||
|
||||
```zsh
|
||||
zplugin ice as"completion" mv"hub* -> _hub"
|
||||
zplugin snippet https://github.com/github/hub/blob/master/etc/hub.zsh_completion
|
||||
```
|
||||
|
||||
- Uplift of Git-output, it now has an animated progress-bar:
|
||||
|
||||

|
||||
|
||||
- 15-08-2018
|
||||
|
||||
- New `$ZPLGM` field `COMPINIT_OPTS` (also see [Customizing Paths](#customizing-paths--other)). You can pass `-C` or
|
||||
`-i` there to mute the `insecure directories` messages. Typical use case could be:
|
||||
```zsh
|
||||
zplugin ice wait"5" atinit"ZPLGM[COMPINIT_OPTS]=-C; zpcompinit; zpcdreplay" lucid
|
||||
zplugin light zdharma/fast-syntax-highlighting
|
||||
```
|
||||
|
||||
- 13-08-2018
|
||||
|
||||
- `self-update` (subcommand used to update Zplugin) now lists new commits downloaded by the update:
|
||||

|
||||
|
||||
- New subcommand `bindkeys` that lists what bindkeys each plugin has set up.
|
||||
|
||||
- 25-07-2018
|
||||
|
||||
- If you encountered a problem with loading Turbo-Mode plugins, it is fixed now. This occurred in versions available
|
||||
between `10` and `23` of July. Issue `zplugin self-update` if you installed/updated in this period.
|
||||
- New bug-fix release `v2.07`.
|
||||
|
||||
- 13-07-2018
|
||||
|
||||
- New `multisrc''` ice, it allows to specify multiple files for sourcing and it uses brace expansion syntax, so for
|
||||
example you can:
|
||||
```zsh
|
||||
zplugin ice depth"1" multisrc="lib/{functions,misc}.zsh" pick"/dev/null"; zplugin load robbyrussell/oh-my-zsh
|
||||
zplugin ice svn multisrc"{functions,misc}.zsh" pick"/dev/null"; zplugin snippet OMZ::lib
|
||||
array=( {functions,misc}.zsh ); zplg ice svn multisrc"\${array[@]}" pick"/dev/null"; zplugin snippet OMZ::lib
|
||||
array=( {functions,misc}.zsh ); zplg ice svn multisrc"${array[@]}" pick"/dev/null"; zplugin snippet OMZ::lib
|
||||
array=( {functions,misc}.zsh ); zplg ice svn multisrc"\$array" pick"/dev/null"; zplugin snippet OMZ::lib
|
||||
array=( {functions,misc}.zsh ); zplg ice svn multisrc"$array" pick"/dev/null"; zplugin snippet OMZ::lib
|
||||
zplugin ice svn multisrc"misc.zsh functions.zsh" pick"/dev/null"; zplugin snippet OMZ::lib
|
||||
```
|
||||
|
||||
- 12-07-2018
|
||||
|
||||
- For docker and new machine provisioning, there's a trick that allows to install all
|
||||
[turbo-mode](#turbo-mode-zsh--53) plugins by scripting:
|
||||
|
||||
```zsh
|
||||
zsh -i -c -- '-zplg-scheduler burst'
|
||||
```
|
||||
|
||||
- 10-07-2018
|
||||
|
||||
- Ice `wait'0'` now means actually short time – you can load plugins and snippets **very quickly** after prompt.
|
||||
|
||||
- 02-03-2018
|
||||
|
||||
- Zplugin exports `$ZPFX` parameter. Its default value is `~/.zplugin/polaris` (user can override it before sourcing
|
||||
Zplugin). This directory is like `/usr/local`, a prefix for installed software, so it's possible to use ice like
|
||||
`make"PREFIX=$ZPFX"` or `atclone"./configure --prefix=$ZPFX"`. Zplugin also setups `$MANPATH` pointing to the
|
||||
`polaris` directory. Checkout [gallery](GALLERY.md) for examples.
|
||||
- [New README section](#hint-extending-git) about extending Git with Zplugin.
|
||||
|
||||
- 05-02-2018
|
||||
|
||||
- I work much on this README however multi-file Wiki might be better to read – it
|
||||
[just has been created](https://github.com/zdharma/zplugin/wiki).
|
||||
|
||||
- 16-01-2018
|
||||
|
||||
- New ice-mod `compile` which takes pattern to select additional files to compile, e.g.
|
||||
`zplugin ice compile"(hsmw-*|history-*)"` (for `zdharma/history-search-multi-word` plugin). See
|
||||
[Ice Modifiers](#ice-modifiers).
|
||||
|
||||
- 14-01-2018
|
||||
|
||||
- Two functions have been exposed: `zpcdreplay` and `zpcompinit`. First one invokes compdef-replay, second one is
|
||||
equal to `autoload compinit; compinit` (it also respects `$ZPLGM[ZCOMPDUMP_PATH]`). You can use e.g.
|
||||
`atinit'zpcompinit'` ice-mod in a syntax-highlighting plugin, to initialize completion right-before setting up
|
||||
syntax highlighting (because that should be done at the end).
|
||||
|
||||
- 13-01-2018
|
||||
|
||||
- New customizable path `$ZPLGM[ZCOMPDUMP_PATH]` that allows to point zplugin to non-standard `.zcompdump` location.
|
||||
- Tilde-expansion is now performed on the [customizable paths](#customizing-paths--other) – you can assign paths like
|
||||
`~/.zplugin`, there's no need to use `$HOME/.zplugin`.
|
||||
|
||||
- 31-12-2017
|
||||
|
||||
- For the new year there's a new feature: user-services spawned by Zshell :) Check out
|
||||
[available services](https://github.com/zservices). They are configured like their READMEs say, and controlled via:
|
||||
|
||||
```
|
||||
% zplugin srv redis next # current serving shell will drop the service, next Zshell will pick it up
|
||||
% zplugin srv redis quit # the serving shell will quit managing the service, next Zshell will pick it up
|
||||
% zplugin srv redis stop # stop serving, do not pass it to any shell, just hold the service
|
||||
% zplugin srv redis start # start stopped service, without changing the serving shell
|
||||
% zplugin srv redis restart # restart service, without changing the serving shell
|
||||
```
|
||||
|
||||
This feature allows to configure everything in `.zshrc`, without the the need to deal with `systemd` or `launchd`,
|
||||
and can be useful e.g. to configure shared-variables (across Zshells), stored in `redis` database (details on
|
||||
[zservices/redis](https://github.com/zservices/redis)).
|
||||
|
||||
- 24-12-2017
|
||||
|
||||
- Xmas present – [fast-syntax-highlighting](https://github.com/zdharma/fast-syntax-highlighting) now highlights the
|
||||
quoted part in `atinit"echo Initializing"`, i.e. it supports ICE syntax :)
|
||||
|
||||
- 08-12-2017
|
||||
|
||||
- SVN snippets are compiled on install and update
|
||||
- Resolved how should ice-mods be remembered – general rule is that using `zplugin ice ...` makes memory-saved and
|
||||
disk-saved ice-mods not used, and replaced on update. Calling e.g. `zplugin update ...` without preceding `ice` uses
|
||||
memory, then disk-saved ices.
|
||||
|
||||
- 07-12-2017
|
||||
|
||||
- New subcommand `delete` that obtains plugin-spec or URL and deletes plugin or snippet from disk. It's good to forget
|
||||
wrongly passed Ice-mods (which are storred on disk e.g. for `update --all`).
|
||||
|
||||
- 04-12-2017
|
||||
|
||||
- It's possible to set plugin loading and unloading on condition. ZPlugin supports plugin unloading, so it's possible
|
||||
to e.g. **unload prompt and load another one**, on e.g. directory change. Checkout
|
||||
[full story](#automatic-loadunload-on-condition) and [Asciinema video](https://asciinema.org/a/150825).
|
||||
|
||||
- 29-11-2017
|
||||
|
||||
- **[Turbo Mode](https://github.com/zdharma/zplugin#turbo-mode-zsh--53)** – **39-50% or more faster Zsh startup!**
|
||||
- Subcommand `update` can update snippets, via given URL (up to this point snippets were updated via
|
||||
`zplugin update --all`).
|
||||
- Completion management is enabled for snippets (not only plugins).
|
||||
|
||||
- 13-11-2017
|
||||
|
||||
- New ice modifier – `make`. It causes the `make`-command to be executed after cloning or updating plugins and
|
||||
snippets. For example there's `Zshelldoc` that uses `Makefile` to build final scripts:
|
||||
|
||||
```SystemVerilog
|
||||
zplugin ice as"program" pick"build/zsd*" make; zplugin light zdharma/zshelldoc
|
||||
```
|
||||
|
||||
The above doesn't trigger the `install` target, but this does:
|
||||
|
||||
```SystemVerilog
|
||||
zplugin ice as"program" pick"build/zsd*" make"install PREFIX=/tmp"; zplugin light zdharma/zshelldoc
|
||||
```
|
||||
|
||||
- Fixed problem with binary-release selection (`from"gh-r"`) by adding Ice-mod `bpick`, which should be used for this
|
||||
purpose instead of `pick`, which selects file within plugin tree.
|
||||
|
||||
- 06-11-2017
|
||||
|
||||
- The subcommand `completions` now prints `3` completions per line (not `1`). This makes large amount of completions to look
|
||||
better. Argument can be given, e.g. `6`, to increase the grouping.
|
||||
- New Ice-mod `silent` that mutes `stderr` & `stdout` of a plugin or snippet.
|
||||
|
||||
- 04-11-2017
|
||||
|
||||
- New subcommand `ls` which lists snippets-directory in a formatted and colorized manner. Example:
|
||||
|
||||

|
||||
|
||||
- 29-10-2017
|
||||
|
||||
- Subversion protocol (supported by Github) can be used to clone **subdirectories** when using snippets. This allows
|
||||
to load multi-file snippets. For example:
|
||||
|
||||
```SystemVerilog
|
||||
zstyle ':prezto:module:prompt' theme smiley
|
||||
zplugin ice svn silent; zplugin snippet PZT::modules/prompt
|
||||
```
|
||||
|
||||
- Snippets support `Prezto` modules (with dependencies), and can use **PZT::** URL-shorthand, like in the example
|
||||
above. One can load `Prezto` module as single file snippet, or use Subversion to download whole directory (see also
|
||||
description of [Ice Modifiers](#ice-modifiers)):
|
||||
|
||||
```zsh
|
||||
# Single file snippet, URL points to file
|
||||
|
||||
zplg snippet PZT::modules/helper/init.zsh
|
||||
|
||||
# Multi-file snippet, URL points to directory to clone with Subversion
|
||||
# The file to source (init.zsh) is automatically detected
|
||||
|
||||
zplugin ice svn; zplugin snippet PZT::modules/prompt
|
||||
|
||||
# Use of Subversion to load an OMZ plugin
|
||||
|
||||
zplugin ice svn; zplugin snippet OMZ::plugins/git
|
||||
```
|
||||
|
||||
- Fixed a bug with `cURL` usage (snippets) for downloading, it will now be properly used
|
||||
|
||||
- 13-10-2017
|
||||
|
||||
- Snippets can use "**OMZ::**" prefix to easily point to `Oh-My-Zsh` plugins and libraries, e.g.:
|
||||
|
||||
```SystemVerilog
|
||||
zplugin snippet OMZ::lib/git.zsh
|
||||
zplugin snippet OMZ::plugins/git/git.plugin.zsh
|
||||
```
|
||||
|
||||
- 12-10-2017
|
||||
|
||||
- The `cd` subcommand can now obtain URL and move session to **snippet** directory
|
||||
|
||||
- The `times` subcommand now includes statistics on snippets. Also, entries are displayed in order of loading:
|
||||
|
||||
```zsh
|
||||
% zplugin times
|
||||
Plugin loading times:
|
||||
0.010 sec - OMZ::lib/git.zsh
|
||||
0.001 sec - OMZ::plugins/git/git.plugin.zsh
|
||||
0.003 sec - zdharma/history-search-multi-word
|
||||
0.003 sec - rimraf/k
|
||||
0.003 sec - zsh-users/zsh-autosuggestions
|
||||
```
|
||||
|
||||
- 24-09-2017
|
||||
|
||||
- **[Code documentation](zsdoc)** for contributors and interested people.
|
||||
|
||||
- 13-06-2017
|
||||
|
||||
- Plugins can now be absolute paths:
|
||||
|
||||
```SystemVerilog
|
||||
zplugin load %HOME/github/{directory}
|
||||
zplugin load /Users/sgniazdowski/github/{directory}
|
||||
zplugin load %/Users/sgniazdowski/github/{directory}
|
||||
```
|
||||
|
||||
Completions are not automatically installed, but user can run `zplg creinstall %HOME/github/{directory}`, etc.
|
||||
|
||||
- 23-05-2017
|
||||
|
||||
- New `ice` modifier: `if`, to which you can provide a conditional expression:
|
||||
|
||||
```SystemVerilog
|
||||
% zplugin ice if"(( 0 ))"
|
||||
% zplugin snippet --command https://github.com/b4b4r07/httpstat/blob/master/httpstat.sh
|
||||
% zplugin ice if"(( 1 ))"
|
||||
% zplugin snippet --command https://github.com/b4b4r07/httpstat/blob/master/httpstat.sh
|
||||
Setting up snippet httpstat.sh
|
||||
Downloading httpstat.sh...
|
||||
```
|
||||
138
doc/HACKING.md
138
doc/HACKING.md
|
|
@ -1,138 +0,0 @@
|
|||
# HACKING.md
|
||||
|
||||
## Documentation
|
||||
|
||||
### README: Update the table of contents
|
||||
|
||||
1. Install [doctoc](https://github.com/thlorenz/doctoc)
|
||||
2. To update the TOC, run the following command:
|
||||
|
||||
```zsh
|
||||
doctoc --github README.md
|
||||
```
|
||||
|
||||
### Update asciidoc and/or zshelldoc
|
||||
|
||||
> [!IMPORTANT]
|
||||
> Make sure you have [docker](https://www.docker.com/) or [podman](https://podman.io/) installed.
|
||||
|
||||
1. From the root of the repo, run:
|
||||
|
||||
```zsh
|
||||
make doc-container
|
||||
```
|
||||
|
||||
If, for some reason, you want to build the zshelldocs or the PDF manually, you'll need:
|
||||
|
||||
1. Patience, zsd is very finicky about locales. You have been warned.
|
||||
2. [zshelldoc (zsd)](https://github.com/zdharma-continuum/zshelldoc)
|
||||
3. [asciidoc](https://asciidoc.org/)
|
||||
4. `make doc`
|
||||
|
||||
### Generate the manpage (doc/zinit.1)
|
||||
|
||||
1. Install [pandoc](https://pandoc.org/)
|
||||
2. From the root of the repo run:
|
||||
|
||||
```zsh
|
||||
pandoc --standalone --to man README.md -o doc/zinit.1
|
||||
```
|
||||
|
||||
### Updating the gh-pages (zdharma-continuum.github.io)
|
||||
|
||||
1. Check out the [documentation branch](https://github.com/zdharma-continuum/zinit/tree/documentation)
|
||||
|
||||
```shell
|
||||
git fetch origin documentation
|
||||
git checkout documentation
|
||||
```
|
||||
|
||||
2. Do your modifications and push your changes
|
||||
3. Keep an eye on [the CI logs](https://github.com/zdharma-continuum/zinit/actions/workflows/gh-pages.yaml)
|
||||
4. If all went well, head to https://zdharma-continuum.github.io/ to see your changes live.
|
||||
|
||||
> [!NOTE]
|
||||
> If you really **need** to push directly, without CI, please refer to [the README in the
|
||||
documentation](https://github.com/zdharma-continuum/zinit/blob/documentation/README.md)
|
||||
|
||||
## Testing
|
||||
|
||||
We run our tests with [zunit](https://zunit.xyz).
|
||||
|
||||
To add a new test case:
|
||||
|
||||
1. Install [zunit](https://zunit.xyz) and [revolver](https://github.com/molovo/revolver):
|
||||
|
||||
```zsh
|
||||
zinit for \
|
||||
as"program" \
|
||||
atclone"ln -sfv revolver.zsh-completion _revolver" \
|
||||
atpull"%atclone" \
|
||||
pick"revolver" \
|
||||
@molovo/revolver \
|
||||
as"completion" \
|
||||
atclone"./build.zsh; ln -sfv zunit.zsh-completion _zunit" \
|
||||
atpull"%atclone" \
|
||||
sbin"zunit" \
|
||||
@zunit-zsh/zunit
|
||||
```
|
||||
|
||||
2. Create a new `.zunit` file in the `tests/` dir. Here's a template:
|
||||
|
||||
```zsh
|
||||
#!/usr/bin/env zunit
|
||||
|
||||
@setup {
|
||||
load setup
|
||||
setup
|
||||
}
|
||||
|
||||
@teardown {
|
||||
load teardown
|
||||
teardown
|
||||
}
|
||||
|
||||
@test 'zinit-annex-bin-gem-node installation' {
|
||||
# This spawns the official zinit container and executes a single zinit command
|
||||
# inside it
|
||||
run ./scripts/docker-run.sh --wrap --debug --zunit \
|
||||
zinit light as"null" for zdharma-continuum/null
|
||||
|
||||
# Verify the exit code of the command above
|
||||
assert $state equals 0
|
||||
assert "$output" contains "Downloading"
|
||||
|
||||
local artifact="${PLUGINS_DIR}/zdharma-continuum---null/readme.md"
|
||||
# Check if we downloaded the file correctly and if it is readable
|
||||
assert "$artifact" is_file
|
||||
assert "$artifact" is_readable
|
||||
}
|
||||
```
|
||||
|
||||
You should, of course, also check out the existing tests ;)
|
||||
|
||||
3. To run your new test:
|
||||
|
||||
```zsh
|
||||
zunit --verbose tests/your_test.zunit
|
||||
```
|
||||
|
||||
### Debugging tests
|
||||
|
||||
If you ever need to inspect the `ZINIT[HOME_DIR]` dir, where zinit's internal data is stored, you can do so by commenting
|
||||
out the `@teardown` section in your test. Then you can re-run said test and head over to `${TMPDIR:-/tmp}/zunit-zinit`.
|
||||
Good luck!
|
||||
|
||||
## Misc
|
||||
|
||||
### Get the list of supported ices
|
||||
|
||||
To get the list in a quick-and-dirty fashion, you issue:
|
||||
|
||||
```zsh
|
||||
zinit --help | tail -1
|
||||
```
|
||||
|
||||
See
|
||||
[zinit-autoload.zsh](https://github.com/zdharma-continuum/zinit/blob/2feb41cf70d2f782386bbaa6fda691e3bdc7f1ac/zinit-autoload.zsh#L3445-L3447)
|
||||
for implementation details.
|
||||
357
doc/db/emulksh_options.txt
Normal file
357
doc/db/emulksh_options.txt
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
zsh-5.0.8, OS X 10.11.2
|
||||
|
||||
non-interactive zsh, emulate zsh:
|
||||
|
||||
noaliases off
|
||||
allexport off
|
||||
noalwayslastprompt off
|
||||
alwaystoend off
|
||||
noappendhistory off
|
||||
autocd off
|
||||
autocontinue off
|
||||
noautolist off
|
||||
noautomenu off
|
||||
autonamedirs off
|
||||
noautoparamkeys off
|
||||
noautoparamslash off
|
||||
autopushd off
|
||||
noautoremoveslash off
|
||||
autoresume off
|
||||
nobadpattern off
|
||||
nobanghist off
|
||||
nobareglobqual off
|
||||
bashautolist off
|
||||
bashrematch off
|
||||
nobeep off
|
||||
nobgnice off
|
||||
braceccl off
|
||||
bsdecho off
|
||||
nocaseglob off
|
||||
nocasematch off
|
||||
cbases off
|
||||
cdablevars off
|
||||
chasedots off
|
||||
chaselinks off
|
||||
nocheckjobs off
|
||||
noclobber off
|
||||
combiningchars off
|
||||
completealiases off
|
||||
completeinword off
|
||||
continueonerror off
|
||||
correct off
|
||||
correctall off
|
||||
cprecedences off
|
||||
cshjunkiehistory off
|
||||
cshjunkieloops off
|
||||
cshjunkiequotes off
|
||||
cshnullcmd off
|
||||
cshnullglob off
|
||||
nodebugbeforecmd off
|
||||
dvorak off
|
||||
emacs off
|
||||
noequals off
|
||||
errexit off
|
||||
errreturn off
|
||||
noevallineno off
|
||||
noexec off
|
||||
extendedglob off
|
||||
extendedhistory off
|
||||
noflowcontrol off
|
||||
forcefloat off
|
||||
nofunctionargzero off
|
||||
noglob off
|
||||
noglobalexport off
|
||||
noglobalrcs off
|
||||
globassign off
|
||||
globcomplete off
|
||||
globdots off
|
||||
globsubst off
|
||||
nohashcmds off
|
||||
nohashdirs on
|
||||
hashexecutablesonly off
|
||||
nohashlistall off
|
||||
histallowclobber off
|
||||
nohistbeep off
|
||||
histexpiredupsfirst off
|
||||
histfcntllock off
|
||||
histfindnodups off
|
||||
histignorealldups off
|
||||
histignoredups off
|
||||
histignorespace off
|
||||
histlexwords off
|
||||
histnofunctions off
|
||||
histnostore off
|
||||
histreduceblanks off
|
||||
nohistsavebycopy off
|
||||
histsavenodups off
|
||||
histsubstpattern off
|
||||
histverify off
|
||||
nohup off
|
||||
ignorebraces off
|
||||
ignoreclosebraces off
|
||||
ignoreeof off
|
||||
incappendhistory off
|
||||
incappendhistorytime off
|
||||
interactive off
|
||||
interactivecomments off
|
||||
ksharrays off
|
||||
kshautoload off
|
||||
kshglob off
|
||||
kshoptionprint on
|
||||
kshtypeset off
|
||||
kshzerosubscript off
|
||||
nolistambiguous off
|
||||
nolistbeep off
|
||||
listpacked off
|
||||
listrowsfirst off
|
||||
nolisttypes off
|
||||
localloops off
|
||||
localoptions off
|
||||
localpatterns off
|
||||
localtraps off
|
||||
login off
|
||||
longlistjobs off
|
||||
magicequalsubst off
|
||||
mailwarning off
|
||||
markdirs off
|
||||
menucomplete off
|
||||
monitor off
|
||||
nomultibyte off
|
||||
nomultifuncdef off
|
||||
nomultios off
|
||||
nonomatch off
|
||||
nonotify off
|
||||
nullglob off
|
||||
numericglobsort off
|
||||
octalzeroes off
|
||||
overstrike off
|
||||
pathdirs off
|
||||
pathscript off
|
||||
pipefail off
|
||||
posixaliases off
|
||||
posixargzero off
|
||||
posixbuiltins off
|
||||
posixcd off
|
||||
posixidentifiers off
|
||||
posixjobs off
|
||||
posixstrings off
|
||||
posixtraps off
|
||||
printeightbit off
|
||||
printexitvalue off
|
||||
privileged off
|
||||
promptbang off
|
||||
nopromptcr off
|
||||
nopromptpercent off
|
||||
nopromptsp off
|
||||
promptsubst off
|
||||
pushdignoredups off
|
||||
pushdminus off
|
||||
pushdsilent off
|
||||
pushdtohome off
|
||||
rcexpandparam off
|
||||
rcquotes off
|
||||
norcs off
|
||||
recexact off
|
||||
rematchpcre off
|
||||
restricted off
|
||||
rmstarsilent off
|
||||
rmstarwait off
|
||||
sharehistory off
|
||||
shfileexpansion off
|
||||
shglob off
|
||||
shinstdin off
|
||||
shnullcmd off
|
||||
shoptionletters off
|
||||
noshortloops off
|
||||
shwordsplit off
|
||||
singlecommand off
|
||||
singlelinezle off
|
||||
sourcetrace off
|
||||
sunkeyboardhack off
|
||||
transientrprompt off
|
||||
trapsasync off
|
||||
typesetsilent off
|
||||
nounset off
|
||||
verbose off
|
||||
vi off
|
||||
warncreateglobal off
|
||||
xtrace off
|
||||
zle off
|
||||
|
||||
non-interactive zsh, emulate ksh:
|
||||
|
||||
noaliases off
|
||||
allexport off
|
||||
noalwayslastprompt off
|
||||
alwaystoend off
|
||||
noappendhistory off
|
||||
autocd off
|
||||
autocontinue off
|
||||
noautolist off
|
||||
noautomenu off
|
||||
autonamedirs off
|
||||
noautoparamkeys off
|
||||
noautoparamslash off
|
||||
autopushd off
|
||||
noautoremoveslash off
|
||||
autoresume off
|
||||
badpattern off
|
||||
banghist on
|
||||
bareglobqual off
|
||||
bashautolist off
|
||||
bashrematch off
|
||||
nobeep off
|
||||
bgnice off
|
||||
braceccl off
|
||||
bsdecho off
|
||||
nocaseglob off
|
||||
nocasematch off
|
||||
cbases off
|
||||
cdablevars off
|
||||
chasedots off
|
||||
chaselinks off
|
||||
checkjobs off
|
||||
noclobber off
|
||||
combiningchars off
|
||||
completealiases off
|
||||
completeinword off
|
||||
continueonerror off
|
||||
correct off
|
||||
correctall off
|
||||
nocprecedences off
|
||||
cshjunkiehistory off
|
||||
cshjunkieloops off
|
||||
cshjunkiequotes off
|
||||
cshnullcmd off
|
||||
cshnullglob off
|
||||
nodebugbeforecmd off
|
||||
dvorak off
|
||||
emacs off
|
||||
equals off
|
||||
errexit off
|
||||
errreturn off
|
||||
evallineno off
|
||||
noexec off
|
||||
extendedglob off
|
||||
extendedhistory off
|
||||
noflowcontrol off
|
||||
forcefloat off
|
||||
functionargzero off
|
||||
noglob off
|
||||
globalexport off
|
||||
noglobalrcs off
|
||||
globassign off
|
||||
globcomplete off
|
||||
globdots off
|
||||
noglobsubst off
|
||||
nohashcmds off
|
||||
nohashdirs on
|
||||
hashexecutablesonly off
|
||||
nohashlistall off
|
||||
histallowclobber off
|
||||
nohistbeep off
|
||||
histexpiredupsfirst off
|
||||
histfcntllock off
|
||||
histfindnodups off
|
||||
histignorealldups off
|
||||
histignoredups off
|
||||
histignorespace off
|
||||
histlexwords off
|
||||
histnofunctions off
|
||||
histnostore off
|
||||
histreduceblanks off
|
||||
nohistsavebycopy off
|
||||
histsavenodups off
|
||||
histsubstpattern off
|
||||
histverify off
|
||||
hup off
|
||||
ignorebraces off
|
||||
ignoreclosebraces off
|
||||
ignoreeof off
|
||||
incappendhistory off
|
||||
incappendhistorytime off
|
||||
interactive off
|
||||
nointeractivecomments on
|
||||
noksharrays off
|
||||
nokshautoload off
|
||||
nokshglob off
|
||||
nokshoptionprint off
|
||||
nokshtypeset off
|
||||
kshzerosubscript off
|
||||
nolistambiguous off
|
||||
nolistbeep off
|
||||
listpacked off
|
||||
listrowsfirst off
|
||||
nolisttypes off
|
||||
localloops off
|
||||
nolocaloptions off
|
||||
localpatterns off
|
||||
nolocaltraps off
|
||||
login off
|
||||
longlistjobs off
|
||||
magicequalsubst off
|
||||
mailwarning off
|
||||
markdirs off
|
||||
menucomplete off
|
||||
monitor off
|
||||
nomultibyte off
|
||||
multifuncdef off
|
||||
multios off
|
||||
nomatch off
|
||||
notify on
|
||||
nullglob off
|
||||
numericglobsort off
|
||||
octalzeroes off
|
||||
overstrike off
|
||||
pathdirs off
|
||||
nopathscript off
|
||||
pipefail off
|
||||
noposixaliases off
|
||||
posixargzero off
|
||||
noposixbuiltins off
|
||||
noposixcd off
|
||||
noposixidentifiers off
|
||||
noposixjobs off
|
||||
noposixstrings off
|
||||
noposixtraps off
|
||||
printeightbit off
|
||||
printexitvalue off
|
||||
privileged off
|
||||
nopromptbang on
|
||||
nopromptcr off
|
||||
promptpercent on
|
||||
nopromptsp off
|
||||
nopromptsubst on
|
||||
pushdignoredups off
|
||||
pushdminus off
|
||||
pushdsilent off
|
||||
pushdtohome off
|
||||
rcexpandparam off
|
||||
rcquotes off
|
||||
norcs off
|
||||
recexact off
|
||||
rematchpcre off
|
||||
restricted off
|
||||
normstarsilent on
|
||||
rmstarwait off
|
||||
nosharehistory on
|
||||
noshfileexpansion off
|
||||
noshglob off
|
||||
shinstdin off
|
||||
noshnullcmd off
|
||||
noshoptionletters off
|
||||
shortloops off
|
||||
noshwordsplit off
|
||||
singlecommand off
|
||||
nosinglelinezle on
|
||||
sourcetrace off
|
||||
sunkeyboardhack off
|
||||
transientrprompt off
|
||||
trapsasync off
|
||||
notypesetsilent off
|
||||
nounset off
|
||||
verbose off
|
||||
vi off
|
||||
warncreateglobal off
|
||||
xtrace off
|
||||
zle off
|
||||
50
doc/db/flags.txt
Normal file
50
doc/db/flags.txt
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
echo ${(<TAB>, zsh-5.0.8, OS X 10.11.2
|
||||
|
||||
parameter flag
|
||||
# -- evaluate as numeric expression
|
||||
% -- expand prompt sequences
|
||||
0 -- split words on null bytes
|
||||
@ -- double-quoted splitting of scalars
|
||||
A -- create array parameter
|
||||
B -- include index of beginning of match in #, %, / expressions
|
||||
C -- capitalize words
|
||||
D -- perform directory name abbreviation
|
||||
E -- include index of end of match in #, %, / expressions
|
||||
F -- join arrays with newlines
|
||||
I -- search <argument>th match in #, %, / expressions
|
||||
L -- lower case all letters
|
||||
M -- include matched portion in #, %, / expressions
|
||||
N -- include length of match in #, % expressions
|
||||
O -- sort in descending order (lexically if no other sort option)
|
||||
P -- use parameter value as name of parameter for redirected lookup
|
||||
Q -- remove one level of quoting
|
||||
R -- include rest (unmatched portion) in #, %, / expressions
|
||||
S -- search substrings in #, %, / expressions
|
||||
U -- upper case all letters
|
||||
V -- visibility enhancements for special characters
|
||||
W -- count words including empty words (with ${(W)#...})
|
||||
X -- report parsing errors and eXit substitution
|
||||
Z -- split words as if zsh command line (with options)
|
||||
a -- sort in array index order (with O to reverse)
|
||||
b -- backslash quote pattern characters only
|
||||
c -- count characters in an array (with ${(c)#...})
|
||||
e -- perform single-word shell expansions
|
||||
f -- split the result on newlines
|
||||
g -- process echo array sequences (needs options)
|
||||
i -- sort case-insensitively
|
||||
j -- join arrays with specified string
|
||||
k -- subsitute keys of associative arrays
|
||||
l -- left-pad resulting words
|
||||
m -- count multibyte width in padding calculation
|
||||
n -- sort decimal integers numerically
|
||||
o -- sort in ascending order (lexically if no other sort option)
|
||||
p -- handle print escapes or variables in parameter flag arguments
|
||||
q -- quote with backslashes
|
||||
r -- right-pad resulting words
|
||||
s -- split words on specified string
|
||||
t -- substitute type of parameter
|
||||
u -- substitute first occurrence of each unique word
|
||||
v -- substitute values of associative arrays (with (k))
|
||||
w -- count words in array or string (with ${(w)#...})
|
||||
z -- split words as if zsh command line
|
||||
~ -- treat strings in parameter flag arguments as patterns
|
||||
357
doc/db/options.txt
Normal file
357
doc/db/options.txt
Normal file
|
|
@ -0,0 +1,357 @@
|
|||
Remembered state of Zsh during loading of a sophisticated plugin first
|
||||
with no problem second one with slight (extendedglob) recognized problem
|
||||
|
||||
RESULT: prefix ||, option/MATCH: |noksharrays|
|
||||
noaliases off
|
||||
allexport off
|
||||
noalwayslastprompt off
|
||||
alwaystoend off
|
||||
noappendhistory off
|
||||
autocd on
|
||||
autocontinue off
|
||||
noautolist off
|
||||
noautomenu on
|
||||
autonamedirs off
|
||||
noautoparamkeys off
|
||||
noautoparamslash off
|
||||
autopushd on
|
||||
noautoremoveslash off
|
||||
autoresume off
|
||||
nobadpattern off
|
||||
nobanghist off
|
||||
nobareglobqual off
|
||||
bashautolist off
|
||||
bashrematch off
|
||||
nobeep off
|
||||
nobgnice off
|
||||
braceccl off
|
||||
bsdecho off
|
||||
nocaseglob off
|
||||
nocasematch off
|
||||
cbases on
|
||||
cdablevars off
|
||||
chasedots off
|
||||
chaselinks off
|
||||
nocheckjobs off
|
||||
noclobber off
|
||||
combiningchars off
|
||||
completealiases off
|
||||
completeinword on
|
||||
continueonerror off
|
||||
correct off
|
||||
correctall off
|
||||
cprecedences off
|
||||
cshjunkiehistory off
|
||||
cshjunkieloops off
|
||||
cshjunkiequotes off
|
||||
cshnullcmd off
|
||||
cshnullglob off
|
||||
nodebugbeforecmd off
|
||||
dvorak off
|
||||
emacs off
|
||||
noequals off
|
||||
errexit off
|
||||
errreturn off
|
||||
noevallineno off
|
||||
noexec off
|
||||
extendedglob on
|
||||
extendedhistory off
|
||||
noflowcontrol off
|
||||
forcefloat off
|
||||
nofunctionargzero off
|
||||
noglob off
|
||||
noglobalexport off
|
||||
noglobalrcs off
|
||||
globassign off
|
||||
globcomplete off
|
||||
globdots off
|
||||
globsubst off
|
||||
nohashcmds off
|
||||
nohashdirs off
|
||||
hashexecutablesonly off
|
||||
nohashlistall off
|
||||
histallowclobber off
|
||||
nohistbeep off
|
||||
histexpiredupsfirst off
|
||||
histfcntllock off
|
||||
histfindnodups off
|
||||
histignorealldups off
|
||||
histignoredups on
|
||||
histignorespace off
|
||||
histlexwords off
|
||||
histnofunctions off
|
||||
histnostore off
|
||||
histreduceblanks off
|
||||
nohistsavebycopy off
|
||||
histsavenodups off
|
||||
histsubstpattern off
|
||||
histverify off
|
||||
nohup off
|
||||
ignorebraces off
|
||||
ignoreclosebraces off
|
||||
ignoreeof on
|
||||
incappendhistory on
|
||||
incappendhistorytime off
|
||||
interactive on
|
||||
interactivecomments on
|
||||
ksharrays off
|
||||
kshautoload off
|
||||
kshglob off
|
||||
kshoptionprint on
|
||||
kshtypeset off
|
||||
kshzerosubscript off
|
||||
nolistambiguous off
|
||||
nolistbeep off
|
||||
listpacked on
|
||||
listrowsfirst off
|
||||
nolisttypes off
|
||||
localloops off
|
||||
localoptions off
|
||||
localpatterns off
|
||||
localtraps off
|
||||
login off
|
||||
longlistjobs off
|
||||
magicequalsubst off
|
||||
mailwarning off
|
||||
markdirs off
|
||||
menucomplete off
|
||||
monitor on
|
||||
nomultibyte off
|
||||
nomultifuncdef off
|
||||
nomultios off
|
||||
nonomatch off
|
||||
nonotify off
|
||||
nullglob off
|
||||
numericglobsort on
|
||||
octalzeroes on
|
||||
overstrike off
|
||||
pathdirs off
|
||||
pathscript off
|
||||
pipefail off
|
||||
posixaliases off
|
||||
posixargzero off
|
||||
posixbuiltins off
|
||||
posixcd off
|
||||
posixidentifiers off
|
||||
posixjobs off
|
||||
posixstrings off
|
||||
posixtraps off
|
||||
printeightbit off
|
||||
printexitvalue off
|
||||
privileged off
|
||||
promptbang off
|
||||
nopromptcr on
|
||||
nopromptpercent off
|
||||
nopromptsp off
|
||||
promptsubst on
|
||||
pushdignoredups on
|
||||
pushdminus off
|
||||
pushdsilent off
|
||||
pushdtohome off
|
||||
rcexpandparam off
|
||||
rcquotes off
|
||||
norcs off
|
||||
recexact off
|
||||
rematchpcre off
|
||||
restricted off
|
||||
rmstarsilent off
|
||||
rmstarwait off
|
||||
sharehistory off
|
||||
shfileexpansion off
|
||||
shglob off
|
||||
shinstdin on
|
||||
shnullcmd off
|
||||
shoptionletters off
|
||||
noshortloops off
|
||||
shwordsplit off
|
||||
singlecommand off
|
||||
singlelinezle off
|
||||
sourcetrace off
|
||||
sunkeyboardhack off
|
||||
transientrprompt off
|
||||
trapsasync off
|
||||
typesetsilent off
|
||||
nounset off
|
||||
verbose off
|
||||
vi off
|
||||
warncreateglobal off
|
||||
xtrace off
|
||||
zle on
|
||||
|
||||
RESULT: prefix |localoptions|, option/MATCH: ||
|
||||
noaliases off
|
||||
allexport off
|
||||
noalwayslastprompt off
|
||||
alwaystoend off
|
||||
noappendhistory off
|
||||
autocd off
|
||||
autocontinue off
|
||||
noautolist off
|
||||
noautomenu on
|
||||
autonamedirs off
|
||||
noautoparamkeys off
|
||||
noautoparamslash off
|
||||
autopushd on
|
||||
noautoremoveslash off
|
||||
autoresume off
|
||||
nobadpattern off
|
||||
nobanghist off
|
||||
nobareglobqual off
|
||||
bashautolist off
|
||||
bashrematch off
|
||||
nobeep off
|
||||
nobgnice off
|
||||
braceccl off
|
||||
bsdecho off
|
||||
nocaseglob off
|
||||
nocasematch off
|
||||
cbases on
|
||||
cdablevars off
|
||||
chasedots off
|
||||
chaselinks off
|
||||
nocheckjobs off
|
||||
noclobber off
|
||||
combiningchars off
|
||||
completealiases off
|
||||
completeinword on
|
||||
continueonerror off
|
||||
correct off
|
||||
correctall off
|
||||
cprecedences off
|
||||
cshjunkiehistory off
|
||||
cshjunkieloops off
|
||||
cshjunkiequotes off
|
||||
cshnullcmd off
|
||||
cshnullglob off
|
||||
nodebugbeforecmd off
|
||||
dvorak off
|
||||
emacs off
|
||||
noequals off
|
||||
errexit off
|
||||
errreturn off
|
||||
noevallineno off
|
||||
noexec off
|
||||
extendedglob off
|
||||
extendedhistory off
|
||||
noflowcontrol off
|
||||
forcefloat off
|
||||
nofunctionargzero off
|
||||
noglob off
|
||||
noglobalexport off
|
||||
noglobalrcs off
|
||||
globassign off
|
||||
globcomplete off
|
||||
globdots off
|
||||
globsubst off
|
||||
nohashcmds off
|
||||
nohashdirs off
|
||||
hashexecutablesonly off
|
||||
nohashlistall off
|
||||
histallowclobber off
|
||||
nohistbeep off
|
||||
histexpiredupsfirst off
|
||||
histfcntllock off
|
||||
histfindnodups off
|
||||
histignorealldups off
|
||||
histignoredups on
|
||||
histignorespace off
|
||||
histlexwords off
|
||||
histnofunctions off
|
||||
histnostore off
|
||||
histreduceblanks off
|
||||
nohistsavebycopy off
|
||||
histsavenodups off
|
||||
histsubstpattern off
|
||||
histverify off
|
||||
nohup off
|
||||
ignorebraces off
|
||||
ignoreclosebraces off
|
||||
ignoreeof on
|
||||
incappendhistory on
|
||||
incappendhistorytime off
|
||||
interactive on
|
||||
interactivecomments on
|
||||
ksharrays off
|
||||
kshautoload off
|
||||
kshglob off
|
||||
kshoptionprint on
|
||||
kshtypeset off
|
||||
kshzerosubscript off
|
||||
nolistambiguous off
|
||||
nolistbeep off
|
||||
listpacked on
|
||||
listrowsfirst off
|
||||
nolisttypes off
|
||||
localloops off
|
||||
localoptions on
|
||||
localpatterns on
|
||||
localtraps on
|
||||
login off
|
||||
longlistjobs off
|
||||
magicequalsubst off
|
||||
mailwarning off
|
||||
markdirs off
|
||||
menucomplete off
|
||||
monitor on
|
||||
nomultibyte off
|
||||
nomultifuncdef off
|
||||
nomultios off
|
||||
nonomatch off
|
||||
nonotify off
|
||||
nullglob off
|
||||
numericglobsort off
|
||||
octalzeroes off
|
||||
overstrike off
|
||||
pathdirs off
|
||||
pathscript off
|
||||
pipefail off
|
||||
posixaliases off
|
||||
posixargzero off
|
||||
posixbuiltins off
|
||||
posixcd off
|
||||
posixidentifiers off
|
||||
posixjobs off
|
||||
posixstrings off
|
||||
posixtraps off
|
||||
printeightbit off
|
||||
printexitvalue off
|
||||
privileged off
|
||||
promptbang off
|
||||
nopromptcr on
|
||||
nopromptpercent off
|
||||
nopromptsp off
|
||||
promptsubst on
|
||||
pushdignoredups off
|
||||
pushdminus off
|
||||
pushdsilent off
|
||||
pushdtohome off
|
||||
rcexpandparam off
|
||||
rcquotes off
|
||||
norcs off
|
||||
recexact off
|
||||
rematchpcre off
|
||||
restricted off
|
||||
rmstarsilent off
|
||||
rmstarwait off
|
||||
sharehistory off
|
||||
shfileexpansion off
|
||||
shglob off
|
||||
shinstdin on
|
||||
shnullcmd off
|
||||
shoptionletters off
|
||||
noshortloops off
|
||||
shwordsplit off
|
||||
singlecommand off
|
||||
singlelinezle off
|
||||
sourcetrace off
|
||||
sunkeyboardhack off
|
||||
transientrprompt off
|
||||
trapsasync off
|
||||
typesetsilent off
|
||||
nounset off
|
||||
verbose off
|
||||
vi off
|
||||
warncreateglobal off
|
||||
xtrace off
|
||||
zle on
|
||||
|
||||
51
doc/db/tested.txt
Normal file
51
doc/db/tested.txt
Normal file
|
|
@ -0,0 +1,51 @@
|
|||
horosgrisa/autoenv
|
||||
adolfoabegg/browse-commit
|
||||
arzzen/calc.plugin.zsh
|
||||
walesmd/caniuse.plugin.zsh
|
||||
mollifier/cd-gitroot
|
||||
MikeDacre/cdbk
|
||||
willghatch/zsh-cdr
|
||||
rutchkiwi/copyzshell (required OMZ directory structure simulation)
|
||||
veelenga/crystal-zsh
|
||||
jgrowl/depot_tools
|
||||
gusaiani/elixir-oh-my-zsh
|
||||
b4b4r07/emoji-cli
|
||||
b4b4r07/enhancd
|
||||
uvaes/fzf-marks
|
||||
voronkovich/get-jquery.plugin.zsh
|
||||
fontno/ghost_zeus
|
||||
peterhurford/git-aliases.zsh
|
||||
unixorn/git-extra-commands
|
||||
peterhurford/git-it-on.zsh
|
||||
tevren/gitfast-zsh-plugin
|
||||
zsh-users/zsh-syntax-highlighting
|
||||
voronkovich/gitignore.plugin.zsh
|
||||
bbenne10/goenv
|
||||
or17191/going_places
|
||||
Seinh/git-prune
|
||||
joepvd/grep2awk (failed, improper bindkey, the same with antigen)
|
||||
robertzk/hipchat.zsh (unfull, HIPCHAT_API_TOKEN was required)
|
||||
willghatch/zsh-hooks (problematic usage, the same with antigen)
|
||||
mgryszko/jvm (problematic usage, the same with antigen)
|
||||
rimraf/k
|
||||
d12frosted/kitsunebook.plugin.zsh (a completion done via manual compdef call)
|
||||
lesaint/lesaint-mvn
|
||||
Temikus/mac-packaging
|
||||
hlohm/mfunc (doesn't fully work, the same with antigen)
|
||||
horosgrisa/mysql-colorize
|
||||
voronkovich/mysql.plugin.zsh
|
||||
bric3/nice-exit-code
|
||||
chrissicool/zsh-bash
|
||||
zsh-users/zaw
|
||||
benclark/parallels-zsh-plugin
|
||||
oz/safe-paste (works but has issues, the same on antigen)
|
||||
willghatch/zsh-saneopt
|
||||
willghatch/zsh-snippets (misses a bindkey, the same with antigen, otherwise works)
|
||||
Tarrasch/zsh-colors
|
||||
dbkaplun/smart-cd
|
||||
|
||||
skipped:
|
||||
Stibbons/crayon-syntax-zsh (a wordpress plugin)
|
||||
jsks/czhttpd (not a plugin, a software, a command)
|
||||
Vifon/deer (not a plugin, provides manual installation instructions)
|
||||
|
||||
BIN
doc/img/m.png
BIN
doc/img/m.png
Binary file not shown.
|
Before Width: | Height: | Size: 5.9 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 11 KiB |
Binary file not shown.
|
Before Width: | Height: | Size: 12 KiB After Width: | Height: | Size: 12 KiB |
43
doc/install.sh
Executable file
43
doc/install.sh
Executable file
|
|
@ -0,0 +1,43 @@
|
|||
#!/bin/sh
|
||||
|
||||
#
|
||||
# Clone or pull
|
||||
#
|
||||
|
||||
ZPLG_HOME="${ZDOTDIR:-$HOME}/.zplugin"
|
||||
|
||||
if ! test -d "$ZPLG_HOME"; then
|
||||
mkdir "$ZPLG_HOME"
|
||||
chmod g-rwX "$ZPLG_HOME"
|
||||
fi
|
||||
|
||||
echo ">>> Downloading zplugin to $ZPLG_HOME/bin"
|
||||
if test -d "$ZPLG_HOME/bin/.git"; then
|
||||
cd "$ZPLG_HOME/bin"
|
||||
git pull origin master
|
||||
else
|
||||
cd "$ZPLG_HOME"
|
||||
git clone https://github.com/psprint/zplugin.git bin
|
||||
fi
|
||||
echo ">>> Done"
|
||||
|
||||
#
|
||||
# Modify .zshrc
|
||||
#
|
||||
|
||||
if grep zplugin "$ZPLG_HOME/../.zshrc" >/dev/null 2>&1; then
|
||||
echo ">>> .zshrc already updated, not making changes"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
echo ">>> Updating .zshrc (3 lines of code, at the bottom)"
|
||||
cat <<-EOF >> "$ZPLG_HOME/../.zshrc"
|
||||
|
||||
### Added by Zplugin's installer
|
||||
source '$ZPLG_HOME/bin/zplugin.zsh'
|
||||
autoload -Uz _zplugin
|
||||
(( \${+_comps} )) && _comps[zplugin]=_zplugin
|
||||
### End of Zplugin's installer chunk
|
||||
EOF
|
||||
echo ">>> Done"
|
||||
|
||||
1775
doc/zinit.1
1775
doc/zinit.1
File diff suppressed because it is too large
Load diff
391
doc/zplugin.1
Normal file
391
doc/zplugin.1
Normal file
|
|
@ -0,0 +1,391 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "README" "" "April 2016" "" ""
|
||||
Zplugin gives \fBreports\fR from plugin load\. Plugins are no longer black boxes, report will tell what aliases, functions, bindkeys, Zle widgets, zstyles, completions, variables, \fBPATH\fR and \fBFPATH\fR elements a plugin has set up\. Supported is \fBunloading\fR of plugin and ability to list, uninstall, reinstall and selectively disable, enable plugin\'s completions\. Also, every plugin is compiled and user can control this function\. The system does not use \fB$FPATH\fR, it\'s kept clean!
|
||||
.
|
||||
.P
|
||||
Code is immune to \fBKSH_ARRAYS\fR, \fBemulate sh\fR, \fBemulate ksh\fR, thoroughly tested to support any user setup, be as transparent as plain \fBsource\fR command\. Compdef replays functionality is provided to allow user call \fBcompinit\fR only once in \fB\.zshrc\fR\.
|
||||
.
|
||||
.P
|
||||
.
|
||||
.SH "Introduction"
|
||||
.
|
||||
.P
|
||||
\fBExample use:\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% \. ~/github/zplugin/zplugin\.zsh
|
||||
% zplugin load zsh\-users/zsh\-syntax\-highlighting
|
||||
% zplugin load psprint/zsh\-cmd\-architect
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
\fBExample plugin report:\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zpl report psprint/zsh\-cmd\-architect
|
||||
Plugin report for psprint/zsh\-cmd\-architect
|
||||
\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-\-
|
||||
Source zsh\-cmd\-architect\.plugin\.zsh
|
||||
Autoload h\-list
|
||||
Autoload h\-list\-input
|
||||
Autoload h\-list\-draw
|
||||
Autoload zca
|
||||
Autoload zca\-usetty\-wrapper
|
||||
Autoload zca\-widget
|
||||
Zle \-N zca\-widget
|
||||
Bindkey ^T zca\-widget
|
||||
|
||||
Functions created:
|
||||
h\-list h\-list\-draw
|
||||
h\-list\-input zca
|
||||
zca\-usetty\-wrapper zca\-widget
|
||||
|
||||
Options changed:
|
||||
autolist was unset
|
||||
menucomplete was unset
|
||||
|
||||
PATH elements added:
|
||||
/Users/sgniazdowski/github/zsh\-cmd\-architect/bin
|
||||
|
||||
FPATH elements added:
|
||||
/Users/sgniazdowski/github/zsh\-cmd\-architect
|
||||
|
||||
Completions:
|
||||
_xauth [disabled]
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
.
|
||||
.P
|
||||
\fBExample plugin unload:\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zpl unload psprint/zsh\-cmd\-architect
|
||||
Deleting function h\-list
|
||||
Deleting function h\-list\-draw
|
||||
Deleting function h\-list\-input
|
||||
Deleting function zca
|
||||
Deleting function zca\-usetty\-wrapper
|
||||
Deleting function zca\-widget
|
||||
Deleting bindkey ^T zca\-widget
|
||||
Setting option autolist
|
||||
Setting option menucomplete
|
||||
Removing PATH element /Users/sgniazdowski/github/zsh\-cmd\-architect/bin
|
||||
Removing FPATH element /Users/sgniazdowski/github/zsh\-cmd\-architect
|
||||
Unregistering plugin psprint/zsh\-cmd\-architect
|
||||
Plugin\'s report saved to $LASTREPORT
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
.
|
||||
.P
|
||||
\fBExample \fBcsearch\fR invocation (completion management):\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
# zplg csearch
|
||||
[+] is installed, [\-] uninstalled, [+\-] partially installed
|
||||
[+] _local/zplugin _zplugin
|
||||
[\-] benclark/parallels\-zsh\-plugin _parallels
|
||||
[+] mollifier/cd\-gitroot _cd\-gitroot
|
||||
[\-] or17191/going_places _favrm, _go
|
||||
[\-] psprint/zsh\-cmd\-architect _xauth
|
||||
[\-] psprint/zsh\-editing\-workbench _cp
|
||||
[+] tevren/gitfast\-zsh\-plugin _git
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
.
|
||||
.P
|
||||
\fBExample \fBcompile\fR invocation:\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
# zplg compile zsh\-users/zsh\-syntax\-highlighting
|
||||
Compiling zsh\-syntax\-highlighting\.plugin\.zsh\.\.\.
|
||||
# zplg compiled
|
||||
zsh\-users/zsh\-syntax\-highlighting:
|
||||
zsh\-syntax\-highlighting\.plugin\.zsh\.zwc
|
||||
# zplg uncompile zsh\-users/zsh\-syntax\-highlighting
|
||||
Removing zsh\-syntax\-highlighting\.plugin\.zsh\.zwc
|
||||
# zplg compiled
|
||||
No compiled plugins
|
||||
# zplg compile\-all
|
||||
zsh\-users/zsh\-syntax\-highlighting
|
||||
Compiling zsh\-syntax\-highlighting\.plugin\.zsh\.\.\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
.
|
||||
.P
|
||||
\fBExample \fBcreate\fR invocation:\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zplg create psprint/testplugin
|
||||
Github user name or just "_local": psprint
|
||||
Plugin name: testplugin2
|
||||
Plugin is psprint/testplugin2
|
||||
Creating Github repository
|
||||
Enter host password for user \'psprint\':
|
||||
Cloning into \'psprint\-\-\-testplugin2\'\.\.\.
|
||||
warning: You appear to have cloned an empty repository\.
|
||||
Checking connectivity\.\.\. done\.
|
||||
Remote repository psprint/testplugin2 set up as origin
|
||||
You\'re in plugin\'s local folder
|
||||
The files aren\'t added to git
|
||||
Your next step after commiting will be:
|
||||
git push \-u origin master
|
||||
% ls
|
||||
\.git README\.md
|
||||
LICENSE testplugin2\.plugin\.zsh
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
.
|
||||
.SH "Installation"
|
||||
Execute:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
sh \-c "$(curl \-fsSL https://raw\.githubusercontent\.com/psprint/zplugin/master/doc/install\.sh)"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
To update run the command again (or just execute \fBdoc/install\.sh\fR)\.
|
||||
.
|
||||
.P
|
||||
\fBZplugin\fR will be installed into \fB~/\.zplugin/bin\fR\. \fB\.zshrc\fR will be updated with three lines of code that will be added to the bottom (the lines will be sourcing \fBzplugin\.zsh\fR and setting up completion)\.
|
||||
.
|
||||
.P
|
||||
Completion will be available, for command \fBzplugin\fR and aliases \fBzpl\fR, \fBzplg\fR\.
|
||||
.
|
||||
.P
|
||||
After installing and reloading shell give \fBZplugin\fR a quick try with \fBzplugin help\fR\.
|
||||
.
|
||||
.SH "Manual installation"
|
||||
To manually install \fBZplugin\fR clone the repo to e\.g\. \fB~/\.zplugin/bin\fR:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
mkdir ~/\.zplugin
|
||||
git clone https://github\.com/psprint/zplugin\.git ~/\.zplugin/bin
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
and source it from \fB\.zshrc\fR (\fBabove compinit\fR):
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
source ~/\.zplugin/bin/zplugin\.zsh
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
If you place the \fBsource\fR below \fBcompinit\fR, then add those two lines after the \fBsource\fR: \fBsh autoload \-Uz _zplugin (( ${+_comps} )) && _comps[zplugin]=_zplugin\fR
|
||||
.
|
||||
.P
|
||||
After installing and reloading shell give \fBZplugin\fR a quick try with \fBzplugin help\fR\.
|
||||
.
|
||||
.SS "Compilation"
|
||||
It\'s good to compile \fBzplugin\fR into \fBZsh\fR bytecode:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
zcompile ~/\.zplugin/bin/zplugin\.zsh
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Zplugin will compile each newly downloaded plugin\. You can clear compilation of a plugin by invoking \fBzplugin uncompile {plugin\-name}\fR\. There are also commands \fBcompile\fR, \fBcompile\-all\fR, \fBuncompile\-all\fR, \fBcompiled\fR that control the functionality of compiling plugins\.
|
||||
.
|
||||
.SH "Usage"
|
||||
.
|
||||
.nf
|
||||
|
||||
% zpl help
|
||||
Usage:
|
||||
\-h|\-\-help|help \- usage information
|
||||
man \- manual
|
||||
self\-update \- updates Zplugin
|
||||
load {plugin\-name} \- load plugin
|
||||
light {plugin\-name} \- light plugin load, without reporting
|
||||
unload {plugin\-name} \- unload plugin
|
||||
snippet [\-f] {url} \- source local or remote file (\-f: force \- don\'t use cache)
|
||||
update {plugin\-name} \- update plugin (Git)
|
||||
update\-all \- update all plugins (Git)
|
||||
status {plugin\-name} \- status for plugin (Git)
|
||||
status\-all \- status for all plugins (Git)
|
||||
report {plugin\-name} \- show plugin\'s report
|
||||
all\-reports \- show all plugin reports
|
||||
loaded|list [keyword] \- show what plugins are loaded (filter with `keyword\')
|
||||
cd {plugin\-name} \- cd into plugin\'s directory
|
||||
create {plugin\-name} \- create plugin (also together with Github repository)
|
||||
edit {plugin\-name} \- edit plugin\'s file with $EDITOR
|
||||
glance {plugin\-name} \- look at plugin\'s source (pygmentize, {,source\-}highlight)
|
||||
stress {plugin\-name} \- test plugin for compatibility with set of options
|
||||
changes {plugin\-name} \- view plugin\'s git log
|
||||
recently [time\-spec] \- show plugins that changed recently, argument is e\.g\. 1 month 2 days
|
||||
clist|completions \- list completions in use
|
||||
cdisable {cname} \- disable completion `cname\'
|
||||
cenable {cname} \- enable completion `cname\'
|
||||
creinstall {plugin\-name} \- install completions for plugin
|
||||
cuninstall {plugin\-name} \- uninstall completions for plugin
|
||||
csearch \- search for available completions from any plugin
|
||||
compinit \- refresh installed completions
|
||||
dtrace|dstart \- start tracking what\'s going on in session
|
||||
dstop \- stop tracking what\'s going on in session
|
||||
dunload \- revert changes recorded between dstart and dstop
|
||||
dreport \- report what was going on in session
|
||||
dclear \- clear report of what was going on in session
|
||||
compile {plugin\-name} \- compile plugin
|
||||
compile\-all \- compile all downloaded plugins
|
||||
uncompile {plugin\-name} \- remove compiled version of plugin
|
||||
uncompile\-all \- remove compiled versions of all downloaded plugins
|
||||
compiled \- list plugins that are compiled
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.P
|
||||
To use themes created for \fBOh\-My\-Zsh\fR you might want to first source the \fBgit\fR library there:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
zplugin snippet \'http://github\.com/robbyrussell/oh\-my\-zsh/raw/master/lib/git\.zsh\'
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Then you can use the themes either as plugins (\fBzplugin load {user/theme\-name}\fR) or as snippets (\fBzplugin snippet {file path or URL}\fR; plugin method recommended)\. Some themes require not only \fBOh\-My\-Zsh\'s\fR \fBgit\fR library, but also \fBgit\fR plugin (error about function \fBcurrent_branch\fR appears)\. Source it as snippet directly from \fBOh\-My\-Zsh\fR:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
zplugin snippet \'https://github\.com/robbyrussell/oh\-my\-zsh/raw/master/plugins/git/git\.plugin\.zsh\'
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Such lines should be added to \fB\.zshrc\fR\. Snippets are cached locally, use \fB\-f\fR option to download a fresh version of a snippet\.
|
||||
.
|
||||
.P
|
||||
Most themes require \fBpromptsubst\fR option (\fBsetopt promptsubst\fR in \fBzshrc\fR), if it isn\'t set prompt will appear as something like: \fB$(build_prompt)\fR\.
|
||||
.
|
||||
.SH "Clean \.zshrc With Compdef Replaying"
|
||||
\fBZplugin\fR provides a feature which brings order into \fB\.zshrc\fR\. When to call \fBcompinit\fR? Some plugins require completion being in place, other update \fB$FPATH\fR and want \fBcompinit\fR to be called later\. \fBZplugin\fR is like a pre\-initialized completion for the first type of plugins\. They will thus work without real \fBcompinit\fR in place\. You should call \fBcompinit\fR only once after loading all plugins, in following way:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
source ~/\.zplugin/bin/zplugin\.zsh
|
||||
zplugin load "some/plugin"
|
||||
\.\.\.
|
||||
zplugin load "other/plugin"
|
||||
|
||||
autoload \-Uz compinit
|
||||
compinit
|
||||
zplugin cdreplay \-q # \-q is for quiet
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Performance gains are huge, example shell startup time with double \fBcompinit\fR: \fB0\.980\fR sec, with \fBcdreplay\fR and single \fBcompinit\fR: \fB0\.156\fR sec\.
|
||||
.
|
||||
.SS "Ignoring Compdefs"
|
||||
If you want to ignore compdefs provided by some plugins or snippets, place their load commands before commands loading other plugins or snippets, and issue \fBzplugin cdclear\fR:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
source ~/\.zplugin/bin/zplugin\.zsh
|
||||
zplugin snippet https://github\.com/robbyrussell/oh\-my\-zsh/blob/master/plugins/git/git\.plugin\.zsh
|
||||
zplugin cdclear # <\- forget completions provided up to this moment
|
||||
|
||||
zplugin load "some/plugin"
|
||||
\.\.\.
|
||||
zplugin load "other/plugin"
|
||||
|
||||
autoload \-Uz compinit
|
||||
compinit
|
||||
zplugin cdreplay \-q # <\- execute compdefs provided by rest of plugins
|
||||
zplugin cdlist # look at gathered compdefs
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "Non\-Github (local) plugins"
|
||||
Use \fBcreate\fR command with user name \fB_local\fR (the default) to create plugin\'s skeleton\. It will be not connected with Github repository (because of user name being \fB_local\fR)\. To enter the plugin\'s directory use \fBcd\fR command with just plugin\'s name (without \fB_local\fR)\.
|
||||
.
|
||||
.P
|
||||
The special user name \fB_local\fR is optional also for other commands, e\.g\. for \fBload\fR (i\.e\. \fBzplugin load myplugin\fR is sufficient, there\'s no need for \fBzplugin load _local/myplugin\fR)\.
|
||||
.
|
||||
.SH "IRC channel"
|
||||
Simply connect to chat\.freenode\.net:6697 \fIircs://chat\.freenode\.net:6697/%23zplugin\fR (SSL) or chat\.freenode\.net:6667 \fIirc://chat\.freenode\.net:6667/%23zplugin\fR and join #zplugin\.
|
||||
.
|
||||
.P
|
||||
Following is a quick access via Webchat \fIhttps://kiwiirc\.com/client/chat\.freenode\.net:+6697/#zplugin\fR
|
||||
|
|
@ -1,57 +0,0 @@
|
|||
# This Makefile is to convert supplied Asciidoc files into
|
||||
# other formats like pdf and man. The files contain Zplugin's
|
||||
# code documentation.
|
||||
#
|
||||
# *.adoc files are generated by Makefile from upper (i.e. top)
|
||||
# directory.
|
||||
|
||||
all: man pdf
|
||||
|
||||
# MANUALS
|
||||
# Converted with a2x from asciidoc package
|
||||
|
||||
man: man/zinit.zsh.1 man/zinit-side.zsh.1 man/zinit-install.zsh.1 man/zinit-autoload.zsh.1
|
||||
|
||||
man/zinit.zsh.1:
|
||||
@mkdir -p man
|
||||
a2x --verbose -L --doctype manpage --format manpage -D man zinit.zsh.adoc
|
||||
|
||||
man/zinit-side.zsh.1:
|
||||
@mkdir -p man
|
||||
a2x --verbose -L --doctype manpage --format manpage -D man zinit-side.zsh.adoc
|
||||
|
||||
man/zinit-install.zsh.1:
|
||||
@mkdir -p man
|
||||
a2x --verbose -L --doctype manpage --format manpage -D man zinit-install.zsh.adoc
|
||||
|
||||
man/zinit-autoload.zsh.1:
|
||||
@mkdir -p man
|
||||
a2x --verbose -L --doctype manpage --format manpage -D man zinit-autoload.zsh.adoc
|
||||
|
||||
# PDFS
|
||||
# Uses asciidoctor not a2x (i.e. not asciidoc)
|
||||
|
||||
pdf: pdf/zinit.zsh.pdf pdf/zinit-side.zsh.pdf pdf/zinit-install.zsh.pdf pdf/zinit-autoload.zsh.pdf
|
||||
|
||||
pdf/zinit.zsh.pdf:
|
||||
@mkdir -p pdf
|
||||
asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit.zsh.adoc
|
||||
|
||||
pdf/zinit-side.zsh.pdf:
|
||||
@mkdir -p pdf
|
||||
asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit-side.zsh.adoc
|
||||
|
||||
pdf/zinit-install.zsh.pdf:
|
||||
@mkdir -p pdf
|
||||
asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit-install.zsh.adoc
|
||||
|
||||
pdf/zinit-autoload.zsh.pdf:
|
||||
@mkdir -p pdf
|
||||
asciidoctor -a reproducible -b pdf -r asciidoctor-pdf -D pdf zinit-autoload.zsh.adoc
|
||||
|
||||
clean:
|
||||
rm -rf man pdf data
|
||||
|
||||
.PHONY: man pdf clean
|
||||
|
||||
# vim:noet:sts=8:ts=8
|
||||
|
|
@ -1,22 +0,0 @@
|
|||
# Code documentation
|
||||
|
||||
Here is `Asciidoc` code documentation generated using [Zshelldoc](https://github.com/zdharma-continuum/zshelldoc). There
|
||||
are `4` Zinit's source files, the main one is [zinit.zsh](zinit.zsh.adoc). The documentation lists all functions,
|
||||
interactions between them, their comments and features used.
|
||||
|
||||
Github allows to directly view `Asciidoc` documents:
|
||||
|
||||
- [zinit.zsh](zinit.zsh.adoc) – always loaded, in `.zshrc`
|
||||
([pdf](https://zdharma-continuum.github.io/zinit/wiki/zinit.zsh))
|
||||
- [zinit-side.zsh](zinit-side.zsh.adoc) – common functions, loaded by `*-install` and `*-autoload` scripts
|
||||
([pdf](https://zdharma-continuum.github.io/zinit/wiki/zinit-side.zsh))
|
||||
- [zinit-install.zsh](zinit-install.zsh.adoc) – functions used only when installing a plugin or snippet
|
||||
([pdf](https://zdharma-continuum.github.io/zinit/wiki/zinit-install.zsh))
|
||||
- [zinit-autoload.zsh](zinit-autoload.zsh.adoc) – functions used only in interactive `Zinit` invocations
|
||||
([pdf](https://zdharma-continuum.github.io/zinit/wiki/zinit-autoload.zsh/))
|
||||
|
||||
# PDFs, man pages, etc.
|
||||
|
||||
Formats other than `Asciidoc` can be produced by using provided Makefile. For example, issuing `make pdf` will create
|
||||
and populate a new directory `pdf` (requires `asciidoctor`, install with `gem install asciidoctor-pdf --pre`).
|
||||
`make man` will create man pages (requires package `asciidoc`, uses its command `a2x`, which is quite slow).
|
||||
|
|
@ -1,185 +0,0 @@
|
|||
|
||||
NAME
|
||||
|
||||
zinit-additional.zsh - a shell script
|
||||
|
||||
Documentation automatically generated with `zshelldoc'
|
||||
|
||||
== FUNCTIONS
|
||||
+zinit-debug
|
||||
.zinit-debug-clear
|
||||
.zinit-debug-report
|
||||
.zinit-debug-revert
|
||||
.zinit-debug-start
|
||||
.zinit-debug-status
|
||||
.zinit-debug-stop
|
||||
.zinit-service
|
||||
.zinit-wrap-track-functions
|
||||
:zinit-tmp-subst-source
|
||||
|
||||
=== DETAILS
|
||||
|
||||
==== Script Body
|
||||
|
||||
Has 1 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).
|
||||
|
||||
==== +zinit-debug
|
||||
|
||||
____
|
||||
|
||||
Debug command entry point
|
||||
|
||||
____
|
||||
|
||||
Has 35 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _setopt_, _zmodload_, _zparseopts_
|
||||
|
||||
Called by:
|
||||
|
||||
zinit.zsh/zinit
|
||||
|
||||
==== .zinit-debug-clear
|
||||
|
||||
____
|
||||
|
||||
Clear latest debug report
|
||||
|
||||
____
|
||||
|
||||
Has 7 line(s). Calls functions:
|
||||
|
||||
.zinit-debug-clear
|
||||
|-- zinit-autoload.zsh/.zinit-clear-report-for
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Called by:
|
||||
|
||||
zinit-autoload.zsh/.zinit-unload
|
||||
|
||||
==== .zinit-debug-report
|
||||
|
||||
____
|
||||
|
||||
Displays debug report (data recorded in interactive session).
|
||||
|
||||
____
|
||||
|
||||
Has 6 line(s). Calls functions:
|
||||
|
||||
.zinit-debug-report
|
||||
|-- zinit-autoload.zsh/.zinit-show-report
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _source_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-debug-revert
|
||||
|
||||
____
|
||||
|
||||
Revert changes made during debug mode
|
||||
|
||||
____
|
||||
|
||||
Has 7 line(s). Calls functions:
|
||||
|
||||
.zinit-debug-revert
|
||||
|-- zinit-autoload.zsh/.zinit-unload
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _source_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-debug-start
|
||||
|
||||
____
|
||||
|
||||
Start debug mode
|
||||
|
||||
____
|
||||
|
||||
Has 13 line(s). Calls functions:
|
||||
|
||||
.zinit-debug-start
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-diff
|
||||
`-- zinit.zsh/.zinit-tmp-subst-on
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-debug-status
|
||||
|
||||
____
|
||||
|
||||
Revert changes made during debug mode
|
||||
|
||||
____
|
||||
|
||||
Has 2 line(s). Calls functions:
|
||||
|
||||
.zinit-debug-status
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-debug-stop
|
||||
|
||||
____
|
||||
|
||||
Stop debug mode
|
||||
|
||||
____
|
||||
|
||||
Has 14 line(s). Calls functions:
|
||||
|
||||
.zinit-debug-stop
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-diff
|
||||
`-- zinit.zsh/.zinit-tmp-subst-off
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-service
|
||||
|
||||
____
|
||||
|
||||
Handles given service, i.e. obtains lock, runs it, or waits if no lock
|
||||
|
||||
$1 - type "p" or "s" (plugin or snippet)
|
||||
$2 - mode - for plugin (light or load)
|
||||
$3 - id - URL or plugin ID or alias name (from id-as'')
|
||||
|
||||
____
|
||||
|
||||
Has 37 line(s). Calls functions:
|
||||
|
||||
.zinit-service
|
||||
|-- zinit.zsh/.zinit-load
|
||||
`-- zinit.zsh/.zinit-load-snippet
|
||||
|
||||
Uses feature(s): _kill_, _read_, _setopt_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-wrap-track-functions
|
||||
|
||||
Has 19 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _eval_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== :zinit-tmp-subst-source
|
||||
|
||||
Has 25 line(s). Calls functions:
|
||||
|
||||
:zinit-tmp-subst-source
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _eval_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,854 +0,0 @@
|
|||
|
||||
NAME
|
||||
|
||||
zinit-install.zsh - a shell script
|
||||
|
||||
Documentation automatically generated with `zshelldoc'
|
||||
|
||||
== FUNCTIONS
|
||||
+zinit-cmake-hook
|
||||
.zi::get-architecture
|
||||
.zinit-at-eval
|
||||
.zinit-compinit
|
||||
.zinit-download-file-stdout
|
||||
.zinit-download-snippet
|
||||
.zinit-extract
|
||||
.zinit-forget-completion
|
||||
.zinit-get-cygwin-package
|
||||
.zinit-get-latest-gh-r-url-part
|
||||
.zinit-get-package
|
||||
.zinit-get-url-mtime
|
||||
.zinit-install-completions
|
||||
.zinit-jq-check
|
||||
.zinit-json-get-value
|
||||
.zinit-json-to-array
|
||||
.zinit-mirror-using-svn
|
||||
.zinit-setup-plugin-dir
|
||||
.zinit-single-line
|
||||
.zinit-update-snippet
|
||||
__zinit-cmake-base-hook
|
||||
zicp
|
||||
ziextract
|
||||
zimv
|
||||
∞zinit-atclone-hook
|
||||
∞zinit-atpull-e-hook
|
||||
∞zinit-atpull-hook
|
||||
∞zinit-compile-plugin-hook
|
||||
∞zinit-configure-base-hook
|
||||
∞zinit-configure-e-hook
|
||||
∞zinit-configure-hook
|
||||
∞zinit-cp-hook
|
||||
∞zinit-extract-hook
|
||||
∞zinit-file-cp-mv-operation
|
||||
∞zinit-make-base-hook
|
||||
∞zinit-make-e-hook
|
||||
∞zinit-make-ee-hook
|
||||
∞zinit-make-hook
|
||||
∞zinit-mv-hook
|
||||
∞zinit-ps-on-update-hook
|
||||
∞zinit-reset-hook
|
||||
AUTOLOAD compinit
|
||||
|
||||
=== DETAILS
|
||||
|
||||
==== Script Body
|
||||
|
||||
Has 6 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).
|
||||
|
||||
Uses feature(s): _source_
|
||||
|
||||
==== +zinit-cmake-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
+zinit-cmake-hook
|
||||
`-- __zinit-cmake-base-hook
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zi::get-architecture
|
||||
|
||||
Has 39 line(s). Calls functions:
|
||||
|
||||
.zi::get-architecture
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-at-eval
|
||||
|
||||
Has 9 line(s). Calls functions:
|
||||
|
||||
.zinit-at-eval
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Uses feature(s): _eval_
|
||||
|
||||
Called by:
|
||||
|
||||
∞zinit-atpull-e-hook
|
||||
∞zinit-atpull-hook
|
||||
|
||||
==== .zinit-compinit
|
||||
|
||||
____
|
||||
|
||||
User-exposed `compinit' frontend which first ensures that all
|
||||
completions managed by Zinit are forgotten by Zshell. After
|
||||
that it runs normal `compinit', which should more easily detect
|
||||
Zinit's completions.
|
||||
|
||||
No arguments.
|
||||
|
||||
____
|
||||
|
||||
Has 26 line(s). Calls functions:
|
||||
|
||||
.zinit-compinit
|
||||
|-- .zinit-forget-completion
|
||||
|-- compinit
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _autoload_, _compinit_, _setopt_, _unfunction_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-install-completions
|
||||
zinit-autoload.zsh/.zinit-uninstall-completions
|
||||
zinit-autoload.zsh/.zinit-update-or-status-all
|
||||
zinit.zsh/.zinit-prepare-home
|
||||
zinit.zsh/zinit
|
||||
|
||||
==== .zinit-download-file-stdout
|
||||
|
||||
____
|
||||
|
||||
Downloads file to stdout. Supports following backend commands:
|
||||
curl, wget, lftp, lynx. Used by snippet loading.
|
||||
|
||||
____
|
||||
|
||||
Has 59 line(s). Calls functions:
|
||||
|
||||
.zinit-download-file-stdout
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _setopt_, _trap_, _type_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-download-snippet
|
||||
.zinit-get-cygwin-package
|
||||
.zinit-get-package
|
||||
.zinit-setup-plugin-dir
|
||||
|
||||
==== .zinit-download-snippet
|
||||
|
||||
____
|
||||
|
||||
Downloads snippet
|
||||
file – with curl, wget, lftp or lynx,
|
||||
directory, with Subversion – when svn-ICE is active.
|
||||
|
||||
Github supports Subversion protocol and allows to clone subdirectories.
|
||||
This is used to provide a layer of support for Oh-My-Zsh and Prezto.
|
||||
|
||||
____
|
||||
|
||||
Has 377 line(s). Calls functions:
|
||||
|
||||
.zinit-download-snippet
|
||||
|-- .zinit-download-file-stdout
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-get-url-mtime
|
||||
|-- .zinit-install-completions
|
||||
| |-- .zinit-compinit
|
||||
| | |-- .zinit-forget-completion
|
||||
| | |-- compinit
|
||||
| | `-- zinit.zsh/+zi-log
|
||||
| |-- .zinit-forget-completion
|
||||
| |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|
||||
| |-- zinit-side.zsh/.zinit-exists-physically-message
|
||||
| |-- zinit.zsh/+zi-log
|
||||
| `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|-- .zinit-mirror-using-svn
|
||||
| `-- zinit.zsh/.zinit-cd-quiet
|
||||
|-- zinit-side.zsh/.zinit-store-ices
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/is-at-least
|
||||
|
||||
Uses feature(s): _is-at-least_, _setopt_, _trap_, _zcompile_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-update-snippet
|
||||
zinit.zsh/.zinit-load-snippet
|
||||
|
||||
==== .zinit-extract
|
||||
|
||||
Has 30 line(s). Calls functions:
|
||||
|
||||
.zinit-extract
|
||||
|-- ziextract
|
||||
| `-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
∞zinit-extract-hook
|
||||
|
||||
==== .zinit-forget-completion
|
||||
|
||||
____
|
||||
|
||||
Implements alternation of Zsh state so that already initialized
|
||||
completion stops being visible to Zsh.
|
||||
|
||||
$1 - completion function name, e.g. "_cp"; can also be "cp"
|
||||
|
||||
____
|
||||
|
||||
Has 20 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _setopt_, _unfunction_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-compinit
|
||||
.zinit-install-completions
|
||||
zinit-autoload.zsh/.zinit-uninstall-completions
|
||||
zinit.zsh/zinit
|
||||
|
||||
==== .zinit-get-cygwin-package
|
||||
|
||||
Has 70 line(s). Calls functions:
|
||||
|
||||
.zinit-get-cygwin-package
|
||||
|-- .zinit-download-file-stdout
|
||||
| `-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-setup-plugin-dir
|
||||
|
||||
==== .zinit-get-latest-gh-r-url-part
|
||||
|
||||
____
|
||||
|
||||
Gets version string of latest release of given Github
|
||||
package. Connects to Github releases page.
|
||||
|
||||
____
|
||||
|
||||
Has 66 line(s). Calls functions:
|
||||
|
||||
.zinit-get-latest-gh-r-url-part
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-setup-plugin-dir
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
|
||||
==== .zinit-get-package
|
||||
|
||||
Has 197 line(s). Calls functions:
|
||||
|
||||
.zinit-get-package
|
||||
|-- .zinit-download-file-stdout
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-jq-check
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-json-to-array
|
||||
| `-- .zinit-jq-check
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- ziextract
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Uses feature(s): _eval_, _setopt_, _trap_
|
||||
|
||||
Called by:
|
||||
|
||||
zinit.zsh/.zinit-load
|
||||
|
||||
==== .zinit-get-url-mtime
|
||||
|
||||
____
|
||||
|
||||
For the given URL returns the date in the Last-Modified
|
||||
header as a time stamp
|
||||
|
||||
____
|
||||
|
||||
Has 35 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _read_, _setopt_, _trap_, _type_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-download-snippet
|
||||
|
||||
==== .zinit-install-completions
|
||||
|
||||
____
|
||||
|
||||
Installs all completions of given plugin. After that they are visible to
|
||||
'compinit'. Visible completions can be selectively disabled and enabled. User
|
||||
can access completion data with 'completions' subcommand.
|
||||
|
||||
$1 - plugin spec (4 formats: user---plugin, user/plugin, user, plugin)
|
||||
$2 - plugin if $1 (i.e., user) given
|
||||
$3 - if 1, then reinstall, otherwise only install completions that are not present
|
||||
|
||||
____
|
||||
|
||||
Has 62 line(s). Calls functions:
|
||||
|
||||
.zinit-install-completions
|
||||
|-- .zinit-compinit
|
||||
| |-- .zinit-forget-completion
|
||||
| |-- compinit
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-forget-completion
|
||||
|-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|
||||
|-- zinit-side.zsh/.zinit-exists-physically-message
|
||||
|-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-download-snippet
|
||||
.zinit-setup-plugin-dir
|
||||
zinit.zsh/zinit
|
||||
|
||||
==== .zinit-jq-check
|
||||
|
||||
____
|
||||
|
||||
Check if jq is available and outputs an error message with instructions if
|
||||
that's not the case
|
||||
|
||||
____
|
||||
|
||||
Has 8 line(s). Calls functions:
|
||||
|
||||
.zinit-jq-check
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-get-package
|
||||
.zinit-json-get-value
|
||||
.zinit-json-to-array
|
||||
|
||||
==== .zinit-json-get-value
|
||||
|
||||
____
|
||||
|
||||
Wrapper around jq that return the value of a property
|
||||
|
||||
$1: JSON structure
|
||||
$2: jq path
|
||||
|
||||
____
|
||||
|
||||
Has 4 line(s). Calls functions:
|
||||
|
||||
.zinit-json-get-value
|
||||
`-- .zinit-jq-check
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-json-to-array
|
||||
|
||||
____
|
||||
|
||||
Wrapper around jq that sets key/values of an associative array, replicating
|
||||
the structure of a given JSON object
|
||||
|
||||
$1: JSON structure
|
||||
$2: jq path
|
||||
$3: name of the associative array to store the key/value pairs in
|
||||
|
||||
____
|
||||
|
||||
Has 13 line(s). Calls functions:
|
||||
|
||||
.zinit-json-to-array
|
||||
`-- .zinit-jq-check
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _eval_, _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-get-package
|
||||
|
||||
==== .zinit-mirror-using-svn
|
||||
|
||||
____
|
||||
|
||||
Used to clone subdirectories from Github. If in update mode
|
||||
(see $2), then invokes `svn update', in normal mode invokes
|
||||
`svn checkout --non-interactive -q <URL>'. In test mode only
|
||||
compares remote and local revision and outputs true if update
|
||||
is needed.
|
||||
|
||||
$1 - URL
|
||||
$2 - mode, "" - normal, "-u" - update, "-t" - test
|
||||
$3 - subdirectory (not path) with working copy, needed for -t and -u
|
||||
|
||||
____
|
||||
|
||||
Has 29 line(s). Calls functions:
|
||||
|
||||
.zinit-mirror-using-svn
|
||||
`-- zinit.zsh/.zinit-cd-quiet
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-download-snippet
|
||||
|
||||
==== .zinit-setup-plugin-dir
|
||||
|
||||
____
|
||||
|
||||
Clones given plugin into PLUGIN_DIR. Supports multiple
|
||||
sites (respecting `from' and `proto' ice modifiers).
|
||||
Invokes compilation of plugin's main file.
|
||||
|
||||
$1 - user
|
||||
$2 - plugin
|
||||
|
||||
____
|
||||
|
||||
Has 222 line(s). Calls functions:
|
||||
|
||||
.zinit-setup-plugin-dir
|
||||
|-- .zinit-download-file-stdout
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-get-cygwin-package
|
||||
| |-- .zinit-download-file-stdout
|
||||
| | `-- zinit.zsh/+zi-log
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-get-latest-gh-r-url-part
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- .zinit-install-completions
|
||||
| |-- .zinit-compinit
|
||||
| | |-- .zinit-forget-completion
|
||||
| | |-- compinit
|
||||
| | `-- zinit.zsh/+zi-log
|
||||
| |-- .zinit-forget-completion
|
||||
| |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|
||||
| |-- zinit-side.zsh/.zinit-exists-physically-message
|
||||
| |-- zinit.zsh/+zi-log
|
||||
| `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|-- ziextract
|
||||
| `-- zinit.zsh/+zi-log
|
||||
|-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|
||||
|-- zinit-side.zsh/.zinit-store-ices
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/.zinit-get-object-path
|
||||
|
||||
Uses feature(s): _setopt_, _trap_
|
||||
|
||||
Called by:
|
||||
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
zinit.zsh/.zinit-load
|
||||
|
||||
==== .zinit-single-line
|
||||
|
||||
____
|
||||
|
||||
Display cURL progress bar on a single line
|
||||
|
||||
____
|
||||
|
||||
Has 20 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _read_, _setopt_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== .zinit-update-snippet
|
||||
|
||||
Has 76 line(s). Calls functions:
|
||||
|
||||
.zinit-update-snippet
|
||||
|-- .zinit-download-snippet
|
||||
| |-- .zinit-download-file-stdout
|
||||
| | `-- zinit.zsh/+zi-log
|
||||
| |-- .zinit-get-url-mtime
|
||||
| |-- .zinit-install-completions
|
||||
| | |-- .zinit-compinit
|
||||
| | | |-- .zinit-forget-completion
|
||||
| | | |-- compinit
|
||||
| | | `-- zinit.zsh/+zi-log
|
||||
| | |-- .zinit-forget-completion
|
||||
| | |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|
||||
| | |-- zinit-side.zsh/.zinit-exists-physically-message
|
||||
| | |-- zinit.zsh/+zi-log
|
||||
| | `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
| |-- .zinit-mirror-using-svn
|
||||
| | `-- zinit.zsh/.zinit-cd-quiet
|
||||
| |-- zinit-side.zsh/.zinit-store-ices
|
||||
| |-- zinit.zsh/+zi-log
|
||||
| |-- zinit.zsh/.zinit-cd-quiet
|
||||
| `-- zinit.zsh/is-at-least
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-get-object-path
|
||||
`-- zinit.zsh/.zinit-pack-ice
|
||||
|
||||
Uses feature(s): _eval_, _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
zinit-autoload.zsh/.zinit-update-or-status-snippet
|
||||
|
||||
==== __zinit-cmake-base-hook
|
||||
|
||||
____
|
||||
|
||||
FUNCTION: __zinit-cmake-base-hook [[[
|
||||
A base common implementation of the cmake ice
|
||||
|
||||
____
|
||||
|
||||
Has 23 line(s). Calls functions:
|
||||
|
||||
__zinit-cmake-base-hook
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _eval_, _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
+zinit-cmake-hook
|
||||
|
||||
==== zicp
|
||||
|
||||
Has 30 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
zimv
|
||||
|
||||
==== ziextract
|
||||
|
||||
____
|
||||
|
||||
If the file is an archive, it is extracted by this function.
|
||||
Executable permissions are determined solely by the execute bit already
|
||||
stored in the archive — i.e. whatever the package author intended.
|
||||
No heuristics (file(1), shebang scanning, etc.) are applied.
|
||||
|
||||
$1 - url
|
||||
$2 - file
|
||||
|
||||
____
|
||||
|
||||
Has 284 line(s). Calls functions:
|
||||
|
||||
ziextract
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _setopt_, _unfunction_, _zparseopts_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-extract
|
||||
.zinit-get-package
|
||||
.zinit-setup-plugin-dir
|
||||
|
||||
==== zimv
|
||||
|
||||
Has 3 line(s). Calls functions:
|
||||
|
||||
zimv
|
||||
`-- zicp
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-atclone-hook
|
||||
|
||||
Has 22 line(s). Calls functions:
|
||||
|
||||
∞zinit-atclone-hook
|
||||
|-- zinit-side.zsh/.zinit-countdown
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
|-- zinit.zsh/.zinit-restore-dir
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Uses feature(s): _eval_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-atpull-e-hook
|
||||
|
||||
Has 20 line(s). Calls functions:
|
||||
|
||||
∞zinit-atpull-e-hook
|
||||
|-- .zinit-at-eval
|
||||
| `-- zinit.zsh/@zinit-substitute
|
||||
|-- zinit-side.zsh/.zinit-countdown
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/.zinit-restore-dir
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-atpull-hook
|
||||
|
||||
Has 20 line(s). Calls functions:
|
||||
|
||||
∞zinit-atpull-hook
|
||||
|-- .zinit-at-eval
|
||||
| `-- zinit.zsh/@zinit-substitute
|
||||
|-- zinit-side.zsh/.zinit-countdown
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/.zinit-restore-dir
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-compile-plugin-hook
|
||||
|
||||
Has 20 line(s). Calls functions:
|
||||
|
||||
∞zinit-compile-plugin-hook
|
||||
`-- zinit-autoload.zsh/.zinit-compile-plugin
|
||||
|
||||
Uses feature(s): _setopt_, _source_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-configure-base-hook
|
||||
|
||||
____
|
||||
|
||||
A base common implementation of the configure ice
|
||||
|
||||
____
|
||||
|
||||
Has 49 line(s). Calls functions:
|
||||
|
||||
∞zinit-configure-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
|-- zinit.zsh/.zinit-restore-dir
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Uses feature(s): _eval_, _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
∞zinit-configure-e-hook
|
||||
∞zinit-configure-hook
|
||||
|
||||
==== ∞zinit-configure-e-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-configure-e-hook
|
||||
`-- ∞zinit-configure-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
|-- zinit.zsh/.zinit-restore-dir
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-configure-hook
|
||||
|
||||
____
|
||||
|
||||
The non-! version of configure'' ice. Runs in between
|
||||
of make'!' and make''. Configure script naturally runs
|
||||
before make.
|
||||
|
||||
____
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-configure-hook
|
||||
`-- ∞zinit-configure-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
|-- zinit.zsh/.zinit-restore-dir
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-cp-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-cp-hook
|
||||
`-- ∞zinit-file-cp-mv-operation
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-extract-hook
|
||||
|
||||
Has 10 line(s). Calls functions:
|
||||
|
||||
∞zinit-extract-hook
|
||||
|-- .zinit-extract
|
||||
| |-- ziextract
|
||||
| | `-- zinit.zsh/+zi-log
|
||||
| `-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-file-cp-mv-operation
|
||||
|
||||
Has 49 line(s). Calls functions:
|
||||
|
||||
∞zinit-file-cp-mv-operation
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Called by:
|
||||
|
||||
∞zinit-cp-hook
|
||||
∞zinit-mv-hook
|
||||
|
||||
==== ∞zinit-make-base-hook
|
||||
|
||||
____
|
||||
|
||||
A base common implementation of the make ice
|
||||
|
||||
____
|
||||
|
||||
Has 57 line(s). Calls functions:
|
||||
|
||||
∞zinit-make-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Uses feature(s): _eval_, _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
∞zinit-make-e-hook
|
||||
∞zinit-make-ee-hook
|
||||
∞zinit-make-hook
|
||||
|
||||
==== ∞zinit-make-e-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-make-e-hook
|
||||
`-- ∞zinit-make-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-make-ee-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-make-ee-hook
|
||||
`-- ∞zinit-make-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-make-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-make-hook
|
||||
`-- ∞zinit-make-base-hook
|
||||
|-- zinit.zsh/+zi-log
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-mv-hook
|
||||
|
||||
Has 1 line(s). Calls functions:
|
||||
|
||||
∞zinit-mv-hook
|
||||
`-- ∞zinit-file-cp-mv-operation
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-cd-quiet
|
||||
`-- zinit.zsh/@zinit-substitute
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-ps-on-update-hook
|
||||
|
||||
Has 18 line(s). Calls functions:
|
||||
|
||||
∞zinit-ps-on-update-hook
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _eval_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== ∞zinit-reset-hook
|
||||
|
||||
Has 79 line(s). Calls functions:
|
||||
|
||||
∞zinit-reset-hook
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _eval_
|
||||
|
||||
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
|
||||
|
||||
==== compinit
|
||||
|
||||
____
|
||||
|
||||
Initialisation for new style completion. This mainly contains some helper
|
||||
functions and setup. Everything else is split into different files that
|
||||
will automatically be made autoloaded (see the end of this file). The
|
||||
names of the files that will be considered for autoloading are those that
|
||||
begin with an underscores (like `_condition).
|
||||
|
||||
The first line of each of these files is read and must indicate what
|
||||
should be done with its contents:
|
||||
|
||||
`#compdef <names ...>'
|
||||
|
||||
____
|
||||
|
||||
Has 573 line(s). Doesn't call other functions.
|
||||
|
||||
Uses feature(s): _autoload_, _bindkey_, _compdef_, _compdump_, _eval_, _read_, _setopt_, _unfunction_, _zle_, _zstyle_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-compinit
|
||||
|
||||
|
|
@ -1,285 +0,0 @@
|
|||
|
||||
NAME
|
||||
|
||||
zinit-side.zsh - a shell script
|
||||
|
||||
Documentation automatically generated with `zshelldoc'
|
||||
|
||||
== FUNCTIONS
|
||||
.zinit-any-colorify-as-uspl2
|
||||
.zinit-compute-ice
|
||||
.zinit-countdown
|
||||
.zinit-exists-physically
|
||||
.zinit-exists-physically-message
|
||||
.zinit-first
|
||||
.zinit-store-ices
|
||||
.zinit-two-paths
|
||||
|
||||
=== DETAILS
|
||||
|
||||
==== Script Body
|
||||
|
||||
Has 1 line(s). No functions are called (may set up e.g. a hook, a Zle widget bound to a key, etc.).
|
||||
|
||||
==== .zinit-any-colorify-as-uspl2
|
||||
|
||||
____
|
||||
|
||||
Returns ANSI-colorified "user/plugin" string, from any supported
|
||||
plugin spec (user---plugin, user/plugin, user plugin, plugin).
|
||||
|
||||
$1 - plugin spec (4 formats: user---plugin, user/plugin, user, plugin)
|
||||
$2 - plugin (only when $1 - i.e. user - given)
|
||||
|
||||
$REPLY - ANSI-colorified "user/plugin" string
|
||||
|
||||
____
|
||||
|
||||
Has 22 line(s). Calls functions:
|
||||
|
||||
.zinit-any-colorify-as-uspl2
|
||||
|-- zinit.zsh/.zinit-any-to-pid
|
||||
`-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-exists-physically-message
|
||||
zinit-autoload.zsh/.zinit-clear-completions
|
||||
zinit-autoload.zsh/.zinit-compiled
|
||||
zinit-autoload.zsh/.zinit-create
|
||||
zinit-autoload.zsh/.zinit-exists-message
|
||||
zinit-autoload.zsh/.zinit-get-completion-owner-uspl2col
|
||||
zinit-autoload.zsh/.zinit-list-bindkeys
|
||||
zinit-autoload.zsh/.zinit-recently
|
||||
zinit-autoload.zsh/.zinit-search-completions
|
||||
zinit-autoload.zsh/.zinit-show-completions
|
||||
zinit-autoload.zsh/.zinit-show-times
|
||||
zinit-autoload.zsh/.zinit-unload
|
||||
zinit-autoload.zsh/.zinit-update-all-parallel
|
||||
zinit-autoload.zsh/.zinit-update-or-status-all
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
zinit-install.zsh/.zinit-install-completions
|
||||
zinit-install.zsh/.zinit-setup-plugin-dir
|
||||
zinit.zsh/.zinit-formatter-pid
|
||||
|
||||
==== .zinit-compute-ice
|
||||
|
||||
____
|
||||
|
||||
Computes ICE array
|
||||
- input
|
||||
- static
|
||||
- saved
|
||||
taking priorities into account.
|
||||
Can also pack resulting ices into ZINIT_SICE (see $2).
|
||||
Returns filepath to snippet directory and optional snippet file name (only
|
||||
valid if ICE[svn] is not set).
|
||||
|
||||
$1 - URL (also plugin-spec)
|
||||
$2 - "pack" or "nopack" or "pack-nf" - packing means ICE
|
||||
wins with static ice; "pack-nf" means that disk-ices will
|
||||
be ignored (no-file?)
|
||||
$3 - name of output associative array, "ICE" is the default
|
||||
$4 - name of output string parameter, to hold path to directory ("local_dir")
|
||||
$5 - name of output string parameter, to hold filename ("filename")
|
||||
$6 - name of output string parameter, to hold is-snippet 0/1-bool ("is_snippet")
|
||||
|
||||
$REPLY - snippet directory filepath
|
||||
|
||||
____
|
||||
|
||||
Has 110 line(s). Calls functions:
|
||||
|
||||
.zinit-compute-ice
|
||||
|-- .zinit-exists-physically-message
|
||||
| |-- .zinit-any-colorify-as-uspl2
|
||||
| | |-- zinit.zsh/.zinit-any-to-pid
|
||||
| | `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
| |-- .zinit-exists-physically
|
||||
| | `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
| |-- zinit.zsh/+zi-log
|
||||
| |-- zinit.zsh/.zinit-any-to-pid
|
||||
| `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|-- .zinit-two-paths
|
||||
| |-- .zinit-first
|
||||
| | |-- zinit.zsh/.zinit-any-to-pid
|
||||
| | |-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
| | |-- zinit.zsh/.zinit-find-other-matches
|
||||
| | `-- zinit.zsh/.zinit-get-object-path
|
||||
| `-- zinit.zsh/.zinit-get-object-path
|
||||
|-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
`-- zinit.zsh/.zinit-pack-ice
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
zinit-autoload.zsh/.zinit-compile-plugin
|
||||
zinit-autoload.zsh/.zinit-edit
|
||||
zinit-autoload.zsh/.zinit-recall
|
||||
zinit-autoload.zsh/.zinit-uncompile-plugin
|
||||
zinit-autoload.zsh/.zinit-update-or-status-snippet
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
|
||||
==== .zinit-countdown
|
||||
|
||||
____
|
||||
|
||||
Displays a countdown 5...4... etc.
|
||||
|
||||
$REPLY - 1 if Ctrl-C is pressed, otherwise 0
|
||||
|
||||
____
|
||||
|
||||
Has 20 line(s). Calls functions:
|
||||
|
||||
.zinit-countdown
|
||||
`-- zinit.zsh/+zi-log
|
||||
|
||||
Uses feature(s): _trap_
|
||||
|
||||
Called by:
|
||||
|
||||
zinit-install.zsh/∞zinit-atclone-hook
|
||||
zinit-install.zsh/∞zinit-atpull-e-hook
|
||||
zinit-install.zsh/∞zinit-atpull-hook
|
||||
|
||||
==== .zinit-exists-physically
|
||||
|
||||
____
|
||||
|
||||
Checks if directory of given plugin exists in PLUGIN_DIR.
|
||||
|
||||
$1 - plugin spec (4 formats: user---plugin, user/plugin, user, plugin)
|
||||
$2 - plugin (only when $1 - i.e. user - given)
|
||||
|
||||
____
|
||||
|
||||
Has 8 line(s). Calls functions:
|
||||
|
||||
.zinit-exists-physically
|
||||
`-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-exists-physically-message
|
||||
zinit-autoload.zsh/.zinit-create
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
|
||||
==== .zinit-exists-physically-message
|
||||
|
||||
____
|
||||
|
||||
Checks if directory of given plugin exists in PLUGIN_DIR, and outputs error
|
||||
message if it doesn't.
|
||||
|
||||
$1 - plugin spec (4 formats: user---plugin, user/plugin, user, plugin)
|
||||
$2 - plugin (only when $1 - i.e. user - given)
|
||||
|
||||
____
|
||||
|
||||
Has 25 line(s). Calls functions:
|
||||
|
||||
.zinit-exists-physically-message
|
||||
|-- .zinit-any-colorify-as-uspl2
|
||||
| |-- zinit.zsh/.zinit-any-to-pid
|
||||
| `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|-- .zinit-exists-physically
|
||||
| `-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|-- zinit.zsh/+zi-log
|
||||
|-- zinit.zsh/.zinit-any-to-pid
|
||||
`-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-compute-ice
|
||||
zinit-autoload.zsh/.zinit-changes
|
||||
zinit-autoload.zsh/.zinit-glance
|
||||
zinit-autoload.zsh/.zinit-stress
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
zinit-install.zsh/.zinit-install-completions
|
||||
|
||||
==== .zinit-first
|
||||
|
||||
____
|
||||
|
||||
Finds the main file of plugin. There are multiple file name formats, they are
|
||||
ordered in order starting from more correct ones, and matched.
|
||||
.zinit-load-plugin() has similar code parts and doesn't call .zinit-first() –
|
||||
for performance. Obscure matching is done in .zinit-find-other-matches, here
|
||||
and in .zinit-load(). Obscure = non-standard main-file naming convention.
|
||||
|
||||
$1 - plugin spec (4 formats: user---plugin, user/plugin, user, plugin)
|
||||
$2 - plugin (only when $1 - i.e. user - given)
|
||||
|
||||
____
|
||||
|
||||
Has 20 line(s). Calls functions:
|
||||
|
||||
.zinit-first
|
||||
|-- zinit.zsh/.zinit-any-to-pid
|
||||
|-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
|-- zinit.zsh/.zinit-find-other-matches
|
||||
`-- zinit.zsh/.zinit-get-object-path
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-two-paths
|
||||
zinit-autoload.zsh/.zinit-compile-plugin
|
||||
zinit-autoload.zsh/.zinit-glance
|
||||
zinit-autoload.zsh/.zinit-stress
|
||||
|
||||
==== .zinit-store-ices
|
||||
|
||||
____
|
||||
|
||||
Saves ice mods in given hash onto disk.
|
||||
|
||||
$1 - directory where to create or delete files
|
||||
$2 - name of hash that holds values
|
||||
$3 - additional keys of hash to store, space separated
|
||||
$4 - additional keys of hash to store, empty-meaningful ices, space separated
|
||||
$5 – URL, if applicable
|
||||
$6 – mode, svn=1, 0=single file
|
||||
|
||||
____
|
||||
|
||||
Has 30 line(s). Doesn't call other functions.
|
||||
|
||||
Called by:
|
||||
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
zinit-install.zsh/.zinit-download-snippet
|
||||
zinit-install.zsh/.zinit-setup-plugin-dir
|
||||
|
||||
==== .zinit-two-paths
|
||||
|
||||
____
|
||||
|
||||
Obtains a snippet URL without specification if it is an SVN URL (points to
|
||||
directory) or regular URL (points to file), returns 2 possible paths for
|
||||
further examination
|
||||
|
||||
$REPLY - two filepaths
|
||||
|
||||
____
|
||||
|
||||
Has 24 line(s). Calls functions:
|
||||
|
||||
.zinit-two-paths
|
||||
|-- .zinit-first
|
||||
| |-- zinit.zsh/.zinit-any-to-pid
|
||||
| |-- zinit.zsh/.zinit-any-to-user-plugin
|
||||
| |-- zinit.zsh/.zinit-find-other-matches
|
||||
| `-- zinit.zsh/.zinit-get-object-path
|
||||
`-- zinit.zsh/.zinit-get-object-path
|
||||
|
||||
Uses feature(s): _setopt_
|
||||
|
||||
Called by:
|
||||
|
||||
.zinit-compute-ice
|
||||
zinit-autoload.zsh/.zinit-update-or-status
|
||||
|
||||
File diff suppressed because it is too large
Load diff
|
|
@ -1,41 +0,0 @@
|
|||
ARG VERSION=latest
|
||||
FROM alpine:${VERSION}
|
||||
|
||||
ARG PUSERNAME=user01
|
||||
ARG PUID=1000
|
||||
ARG PGID=1000
|
||||
ARG TERM=xterm-256color
|
||||
ARG ZINIT_ZSH_VERSION
|
||||
|
||||
ENV PUSERNAME=${PUSERNAME} PUID=${PUID} PGID=${PGID} \
|
||||
SHELL=/bin/zsh TERM=${TERM} ZINIT_ZSH_VERSION=${ZINIT_ZSH_VERSION}
|
||||
|
||||
RUN apk --no-cache --virtual base add \
|
||||
coreutils curl git libuser rsync sudo zsh && \
|
||||
apk --no-cache --virtual zsh-build-tools add \
|
||||
autoconf bash build-base ncurses-dev && \
|
||||
apk --no-cache --virtual dev-tools add \
|
||||
go jq nodejs-dev npm ruby-dev neovim
|
||||
|
||||
RUN sed -ir 's#^(root:.+):/bin/ash#\1:/bin/zsh#' /etc/passwd && \
|
||||
adduser -D -s /bin/zsh -u "${PUID}" -h "/home/${PUSERNAME}" \
|
||||
"${PUSERNAME}" && \
|
||||
printf "${PUSERNAME} ALL=(ALL) NOPASSWD: ALL" > /etc/sudoers.d/user && \
|
||||
mkdir -p /src /data /data-static && \
|
||||
chown -R "${PUID}:${PGID}" /data /data-static && \
|
||||
ln -sfv /src/docker/zshenv /home/${PUSERNAME}/.zshenv && \
|
||||
ln -sfv /src/docker/zshrc /home/${PUSERNAME}/.zshrc
|
||||
|
||||
WORKDIR /home/${PUSERNAME}
|
||||
VOLUME ["/src", "/data"]
|
||||
|
||||
COPY --chown=${PUSERNAME} . /src
|
||||
|
||||
USER ${PUSERNAME}
|
||||
|
||||
# Fetch keys config and store it outside of ZINIT[HOME_DIR] since it might get
|
||||
# overridden at runtime (the /data volume)
|
||||
RUN ZINIT_HOME_DIR=/data-static ZSH_NO_INIT=1 \
|
||||
zsh -ils -c -- '@zinit-scheduler burst'
|
||||
|
||||
CMD ["/bin/zsh"]
|
||||
|
|
@ -1,26 +0,0 @@
|
|||
# Fix permissions on /data
|
||||
if [[ -z "$QUIET" ]]
|
||||
then
|
||||
echo "Setting owner of /data to ${PUID}:${PGID}" >&2
|
||||
fi
|
||||
|
||||
sudo chown "${PUID}:${PGID}" /data
|
||||
sudo chown -R "${PUID}:${PGID}" /data
|
||||
|
||||
# sync files between /data-static and /data
|
||||
if [[ -z "$NOTHING_FANCY" ]]
|
||||
then
|
||||
if [[ -z "$QUIET" ]]
|
||||
then
|
||||
echo "Copying files from /data-static to /data" >&2
|
||||
fi
|
||||
rsync -raq /data-static/ /data
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -1,69 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
zinit::setup() {
|
||||
source /src/zinit.zsh
|
||||
}
|
||||
|
||||
zinit::reload() {
|
||||
local zf
|
||||
for zf in /src/*.zsh
|
||||
do
|
||||
source "$zf"
|
||||
done
|
||||
}
|
||||
|
||||
zinit::setup-keys() {
|
||||
zinit snippet OMZL::key-bindings.zsh
|
||||
}
|
||||
|
||||
zinit::setup-annexes() {
|
||||
zinit light-mode compile'*handler' for \
|
||||
zdharma-continuum/zinit-annex-bin-gem-node \
|
||||
zdharma-continuum/zinit-annex-default-ice \
|
||||
zdharma-continuum/zinit-annex-meta-plugins \
|
||||
zdharma-continuum/zinit-annex-patch-dl \
|
||||
zdharma-continuum/zinit-annex-readurl \
|
||||
zdharma-continuum/zinit-annex-rust \
|
||||
zdharma-continuum/zinit-annex-submods \
|
||||
zdharma-continuum/zinit-annex-unscope
|
||||
}
|
||||
|
||||
zinit::setup-annexes-extra() {
|
||||
# Dependencies
|
||||
sudo apk add ruby-dev grep tree
|
||||
zinit::install-zshelldoc
|
||||
|
||||
zinit light-mode compile'*handler' for \
|
||||
zdharma-continuum/zinit-annex-man \
|
||||
zdharma-continuum/zinit-annex-test
|
||||
}
|
||||
|
||||
zinit::install-zshelldoc() {
|
||||
zinit light-mode \
|
||||
make"PREFIX=$ZPFX install" \
|
||||
for zdharma-continuum/zshelldoc
|
||||
}
|
||||
|
||||
zinit::setup-minimal() {
|
||||
zinit wait lucid light-mode for \
|
||||
atinit"zicompinit; zicdreplay" \
|
||||
zdharma-continuum/fast-syntax-highlighting \
|
||||
atload"_zsh_autosuggest_start" \
|
||||
zsh-users/zsh-autosuggestions \
|
||||
blockf atpull'zinit creinstall -q .' \
|
||||
zsh-users/zsh-completions
|
||||
}
|
||||
|
||||
zinit::pack-zsh() {
|
||||
local version="$1"
|
||||
|
||||
zinit pack"$version" for zsh
|
||||
}
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -1,21 +0,0 @@
|
|||
# Make sure TERM is set
|
||||
# Without a TERM value some ices might be ignored
|
||||
# https://github.com/zdharma-continuum/zinit/issues/97
|
||||
export TERM=${TERM:-xterm-256color}
|
||||
# Set SHELL
|
||||
export SHELL=${SHELL:-${commands[zsh]}}
|
||||
|
||||
typeset -Ag ZINIT
|
||||
|
||||
# ZINIT_HOME_DIR is used at build time to force the installation of plugins
|
||||
# etc to /data-static
|
||||
export ZINIT[HOME_DIR]=${ZINIT_HOME_DIR:-/data}
|
||||
export ZINIT[BIN_DIR]=/src
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
41
docker/zshrc
41
docker/zshrc
|
|
@ -1,41 +0,0 @@
|
|||
# Initialization. Trigger stuff that only needs to be run once, at startup.
|
||||
if [[ "$$" == 1 ]] && [[ -z "$ZSH_NO_INIT" ]]
|
||||
then
|
||||
source /src/docker/init.zsh
|
||||
fi
|
||||
|
||||
# load zinit
|
||||
source /src/zinit.zsh
|
||||
autoload -Uz _zinit
|
||||
(( ${+_comps} )) && _comps[zinit]=_zinit
|
||||
|
||||
# load zinit setup utility functions
|
||||
source /src/docker/utils.zsh
|
||||
|
||||
# Add ZPFX/bin and GOPATH/bin to PATH
|
||||
typeset -U path
|
||||
path=("${ZPFX:-${HOME}/.local/share/zinit/polaris}/bin" "${HOME}/go/bin" $path)
|
||||
|
||||
# Install custom zsh version
|
||||
if [[ -n "$ZINIT_ZSH_VERSION" ]]
|
||||
then
|
||||
zinit::pack-zsh "$ZINIT_ZSH_VERSION"
|
||||
fi
|
||||
|
||||
source /src/docker/zshrc-fancy
|
||||
|
||||
# Source init file
|
||||
INIT_FILE="/init.zsh"
|
||||
if [[ -r "$INIT_FILE" ]]
|
||||
then
|
||||
source "$INIT_FILE"
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
||||
|
|
@ -1,39 +0,0 @@
|
|||
[[ -n "$NOTHING_FANCY" ]] && return
|
||||
|
||||
# Annexes
|
||||
zinit::setup-annexes
|
||||
|
||||
# Setup keys
|
||||
zinit::setup-keys
|
||||
|
||||
# Aliases
|
||||
alias ls="ls --color=auto"
|
||||
alias vim="nvim"
|
||||
alias re-init="source /init.zsh"
|
||||
|
||||
# History
|
||||
HISTFILE=${HOME}/.local/share/zsh/history
|
||||
HISTSIZE=1000
|
||||
SAVEHIST=1000
|
||||
setopt extended_history
|
||||
setopt hist_expire_dups_first
|
||||
setopt hist_ignore_dups
|
||||
setopt hist_ignore_space
|
||||
setopt hist_verify
|
||||
setopt share_history
|
||||
|
||||
mkdir -p ${HISTFILE:A:h}
|
||||
|
||||
# Completions
|
||||
autoload -Uz compinit
|
||||
compinit
|
||||
zinit cdreplay -q
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
||||
|
|
@ -1,81 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
build() {
|
||||
cd "$(
|
||||
cd "$(dirname "$0")" > /dev/null 2>&1
|
||||
pwd -P
|
||||
)" || exit 9
|
||||
|
||||
local image_name="${1:-zinit}"
|
||||
local tag="${2:-latest}"
|
||||
local zsh_version="${3}"
|
||||
shift 3
|
||||
|
||||
local dockerfile="../docker/Dockerfile"
|
||||
|
||||
if [[ -n $zsh_version ]]; then
|
||||
tag="zsh${zsh_version}-${tag}"
|
||||
fi
|
||||
|
||||
echo -e "\e[34mBuilding image: ${image_name}\e[0m" >&2
|
||||
|
||||
local -a args
|
||||
[[ -n $NO_CACHE ]] && args+=(--no-cache "$@")
|
||||
|
||||
if docker build \
|
||||
--build-arg "PUSERNAME=$(id -u -n)" \
|
||||
--build-arg "PUID=$(id -u)" \
|
||||
--build-arg "PGID=$(id -g)" \
|
||||
--build-arg "TERM=${TERM:-xterm-256color}" \
|
||||
--build-arg "ZINIT_ZSH_VERSION=${zsh_version}" \
|
||||
--file "$dockerfile" \
|
||||
--tag "${image_name}:${tag}" \
|
||||
"${args[@]}" \
|
||||
"$(realpath ..)"; then
|
||||
{
|
||||
echo -e "\e[34mTo use this image for zunit tests run: \e[0m"
|
||||
echo -e "\e[34mexport CONTAINER_IMAGE=\"${image_name}\" CONTAINER_TAG=\"${tag}\"\e[0m"
|
||||
echo -e "\e[34mzunit run --verbose\e[0m"
|
||||
} >&2
|
||||
else
|
||||
echo -e "\e[31m❌ Container failed to build.\e[0m" >&2
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
if [[ ${BASH_SOURCE[0]} == "${0}" ]]; then
|
||||
BUILD_ZSH_VERSION="${BUILD_ZSH_VERSION:-}"
|
||||
CONTAINER_IMAGE="${CONTAINER_IMAGE:-ghcr.io/zdharma-continuum/zinit}"
|
||||
CONTAINER_TAG="${CONTAINER_TAG:-latest}"
|
||||
NO_CACHE="${NO_CACHE:-}"
|
||||
|
||||
while [[ -n $* ]]; do
|
||||
case "$1" in
|
||||
--image | -i)
|
||||
CONTAINER_IMAGE="$2"
|
||||
shift 2
|
||||
;;
|
||||
--no-cache | -N)
|
||||
NO_CACHE=1
|
||||
shift
|
||||
;;
|
||||
--zsh-version | -zv | --zv)
|
||||
BUILD_ZSH_VERSION="${2}"
|
||||
shift 2
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
build "${CONTAINER_IMAGE}" "${CONTAINER_TAG}" "${BUILD_ZSH_VERSION}" "$@"
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=bash sw=2 ts=2 et
|
||||
|
|
@ -1,260 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
parent_process() {
|
||||
local ppid pcmd
|
||||
ppid="$(ps -o ppid= -p "$$" | awk '{ print $1 }')"
|
||||
|
||||
if [[ -z $ppid ]]; then
|
||||
echo "Failed to determine parent process" >&2
|
||||
return 1
|
||||
fi
|
||||
|
||||
if pcmd="$(ps -o cmd= -p "$ppid")"; then
|
||||
echo "$pcmd"
|
||||
return
|
||||
fi
|
||||
return 1
|
||||
}
|
||||
|
||||
running_interactively() {
|
||||
if [[ -n $CI ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
if ! [[ -t 1 ]]; then
|
||||
# return false if running non-interactively, unless run with zunit
|
||||
parent_process | grep -q zunit
|
||||
fi
|
||||
}
|
||||
|
||||
create_init_config_file() {
|
||||
local tempfile
|
||||
|
||||
if [[ -z $* ]]; then
|
||||
return 1
|
||||
fi
|
||||
|
||||
tempfile="$(mktemp)"
|
||||
echo "$*" > "$tempfile"
|
||||
# DIRTYFIX perms...
|
||||
chmod 666 "$tempfile"
|
||||
echo "$tempfile"
|
||||
}
|
||||
|
||||
run() {
|
||||
local image="${CONTAINER_IMAGE:-ghcr.io/zdharma-continuum/zinit}"
|
||||
local tag="${CONTAINER_TAG:-latest}"
|
||||
local init_config="$1"
|
||||
shift
|
||||
|
||||
local -a args=(--rm)
|
||||
|
||||
local cruntime=docker
|
||||
local sudo_cmd
|
||||
if [[ -z $CI ]] && command -v podman > /dev/null 2>&1; then
|
||||
cruntime=podman
|
||||
# rootless containers are a PITA
|
||||
# https://www.tutorialworks.com/podman-rootless-volumes/
|
||||
sudo_cmd=sudo
|
||||
fi
|
||||
|
||||
if running_interactively; then
|
||||
args+=(--tty=true --interactive=true)
|
||||
fi
|
||||
|
||||
if [[ -n $init_config ]]; then
|
||||
if [[ -r $init_config ]]; then
|
||||
args+=(--volume "${init_config}:/init.zsh")
|
||||
else
|
||||
echo "❌ Init config file is not readable" >&2
|
||||
return 1
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ -n $CONTAINER_WORKDIR ]]; then
|
||||
args+=(--workdir "$CONTAINER_WORKDIR")
|
||||
fi
|
||||
|
||||
# Inherit TERM
|
||||
if [[ -n $TERM ]]; then
|
||||
args+=(--env "TERM=${TERM}")
|
||||
fi
|
||||
|
||||
if [[ -n ${CONTAINER_ENV[*]} ]]; then
|
||||
local e
|
||||
for e in "${CONTAINER_ENV[@]}"; do
|
||||
args+=(--env "${e}")
|
||||
done
|
||||
fi
|
||||
|
||||
if [[ -n ${CONTAINER_VOLUMES[*]} ]]; then
|
||||
local vol
|
||||
for vol in "${CONTAINER_VOLUMES[@]}"; do
|
||||
# shellcheck disable=2076
|
||||
if [[ ! " ${args[*]} " =~ " --volume ${vol} " ]]; then
|
||||
args+=(--volume "${vol}")
|
||||
fi
|
||||
done
|
||||
fi
|
||||
|
||||
local -a cmd=("$@")
|
||||
|
||||
if [[ -n $WRAP_CMD ]]; then
|
||||
local zsh_opts="ilsc"
|
||||
[[ -n $ZSH_DEBUG ]] && zsh_opts="x${zsh_opts}"
|
||||
cmd=(zsh "-${zsh_opts}" "${cmd[*]}")
|
||||
fi
|
||||
|
||||
if [[ -n $DEBUG ]]; then
|
||||
{
|
||||
# The @Q below is necessary to keep the quotes intact
|
||||
# https://stackoverflow.com/a/12985353/1872036
|
||||
echo -e "🚀 \e[35mRunning command"
|
||||
echo -e "\$ ${cruntime} run ${args[*]} ${image}:${tag} ${cmd[*]@Q}\e[0m"
|
||||
} >&2
|
||||
fi
|
||||
|
||||
${sudo_cmd} "${cruntime}" run "${args[@]}" "${image}:${tag}" "${cmd[@]}"
|
||||
}
|
||||
|
||||
if [[ ${BASH_SOURCE[0]} == "${0}" ]]; then
|
||||
CONTAINER_ENV=()
|
||||
CONTAINER_IMAGE="${CONTAINER_IMAGE:-ghcr.io/zdharma-continuum/zinit}"
|
||||
CONTAINER_TAG="${CONTAINER_TAG:-latest}"
|
||||
CONTAINER_VOLUMES=()
|
||||
CONTAINER_WORKDIR="${CONTAINER_WORKDIR:-}"
|
||||
DEBUG="${DEBUG:-}"
|
||||
INIT_CONFIG_VAL="${INIT_CONFIG_VAL:-}"
|
||||
PRESET="${PRESET:-}"
|
||||
WRAP_CMD="${WRAP_CMD:-}"
|
||||
ZSH_DEBUG="${ZSH_DEBUG:-}"
|
||||
|
||||
while [[ -n $* ]]; do
|
||||
case "$1" in
|
||||
# Fetch init config from clipboard (Linux only)
|
||||
--xsel | -b)
|
||||
INIT_CONFIG_VAL="$(xsel -b)"
|
||||
shift
|
||||
;;
|
||||
-c | --config | --init-config | --init)
|
||||
INIT_CONFIG_VAL="$2"
|
||||
shift 2
|
||||
;;
|
||||
-f | --config-file | --init-config-file | --file)
|
||||
if ! [[ -r $2 ]]; then
|
||||
echo "Unable to read from file: $2" >&2
|
||||
exit 2
|
||||
fi
|
||||
INIT_CONFIG_VAL="$(cat "$2")"
|
||||
shift 2
|
||||
;;
|
||||
-d | --debug)
|
||||
DEBUG=1
|
||||
shift
|
||||
;;
|
||||
-D | --dev | --devel)
|
||||
DEVEL=1
|
||||
shift
|
||||
;;
|
||||
--docs)
|
||||
PRESET=docs
|
||||
shift
|
||||
;;
|
||||
-i | --image)
|
||||
CONTAINER_IMAGE="$2"
|
||||
shift 2
|
||||
;;
|
||||
-t | --tag)
|
||||
CONTAINER_TAG="$2"
|
||||
shift 2
|
||||
;;
|
||||
# Additional container env vars
|
||||
-e | --env | --environment)
|
||||
CONTAINER_ENV+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
# Additional container volumes
|
||||
-v | --volume)
|
||||
CONTAINER_VOLUMES+=("$2")
|
||||
shift 2
|
||||
;;
|
||||
# Whether to wrap the command in zsh -silc
|
||||
-w | --wrap)
|
||||
WRAP_CMD=1
|
||||
shift
|
||||
;;
|
||||
--tests | --zunit | -z)
|
||||
PRESET=zunit
|
||||
shift
|
||||
;;
|
||||
# Whether to enable debug tracing of zinit (zsh -x)
|
||||
# Only applies to wrapped commands (--w|--wrap)
|
||||
--zsh-debug | -x | -Z)
|
||||
ZSH_DEBUG=1
|
||||
shift
|
||||
;;
|
||||
*)
|
||||
break
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
GIT_ROOT_DIR="$(git rev-parse --show-toplevel)"
|
||||
CMD=("$@")
|
||||
|
||||
case "$PRESET" in
|
||||
zunit)
|
||||
# Mount root of the repo to /src
|
||||
# Mount /tmp/zunit-zinit to /data
|
||||
CONTAINER_VOLUMES+=(
|
||||
"${GIT_ROOT_DIR}:/src"
|
||||
"${TMPDIR:-/tmp}/zunit-zinit:/data"
|
||||
)
|
||||
CONTAINER_ENV+=(
|
||||
"QUIET=1"
|
||||
"NOTHING_FANCY=1"
|
||||
)
|
||||
;;
|
||||
docs)
|
||||
# Mount root of the repo to /src
|
||||
CONTAINER_VOLUMES+=(
|
||||
"${GIT_ROOT_DIR}:/src"
|
||||
)
|
||||
CONTAINER_ENV+=(
|
||||
"QUIET=1"
|
||||
"NOTHING_FANCY=1"
|
||||
"LC_ALL=en_US.UTF-8"
|
||||
)
|
||||
CONTAINER_WORKDIR=/src
|
||||
# shellcheck disable=2016
|
||||
INIT_CONFIG_VAL='zinit nocompile make'\''prefix=$ZPFX all install'\'' for zdharma-continuum/zshelldoc'
|
||||
# shellcheck disable=2016
|
||||
CMD=(zsh -ilsc
|
||||
'sudo chown -R "$(id -u):$(id -g)" /src &&
|
||||
@zinit-scheduler burst &&
|
||||
sudo apk add tree &&
|
||||
make -C /src doc')
|
||||
;;
|
||||
esac
|
||||
|
||||
if INIT_CONFIG="$(create_init_config_file "$INIT_CONFIG_VAL")"; then
|
||||
trap 'rm -vf $INIT_CONFIG' EXIT INT
|
||||
fi
|
||||
|
||||
if [[ -n $DEVEL ]]; then
|
||||
# Mount root of the repo to /src
|
||||
CONTAINER_VOLUMES+=(
|
||||
"${GIT_ROOT_DIR}:/src"
|
||||
)
|
||||
fi
|
||||
|
||||
run "$INIT_CONFIG" "${CMD[@]}"
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=bash sw=2 ts=2 et
|
||||
|
|
@ -1,333 +0,0 @@
|
|||
#!/usr/bin/env bash
|
||||
|
||||
{ # Colors
|
||||
COLOR_RESET='[0m'
|
||||
COLOR_BOLD_RED='[1;31m'
|
||||
COLOR_BOLD_GREEN='[1;32m'
|
||||
COLOR_BOLD_YELLOW='[1;33m'
|
||||
COLOR_BOLD_BLUE='[1;34m'
|
||||
COLOR_BOLD_MAGENTA='[1;35m'
|
||||
COLOR_BOLD_CYAN='[1;36m'
|
||||
|
||||
# The over-the-top fancy ones
|
||||
COLOR_PALE_MAGENTA='[38;5;177m'
|
||||
COLOR_BOLD_WHITE_ON_BLACK='[1;37;40m'
|
||||
}
|
||||
|
||||
echo_fancy() {
|
||||
emoji="$1"
|
||||
color="$2"
|
||||
shift 2
|
||||
|
||||
msg=""
|
||||
# prepend emoji, unless NO_EMOJI is set
|
||||
if [ -z "$NO_EMOJI" ]; then
|
||||
msg="$emoji"
|
||||
fi
|
||||
|
||||
# wrap every word in color (needed in case there are custom colors in
|
||||
# the message itself), unless NO_COLOR is set
|
||||
for str in "$@"; do
|
||||
# FIXME: NO_COLOR only applies if there are no colors in the msg
|
||||
if [ -z "$NO_COLOR" ]; then
|
||||
msg="${msg}${color}"
|
||||
fi
|
||||
msg="${msg}${str}"
|
||||
done
|
||||
|
||||
# Actual output
|
||||
echo "${msg}${COLOR_RESET}" >&2
|
||||
# fake "local" vars
|
||||
unset emoji color str msg
|
||||
}
|
||||
|
||||
echo_info() {
|
||||
echo_fancy "🔵" "${COLOR_BOLD_BLUE}" "INFO: ${*}"
|
||||
}
|
||||
|
||||
echo_success() {
|
||||
echo_fancy "✅" "${COLOR_BOLD_GREEN}" "SUCCESS: ${*}"
|
||||
}
|
||||
|
||||
echo_warning() {
|
||||
echo_fancy "🚧" "${COLOR_BOLD_YELLOW}" "WARNING: ${*}"
|
||||
}
|
||||
|
||||
echo_error() {
|
||||
echo_fancy "❌" "${COLOR_BOLD_RED}" "ERROR: ${*}"
|
||||
}
|
||||
|
||||
check_dependencies() {
|
||||
zsh_min_version=5.8
|
||||
if ! zsh -sfc \
|
||||
'autoload is-at-least;
|
||||
is-at-least $1 $ZSH_VERSION' "$zsh_min_version"; then
|
||||
echo_warning "ZSH version 5.5+ is recommended for zinit." \
|
||||
"It'll still work, but be warned."
|
||||
fi
|
||||
|
||||
if ! command -v git > /dev/null 2>&1; then
|
||||
echo_error "${COLOR_BOLD_GREEN}git${COLOR_RESET} is not installed"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
unset zsh_min_version
|
||||
}
|
||||
|
||||
show_environment() {
|
||||
echo_info "About to setup zinit from $ZINIT_REPO" \
|
||||
"(branch: $ZINIT_BRANCH - commit: ${ZINIT_COMMIT:-N/A})" \
|
||||
"to ${ZINIT_INSTALL_DIR}"
|
||||
}
|
||||
|
||||
create_zinit_home() {
|
||||
if ! test -d "${ZINIT_HOME}"; then
|
||||
mkdir -p "${ZINIT_HOME}"
|
||||
chmod g-w "${ZINIT_HOME}"
|
||||
chmod o-w "${ZINIT_HOME}"
|
||||
fi
|
||||
}
|
||||
|
||||
create_zinit_tmpdir() {
|
||||
# use -d instead of --directory for macos (BSD) compatibility
|
||||
ZINIT_TMPDIR="$(mktemp -d)"
|
||||
if [ ! -d "$ZINIT_TMPDIR" ]; then
|
||||
echo_error "Tempdir creation failed. This ain't good"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
trap 'rm -rvf "$ZINIT_TMPDIR"' EXIT INT
|
||||
}
|
||||
|
||||
# Get the download-progress bar tool
|
||||
download_git_output_processor() {
|
||||
url="https://raw.githubusercontent.com/${ZINIT_REPO}/${ZINIT_COMMIT:-${ZINIT_BRANCH}}/share/git-process-output.zsh"
|
||||
script_path="${ZINIT_TMPDIR}/git-process-output.zsh"
|
||||
|
||||
echo_info "Fetching git-process-output.zsh from $url"
|
||||
if command -v curl > /dev/null 2>&1; then
|
||||
curl -fsSL -o "$script_path" "$url"
|
||||
elif command -v wget > /dev/null 2>&1; then
|
||||
wget -q -O "$script_path" "$url"
|
||||
fi
|
||||
|
||||
# shellcheck disable=2181
|
||||
if [ "$?" -eq 0 ]; then
|
||||
chmod a+x "$script_path" 2> /dev/null
|
||||
echo_success 'Download finished!'
|
||||
else
|
||||
echo_warning "Download failed."
|
||||
fi
|
||||
|
||||
unset url script_path
|
||||
}
|
||||
|
||||
zinit_git_exec() {
|
||||
command git -C "${ZINIT_INSTALL_DIR}" "$@"
|
||||
}
|
||||
|
||||
zinit_checkout_ref() {
|
||||
ref="${ZINIT_BRANCH}"
|
||||
git_obj_type="branch"
|
||||
|
||||
if [ -n "$ZINIT_COMMIT" ]; then
|
||||
ref="$ZINIT_COMMIT"
|
||||
git_obj_type="commit"
|
||||
fi
|
||||
|
||||
if zinit_git_exec checkout "$ref" > /dev/null 2>&1; then
|
||||
echo_success "Checked out $git_obj_type $ref"
|
||||
else
|
||||
echo_error "Failed to check out $git_obj_type $ref"
|
||||
fi
|
||||
|
||||
unset ref git_obj_type
|
||||
}
|
||||
|
||||
zinit_current_version() {
|
||||
zinit_git_exec describe --tags 2> /dev/null
|
||||
}
|
||||
|
||||
zinit_update() {
|
||||
cd "${ZINIT_INSTALL_DIR}" || {
|
||||
echo_error "Failed to cd to ${ZINIT_INSTALL_DIR}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo_info "Updating ${COLOR_BOLD_CYAN}zinit${COLOR_RESET} in" \
|
||||
"in ${COLOR_BOLD_MAGENTA}${ZINIT_INSTALL_DIR}"
|
||||
{ # Clean up repo
|
||||
zinit_git_exec clean -d -f -f
|
||||
zinit_git_exec reset --hard HEAD
|
||||
} > /dev/null 2>&1
|
||||
|
||||
# fetch our branch (to ensure the target commit exists locally)
|
||||
zinit_git_exec fetch origin "$ZINIT_BRANCH"
|
||||
|
||||
zinit_checkout_ref
|
||||
if zinit_git_exec pull origin "$ZINIT_BRANCH"; then
|
||||
echo_success "Updated zinit to $(zinit_current_version)"
|
||||
fi
|
||||
}
|
||||
|
||||
zinit_install() {
|
||||
cd "${ZINIT_HOME}" || {
|
||||
echo_error "Failed to cd to ${ZINIT_HOME}"
|
||||
exit 1
|
||||
}
|
||||
|
||||
echo_info "Installing ${COLOR_BOLD_CYAN}zinit${COLOR_RESET} to " \
|
||||
"${COLOR_BOLD_MAGENTA}${ZINIT_INSTALL_DIR}"
|
||||
{
|
||||
command git clone --progress --branch "$ZINIT_BRANCH" \
|
||||
"https://github.com/${ZINIT_REPO}" \
|
||||
"${ZINIT_REPO_DIR_NAME}" 2>&1 | {
|
||||
"${ZINIT_TMPDIR}/git-process-output.zsh" || cat
|
||||
}
|
||||
} 2> /dev/null
|
||||
|
||||
zinit_checkout_ref
|
||||
|
||||
if [ -d "${ZINIT_REPO_DIR_NAME}" ]; then
|
||||
echo_success "Zinit succesfully installed to " \
|
||||
"${COLOR_BOLD_GREEN}${ZINIT_INSTALL_DIR}"
|
||||
echo_info "Zinit Version: ${COLOR_BOLD_GREEN}$(zinit_current_version)"
|
||||
else
|
||||
echo_error "Failed to install Zinit to ${COLOR_BOLD_YELLOW}${ZINIT_INSTALL_DIR}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Modify .zshrc
|
||||
edit_zshrc() {
|
||||
rc_update=1
|
||||
if grep -E '(zinit|zplugin)\.zsh' "${ZSHRC}" > /dev/null 2>&1; then
|
||||
echo_warning "${ZSHRC} already contains zinit commands. Not making any changes."
|
||||
rc_update=0
|
||||
fi
|
||||
|
||||
if [ $rc_update -eq 1 ]; then
|
||||
echo_info "Updating ${ZSHRC} (10 lines of code, at the bottom)"
|
||||
zinit_home_escaped=${ZINIT_HOME//$HOME/\$HOME}
|
||||
command cat <<- EOF >> "$ZSHRC"
|
||||
|
||||
### Added by Zinit's installer
|
||||
if [[ ! -f ${zinit_home_escaped}/${ZINIT_REPO_DIR_NAME}/zinit.zsh ]]; then
|
||||
print -P "%F{33} %F{220}Installing %F{33}ZDHARMA-CONTINUUM%F{220} Initiative Plugin Manager (%F{33}${ZINIT_REPO}%F{220})…%f"
|
||||
command mkdir -p "${zinit_home_escaped}" && command chmod g-rwX "${zinit_home_escaped}"
|
||||
command git clone https://github.com/${ZINIT_REPO} "${zinit_home_escaped}/${ZINIT_REPO_DIR_NAME}" && \\
|
||||
print -P "%F{33} %F{34}Installation successful.%f%b" || \\
|
||||
print -P "%F{160} The clone has failed.%f%b"
|
||||
fi
|
||||
|
||||
source "${zinit_home_escaped}/${ZINIT_REPO_DIR_NAME}/zinit.zsh"
|
||||
autoload -Uz _zinit
|
||||
(( \${+_comps} )) && _comps[zinit]=_zinit
|
||||
EOF
|
||||
fi
|
||||
|
||||
unset rc_update zinit_home_escaped
|
||||
}
|
||||
|
||||
query_for_annexes() {
|
||||
zshrc_annex_file="$(mktemp)"
|
||||
command cat <<- EOF >> "$zshrc_annex_file"
|
||||
|
||||
# Load a few important annexes, without Turbo
|
||||
# (this is currently required for annexes)
|
||||
zinit light-mode for \\
|
||||
zdharma-continuum/zinit-annex-as-monitor \\
|
||||
zdharma-continuum/zinit-annex-bin-gem-node \\
|
||||
zdharma-continuum/zinit-annex-patch-dl \\
|
||||
zdharma-continuum/zinit-annex-rust
|
||||
|
||||
EOF
|
||||
# Ask user if we should add the annexes to their zshrc
|
||||
# If NO_INPUT is set, but NO_ANNEXES is the annexes bit gets appended to the
|
||||
# config (ie. default to yes if NO_INPUT, unless NO_ANNEXES)
|
||||
reply=n
|
||||
if [ -n "$NO_INPUT" ]; then
|
||||
[ -z "$NO_ANNEXES" ] && reply=y
|
||||
else
|
||||
echo "${COLOR_PALE_MAGENTA}${COLOR_RESET} Would you like to add 4 useful plugins" \
|
||||
"- the most useful annexes (Zinit extensions that add new" \
|
||||
"functions-features to the plugin manager) to the zshrc as well?" \
|
||||
"It will be the following snippet:"
|
||||
command cat "$zshrc_annex_file"
|
||||
# shellcheck disable=2059
|
||||
printf "${COLOR_PALE_MAGENTA}${COLOR_RESET} Enter y/n and press Return: "
|
||||
read -r reply
|
||||
fi
|
||||
|
||||
if [ "$reply" = y ] || [ "$reply" = Y ]; then
|
||||
command cat "$zshrc_annex_file" >> "$ZSHRC"
|
||||
echo_info "Installing annexes"
|
||||
zsh -ic "@zinit-scheduler burst"
|
||||
echo_success 'Done!'
|
||||
else
|
||||
echo_warning "Skipped the annexes."
|
||||
fi
|
||||
|
||||
command cat <<- EOF >> "$ZSHRC"
|
||||
### End of Zinit's installer chunk
|
||||
EOF
|
||||
unset reply zshrc_annex_file
|
||||
}
|
||||
|
||||
display_tutorial() {
|
||||
command cat <<- EOF
|
||||
|
||||
🌻 ${COLOR_BOLD_WHITE_ON_BLACK}Welcome!${COLOR_RESET}
|
||||
|
||||
Now to get started you can check out the following:
|
||||
|
||||
- The ${COLOR_BOLD_WHITE_ON_BLACK}README${COLOR_RESET} section on the ice-modifiers:
|
||||
🧊 https://github.com/${ZINIT_REPO}#ice-modifiers
|
||||
- There's also an ${COLOR_BOLD_WHITE_ON_BLACK}introduction${COLOR_RESET} to Zinit on the wiki:
|
||||
📚 https://zdharma-continuum.github.io/zinit/wiki/INTRODUCTION/
|
||||
- The ${COLOR_BOLD_WHITE_ON_BLACK}For-Syntax${COLOR_RESET} article on the wiki, which highlights some best practices:
|
||||
📖 https://zdharma-continuum.github.io/zinit/wiki/For-Syntax/
|
||||
|
||||
💁 Need help?
|
||||
- 💬 Get in touch with us on Gitter: https://gitter.im/zdharma-continuum
|
||||
- 🔖 Or on GitHub: https://github.com/zdharma-continuum
|
||||
EOF
|
||||
}
|
||||
|
||||
# Globals. Can be overridden.
|
||||
ZINIT_REPO="${ZINIT_REPO:-zdharma-continuum/zinit}"
|
||||
ZINIT_BRANCH="${ZINIT_BRANCH:-main}"
|
||||
ZINIT_COMMIT="${ZINIT_COMMIT:-}" # no default value
|
||||
ZINIT_HOME="${ZINIT_HOME:-${XDG_DATA_HOME:-${HOME}/.local/share}/zinit}"
|
||||
ZINIT_REPO_DIR_NAME="${ZINIT_REPO_DIR_NAME:-zinit.git}"
|
||||
ZINIT_INSTALL_DIR=${ZINIT_INSTALL_DIR:-${ZINIT_HOME}/${ZINIT_REPO_DIR_NAME}}
|
||||
ZSHRC="${ZSHRC:-${ZDOTDIR:-${HOME}}/.zshrc}"
|
||||
|
||||
show_environment
|
||||
check_dependencies
|
||||
create_zinit_home
|
||||
create_zinit_tmpdir
|
||||
download_git_output_processor
|
||||
|
||||
if [ -d "${ZINIT_INSTALL_DIR}/.git" ]; then
|
||||
zinit_update
|
||||
ZINIT_UPDATE=1
|
||||
else
|
||||
zinit_install
|
||||
fi
|
||||
|
||||
if [ -z "$NO_EDIT" ]; then
|
||||
edit_zshrc
|
||||
[ -z "$ZINIT_UPDATE" ] && query_for_annexes
|
||||
fi
|
||||
|
||||
if [ -z "$NO_TUTORIAL" ]; then
|
||||
display_tutorial
|
||||
fi
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=bash sw=2 ts=2 et
|
||||
|
|
@ -1,186 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
#
|
||||
# Copyright (c) 2016-2020 Sebastian Gniazdowski and contributors
|
||||
# Copyright (c) 2021-2022 zdharma-continuum and contributors
|
||||
|
||||
emulate -LR zsh
|
||||
|
||||
setopt typesetsilent extendedglob warncreateglobal
|
||||
|
||||
{ typeset -g COLS="$(tput cols)" } 2>/dev/null
|
||||
|
||||
if (( COLS < 10 )); then
|
||||
COLS=40
|
||||
fi
|
||||
|
||||
# Credit to molovo/revolver for the ideas
|
||||
progress_frames='0.1 ⠋ ⠙ ⠹ ⠸ ⠼ ⠴ ⠦ ⠧ ⠇ ⠏'
|
||||
integer -g cur_frame=1
|
||||
typeset -F SECONDS=0 last_time=0
|
||||
|
||||
# Alpine Linux doesn't have tput; FreeBSD and Dragonfly BSD have termcap
|
||||
if whence tput &> /dev/null; then
|
||||
if [[ $OSTYPE == freebsd* ]] || [[ $OSTYPE == dragonfly* ]]; then
|
||||
# termcap commands
|
||||
ZINIT_CNORM='tput ve'
|
||||
ZINIT_CIVIS='tput vi'
|
||||
else
|
||||
# terminfo is more common
|
||||
ZINIT_CNORM='tput cnorm'
|
||||
ZINIT_CIVIS='tput civis'
|
||||
fi
|
||||
fi
|
||||
|
||||
if (( $+ZINIT_CNORM )); then
|
||||
trap $ZINIT_CNORM EXIT INT TERM
|
||||
fi
|
||||
|
||||
local first=1
|
||||
|
||||
# Code by leoj3n
|
||||
timeline() {
|
||||
local sp='▚▞'; sp="${sp:$2%2:1}"
|
||||
# Maximal width is 24 characters
|
||||
local bar="$(print -f "%.$2s█%0$(($3-$2-1))s" "████████████████████████" "")"
|
||||
|
||||
local -a frames_splitted
|
||||
frames_splitted=( ${(@zQ)progress_frames} )
|
||||
if (( SECONDS - last_time >= frames_splitted[1] )); then
|
||||
(( cur_frame = (cur_frame+1) % (${#frames_splitted}+1-1) ))
|
||||
(( cur_frame = cur_frame ? cur_frame : 1 ))
|
||||
last_time=$SECONDS
|
||||
fi
|
||||
|
||||
print -nr -- ${frames_splitted[cur_frame+1]}" "
|
||||
print -nPr "%F{183}"
|
||||
print -f "%s %s" "${bar// /░}" ""
|
||||
print -nPr "%f"
|
||||
}
|
||||
|
||||
# $1 - n. of objects
|
||||
# $2 - packed objects
|
||||
# $3 - total objects
|
||||
# $4 - receiving percentage
|
||||
# $5 - resolving percentage
|
||||
print_my_line() {
|
||||
local col="%F{155}" col3="%F{155}" col4="%F{155}" col5="%F{155}"
|
||||
[[ -n "${4#...}" && -z "${5#...}" ]] && col3="%F{81}"
|
||||
[[ -n "${5#...}" ]] && col4="%F{81}"
|
||||
|
||||
if (( COLS >= 70 )); then
|
||||
print -Pnr -- "${col}OBJ%f: $1, ${col}PACK%f: $2/$3${${4:#...}:+, ${col3}REC%f: $4%}${${5:#...}:+, ${col4}RES%f: $5%} "
|
||||
elif (( COLS >= 60 )); then
|
||||
print -Pnr -- "${col}OBJ%f: $1, ${${4:#...}:+, ${col3}REC%f: $4%}${${5:#...}:+, ${col4}RES%f: $5%} "
|
||||
else
|
||||
print -Pnr -- "${${4:#...}:+, ${col3}REC%f: $4%}${${5:#...}:+, ${col4}RES%f: $5%} "
|
||||
fi
|
||||
|
||||
print -n $'\015'
|
||||
}
|
||||
|
||||
print_my_line_compress() {
|
||||
local col="%F{155}" col3="%F{155}" col4="%F{155}" col5="%F{155}"
|
||||
[[ -n "${4#...}" && -z "${5#...}" && -z "${6#...}" ]] && col3="%F{81}"
|
||||
[[ -n "${5#...}" && -z "${6#...}" ]] && col4="%F{81}"
|
||||
[[ -n "${6#...}" ]] && col5="%F{81}"
|
||||
if (( COLS >= 80 )); then
|
||||
print -Pnr -- "${col}OBJ%f: $1, ${col}PACK%f: $2/$3, ${col3}COMPR%f: $4%%${${5:#...}:+, ${col4}REC%f: $5%%}${${6:#...}:+, ${col5}RES%f: $6%%} "
|
||||
elif (( COLS >= 65 )); then
|
||||
print -Pnr -- "${col}OBJ%f: $1, ${col3}COMPR%f: $4%%${${5:#...}:+, ${col4}REC%f: $5%%}${${6:#...}:+, ${col5}RES%f: $6%%} "
|
||||
else
|
||||
print -Pnr -- "${col}OBJ%f: $1, ${${5:#...}:+, ${col4}REC%f: $5%%}${${6:#...}:+, ${col5}RES%f: $6%%} "
|
||||
fi
|
||||
print -n $'\015'
|
||||
}
|
||||
|
||||
integer have_1_counting=0 have_2_total=0 have_3_receiving=0 have_4_deltas=0 have_5_compress=0
|
||||
integer counting_1=0 total_2=0 total_packed_2=0 receiving_3=0 deltas_4=0 compress_5=0
|
||||
integer loop_count=0
|
||||
|
||||
IFS=''
|
||||
|
||||
[[ $+ZINIT_CIVIS == 1 && -n $TERM ]] && eval $ZINIT_CIVIS
|
||||
|
||||
if [[ -n $TERM ]]; then
|
||||
|
||||
{ command perl -pe 'BEGIN { $|++; $/ = \1 }; tr/\r/\n/' || gstdbuf -o0 gtr '\r' '\n' || cat } |& while read -r line; do
|
||||
(( ++ loop_count ))
|
||||
if [[ "$line" = "Cloning into"* ]]; then
|
||||
print $line
|
||||
continue
|
||||
elif [[ "$line" = (#i)*user*name* || "$line" = (#i)*password* ]]; then
|
||||
print $line
|
||||
continue
|
||||
elif [[ "$line" = remote:*~*(Counting|Total|Compressing|Enumerating)* || "$line" = fatal:* ]]; then
|
||||
print $line
|
||||
continue
|
||||
fi
|
||||
if [[ "$line" = (#b)"remote: Counting objects:"[\ ]#([0-9]##)(*) ]]; then
|
||||
have_1_counting=1
|
||||
counting_1="${match[1]}"
|
||||
fi
|
||||
if [[ "$line" = (#b)"remote: Enumerating objects:"[\ ]#([0-9]##)(*) ]]; then
|
||||
have_1_counting=1
|
||||
counting_1="${match[1]}"
|
||||
fi
|
||||
if [[ "$line" = (#b)*"remote: Total"[\ ]#([0-9]##)*"pack-reused"[\ ]#([0-9]##)* ]]; then
|
||||
have_2_total=1
|
||||
total_2="${match[1]}" total_packed_2="${match[2]}"
|
||||
fi
|
||||
if [[ "$line" = (#b)"Receiving objects:"[\ ]#([0-9]##)%([[:blank:]]#\(([0-9]##)/([0-9]##)\)|)* ]]; then
|
||||
have_3_receiving=1
|
||||
receiving_3="${match[1]}"
|
||||
if [[ -n "${match[2]}" ]]; then
|
||||
have_2_total=1
|
||||
total_packed_2="${match[3]}" total_2="${match[4]}"
|
||||
fi
|
||||
fi
|
||||
|
||||
if [[ "$line" = (#b)"Resolving deltas:"[\ ]#([0-9]##)%* ]]; then
|
||||
have_4_deltas=1
|
||||
deltas_4="${match[1]}"
|
||||
fi
|
||||
|
||||
if [[ "$line" = (#b)"remote: Compressing objects:"[\ ]#([0-9]##)"%"(*) ]]; then
|
||||
have_5_compress=1
|
||||
compress_5="${match[1]}"
|
||||
fi
|
||||
|
||||
if (( loop_count >= 2 )); then
|
||||
integer pr
|
||||
(( pr = have_4_deltas ? deltas_4 / 10 : ( have_3_receiving ? receiving_3 / 10 : ( have_5_compress ? compress_5 / 10 : ((( loop_count - 1 )/14 ) % 10) + 1 )) ))
|
||||
timeline "" $pr 11
|
||||
if (( have_5_compress )); then
|
||||
print_my_line_compress "${${${(M)have_1_counting:#1}:+$counting_1}:-...}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_packed_2}:-0}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_2}:-0}" \
|
||||
"${${${(M)have_5_compress:#1}:+$compress_5}:-...}" \
|
||||
"${${${(M)have_3_receiving:#1}:+$receiving_3}:-...}" \
|
||||
"${${${(M)have_4_deltas:#1}:+$deltas_4}:-...}"
|
||||
else
|
||||
print_my_line "${${${(M)have_1_counting:#1}:+$counting_1}:-...}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_packed_2}:-0}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_2}:-0}" \
|
||||
"${${${(M)have_3_receiving:#1}:+$receiving_3}:-...}" \
|
||||
"${${${(M)have_4_deltas:#1}:+$deltas_4}:-...}"
|
||||
fi
|
||||
fi
|
||||
done
|
||||
|
||||
else
|
||||
grep fatal:
|
||||
fi
|
||||
|
||||
print
|
||||
|
||||
[[ $+ZINIT_CNORM == 1 && -n $TERM ]] && eval $ZINIT_CNORM
|
||||
|
||||
unset ZINIT_CNORM ZINIT_CIVIS
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -1,64 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
#
|
||||
# -*- mode: sh; sh-indentation: 2; indent-tabs-mode: nil; sh-basic-offset: 2; -*-
|
||||
#
|
||||
# Copyright (c) 2016-2020 Sebastian Gniazdowski and contributors
|
||||
# Copyright (c) 2021-2022 zdharma-continuum and contributors
|
||||
|
||||
emulate -R zsh -o extendedglob
|
||||
|
||||
local pkg=$1
|
||||
if [[ -z $pkg || ! -e $pkg ]]; then
|
||||
print -u2 -Pr "%F{160}rpm2cpio.sh%f: no package supplied"
|
||||
exit 1
|
||||
fi
|
||||
|
||||
local leadsize=96
|
||||
local o=$(( $leadsize + 8 ))
|
||||
set -- ${(s: :)$(od -j $o -N 8 -t u1 $pkg)}
|
||||
local i=$(( 256 * ( 256 * ( 256 * $2 + $3 ) + $4 ) + $5 ))
|
||||
local d=$(( 256 * ( 256 * ( 256 * $6 + $7 ) + $8 ) + $9 ))
|
||||
|
||||
sigsize=$(( 8 + 16 * $i + $d ))
|
||||
o=$(( $o + $sigsize + ( 8 - ( $sigsize % 8 ) ) % 8 + 8 ))
|
||||
set -- ${(s: :)$(od -j $o -N 8 -t u1 $pkg)}
|
||||
i=$(( 256 * ( 256 * ( 256 * $2 + $3 ) + $4 ) + $5 ))
|
||||
d=$(( 256 * ( 256 * ( 256 * $6 + $7 ) + $8 ) + $9 ))
|
||||
|
||||
local hdrsize=$(( 8 + 16 * $i + $d ))
|
||||
o=$(( $o + $hdrsize ))
|
||||
local -a UNPACKCMD
|
||||
UNPACKCMD=( dd if=$pkg ibs=$o skip=1 )
|
||||
|
||||
local COMPRESSION="$($=UNPACKCMD | file -)"
|
||||
local -a DECOMPRESSCMD
|
||||
|
||||
if [[ $COMPRESSION == (#i)*gzip* ]]; then
|
||||
DECOMPRESSCMD=( gunzip )
|
||||
elif [[ $COMPRESSION == (#i)*bzip2* ]]; then
|
||||
DECOMPRESSCMD=( bunzip2 )
|
||||
elif [[ $COMPRESSION == (#i)*xz* ]]; then
|
||||
DECOMPRESSCMD=( unxz )
|
||||
elif [[ $COMPRESSION == (#i)*cpio* ]]; then
|
||||
DECOMPRESSCMD=( cat )
|
||||
else
|
||||
DECOMPRESSCMD=( $(which unlzma 2>/dev/null) )
|
||||
if [[ $DECOMPRESSCMD != /* ]]; then
|
||||
DECOMPRESSCMD=( $(which lzmash 2>/dev/null) )
|
||||
if [[ $DECOMPRESSCMD == /* ]]; then
|
||||
DECOMPRESSCMD=( lzmash -d -c )
|
||||
else
|
||||
DECOMPRESSCMD=( cat )
|
||||
fi
|
||||
fi
|
||||
fi
|
||||
|
||||
command "$UNPACKCMD[@]" 2>/dev/null | command "$DECOMPRESSCMD[@]"
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et
|
||||
|
|
@ -1,45 +0,0 @@
|
|||
#!/usr/bin/env zsh
|
||||
#
|
||||
# Copyright (c) YEAR USER_NAME
|
||||
|
||||
# An example of type-agnostic script/function, i.e.: the file can be run as a +x
|
||||
# script or as an autoload function.
|
||||
|
||||
# Set the base and typically useful options
|
||||
emulate -LR zsh
|
||||
setopt extendedglob warncreateglobal typesetsilent noshortloops rcquotes noautopushd
|
||||
|
||||
# Run as script? ZSH_SCRIPT is a Zsh 5.3 addition
|
||||
if [[ $0 != template-script || -n $ZSH_SCRIPT ]]; then
|
||||
# Handle $0 according to the Zsh Plugin Standard:
|
||||
# https://zdharma-continuum.github.io/Zsh-100-Commits-Club/Zsh-Plugin-Standard.html
|
||||
0=${${ZERO:-${0:#$ZSH_ARGZERO}}:-${(%):-%N}}
|
||||
0=${${(M)0##/*}:-$PWD/$0}
|
||||
|
||||
# Such global variable is expected to be typeset'd -g in the plugin.zsh
|
||||
# file. Here it's restored in case of the function being run as a script.
|
||||
typeset -gA Plugins
|
||||
Plugins[MY_PLUGIN_DIR]=${0:h}
|
||||
|
||||
# In case of the script using other scripts from the plugin, either set up
|
||||
# $fpath and autoload, or add the directory to $PATH.
|
||||
fpath+=( $Plugins[MY_PLUGIN_DIR] )
|
||||
autoload …
|
||||
|
||||
# OR
|
||||
path+=( $Plugins[MY_PLUGIN_DIR] )
|
||||
fi
|
||||
|
||||
# The script/function contents possibly using $Plugins[MY_PLUGIN_DIR] …
|
||||
# …
|
||||
|
||||
# Use alternate marks [[[ and ]]] as the original ones can confuse nested
|
||||
# substitutions, e.g.: ${${${VAR}}}
|
||||
|
||||
# Local Variables:
|
||||
# mode: Shell-Script
|
||||
# sh-indentation: 2
|
||||
# indent-tabs-mode: nil
|
||||
# sh-basic-offset: 2
|
||||
# End:
|
||||
# vim: ft=zsh sw=2 ts=2 et foldmarker=[[[,]]] foldmethod=marker
|
||||
|
|
@ -1,28 +0,0 @@
|
|||
# Zsh compiled script + zrecompile backup
|
||||
*.zwc
|
||||
*.zwc.old
|
||||
|
||||
# Zsh completion-optimization dumpfile
|
||||
*zcompdump*
|
||||
|
||||
# Zsh zcalc history
|
||||
.zcalc_history
|
||||
|
||||
# A popular plugin manager's files
|
||||
._zinit
|
||||
.zinit_lastupd
|
||||
|
||||
# zdharma/zshelldoc tool's files
|
||||
zsdoc/data
|
||||
|
||||
# ohmyzsh/ohmyzsh/plugins/per-directory-history plugin's files
|
||||
# (when set-up to store the history in the local directory)
|
||||
.directory_history
|
||||
|
||||
# MichaelAquilina/zsh-autoswitch-virtualenv plugin's files
|
||||
# (for Zsh plugins using Python)
|
||||
.venv
|
||||
|
||||
# Zunit tests' output
|
||||
/tests/_output/*
|
||||
!/tests/_output/.gitkeep
|
||||
|
|
@ -1,47 +0,0 @@
|
|||
#
|
||||
# Language: Zsh
|
||||
#
|
||||
|
||||
--langdef=zsh
|
||||
--langmap=zsh:.zsh
|
||||
|
||||
#
|
||||
# 1. Detect variables
|
||||
# 2. … and function names.
|
||||
#
|
||||
|
||||
--kinddef-zsh=v,var,variables
|
||||
--kinddef-zsh=f,fun,functions
|
||||
|
||||
--_tabledef-zsh=main
|
||||
--_tabledef-zsh=vardef
|
||||
--_tabledef-zsh=comment
|
||||
--_tabledef-zsh=equal
|
||||
|
||||
# Feature: Zsh variable detection
|
||||
--_mtable-regex-zsh=main/^\s*(local|typeset|declare|integer|float|readonly)\s+(-\w+\s+)*///{tenter=vardef}
|
||||
# Feature: Zsh function name detection
|
||||
--_mtable-regex-zsh=main/^\s*(function\s+|)([[:alnum:]:@∞.+-]+)\(\s*\)\s*([\{]|[\n]+[\{])/\2/f/
|
||||
--_mtable-regex-zsh=main/^\s*[\#][^\n]*///{tenter=comment}
|
||||
--_mtable-regex-zsh=main/.//
|
||||
|
||||
--_mtable-regex-zsh=comment/[\n]///{tleave}
|
||||
--_mtable-regex-zsh=comment/.//
|
||||
|
||||
--_mtable-regex-zsh=equal/([\"][^\"]*[\"])///{exclusive}{tleave}
|
||||
--_mtable-regex-zsh=equal/([\'][^\']*[\'])///{exclusive}{tleave}
|
||||
--_mtable-regex-zsh=equal/([\$][\(][\(])([^\)][^\)])*([^\)]){0,1}([\)][\)])///{exclusive}{tleave}
|
||||
--_mtable-regex-zsh=equal/([\$][\(])([^\)]*)([\)])///{exclusive}{tleave}
|
||||
--_mtable-regex-zsh=equal/([\(])([^\)]*)([\)])///{exclusive}{tleave}
|
||||
# Try to match sequences of ${…}\w${…}…
|
||||
--_mtable-regex-zsh=equal/([\$][\{])((([^\}]*[\}][^\s][\$][\{])*[^\}]*)|[^\}]*)([\}])///{exclusive}{tleave}
|
||||
--_mtable-regex-zsh=equal/[^\s\n]+///{exclusive}{tleave}{_advanceTo=0start}
|
||||
--_mtable-regex-zsh=equal/[\n\s]///{exclusive}{tleave}{_advanceTo=0start}
|
||||
|
||||
# Match with required ="…
|
||||
--_mtable-regex-zsh=vardef/([a-zA-Z_]\w*)([\=])/\1/v/{exclusive}{tenter=equal}
|
||||
--_mtable-regex-zsh=vardef/([a-zA-Z_]\w*)/\1/v/{exclusive}
|
||||
--_mtable-regex-zsh=vardef/[\x5C][\n]///{exclusive}
|
||||
--_mtable-regex-zsh=vardef/([\n;\}\)\|\&])///{tleave}{exclusive}
|
||||
--_mtable-regex-zsh=vardef/^\s*[\#][^\n]*///{tenter=comment}{exclusive}
|
||||
--_mtable-regex-zsh=vardef/.//
|
||||
48
test/a::test::plugin.zsh
Normal file
48
test/a::test::plugin.zsh
Normal file
|
|
@ -0,0 +1,48 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
echo "Test plugin loading"
|
||||
|
||||
bindkey -v
|
||||
alias aa=bb
|
||||
|
||||
REPO_DIR="${0%/*}"
|
||||
CONFIG_DIR="$HOME/.config/zew"
|
||||
|
||||
bindkey -N testmap main
|
||||
bindkey -M testmap -s "^[t" "echo test1"
|
||||
bindkey -s "^[y" "echo test2"
|
||||
|
||||
# 10. Break line
|
||||
if [[ "$MC_SID" != "" || "$MC_CONTROL_PID" != "" ]]; then
|
||||
bindkey "^J" accept-line
|
||||
else
|
||||
bindkey "^J" self-insert
|
||||
fi
|
||||
|
||||
# 11. Undo
|
||||
bindkey "^_" undo
|
||||
|
||||
alias aaa2=bbb
|
||||
alias -s gif=iv
|
||||
alias -g LLL="|less"
|
||||
|
||||
[[ -n ${-[(r)9]} ]] && echo "Initially it's -9 (auto_list) set" || echo "Initially it's -9 (auto_list) unset"
|
||||
setopt +9
|
||||
[[ -n ${-[(r)w]} ]] && echo "Initially it's -w (chase_links) set" || echo "Initially it's -w (chase_links) unset"
|
||||
setopt -w
|
||||
[[ -o "menucomplete" ]] && echo "Initially it's menucomplete set" || echo "Initially it's menucomplete unset"
|
||||
setopt menucomplete
|
||||
[[ -o "listtypes" ]] && echo "Initially it's listtypes set" || echo "Initially it's listtypes unset"
|
||||
[[ -o "listpacked" ]] && echo "Initially it's listpacked set" || echo "Initially it's listpacked unset"
|
||||
setopt -o nolist_types -o LIST_PACKED
|
||||
#setopt -o automenu posix_cd -oautocd
|
||||
#setopt \'pushd_minus
|
||||
unsetopt +9
|
||||
autoload -X test
|
||||
|
||||
fpath+=( /usr/share/zsh )
|
||||
|
||||
unset MY_VAR
|
||||
|
||||
bindkey -N testpluginmain main
|
||||
bindkey -A testpluginmain main
|
||||
115
test/all.zsh
Executable file
115
test/all.zsh
Executable file
|
|
@ -0,0 +1,115 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
setopt extendedglob
|
||||
|
||||
___TEST_DIR="`pwd`"
|
||||
|
||||
if [[ "${___TEST_DIR/\/zplugin/}" = "${___TEST_DIR}" && "${___TEST_DIR/\/.zplugin}" = "${___TEST_DIR}" ]]; then
|
||||
echo "all.zsh run not from zplugin's directory tree"
|
||||
return 1
|
||||
fi
|
||||
|
||||
if [ "${___TEST_DIR:t}" != "test" ]; then
|
||||
() {
|
||||
setopt localoptions extendedglob
|
||||
local -a match mbegin mend
|
||||
local MATCH; integer MBEGIN MEND
|
||||
|
||||
if [ "${___TEST_DIR/\/zplugin/}" != "${___TEST_DIR}" ]; then
|
||||
___TEST_DIR="${___TEST_DIR/\/zplugin*//zplugin/test}"
|
||||
else
|
||||
# Get what's after /.zplugin/
|
||||
tmp="${___TEST_DIR##*\/.zplugin\/}"
|
||||
# Only first directory after /.zplugin/
|
||||
tmp="${tmp%%/*}"
|
||||
___TEST_DIR="${___TEST_DIR/\/.zplugin*//.zplugin/${tmp}/test}"
|
||||
fi
|
||||
}
|
||||
fi
|
||||
|
||||
if [ ! -d "$___TEST_DIR" ]; then
|
||||
echo "Could not resolve test directory (tried $___TEST_DIR)"
|
||||
return 1
|
||||
fi
|
||||
|
||||
cd "$___TEST_DIR"
|
||||
|
||||
autoload colors
|
||||
colors
|
||||
|
||||
local pre="==== "
|
||||
local after=" ===="
|
||||
|
||||
# Normal tests
|
||||
if [[ "$1" = "normal" || -z "$1" ]]; then
|
||||
echo -e ${fg_bold[magenta]}"${pre}normal tests${after}"$reset_color"\n"
|
||||
for i in test[0-9]##.zsh; do
|
||||
./"$i"
|
||||
print
|
||||
print "${fg_bold[blue]}===================================================$reset_color"
|
||||
print
|
||||
print -n "Press any key for next test..."
|
||||
read -sk k
|
||||
echo -e "\n"
|
||||
done
|
||||
fi
|
||||
|
||||
# KSH_ARRAYS
|
||||
if [[ "$1" = "kshar" || -z "$1" ]]; then
|
||||
echo -e ${fg_bold[magenta]}"${pre}KSH_ARRAYS tests${after}"$reset_color"\n"
|
||||
for i in kshar_test[0-9]##.zsh; do
|
||||
./"$i"
|
||||
print
|
||||
print "${fg_bold[blue]}===================================================$reset_color"
|
||||
print
|
||||
print -n "Press any key for next test..."
|
||||
read -sk k
|
||||
[ "$k" != $'\n' ] && print
|
||||
echo -e "\n"
|
||||
done
|
||||
fi
|
||||
|
||||
# emulate sh
|
||||
if [[ "$1" = "sh" || -z "$1" ]]; then
|
||||
echo -e ${fg_bold[magenta]}"${pre}emulate sh tests${after}"$reset_color"\n"
|
||||
for i in sh_test[0-9]##.zsh; do
|
||||
./"$i"
|
||||
print
|
||||
print "${fg_bold[blue]}===================================================$reset_color"
|
||||
print
|
||||
print -n "Press any key for next test..."
|
||||
read -sk k
|
||||
[ "$k" != $'\n' ] && print
|
||||
echo -e "\n"
|
||||
done
|
||||
fi
|
||||
|
||||
# emulate ksh
|
||||
if [[ "$1" = "ksh" || -z "$1" ]]; then
|
||||
echo -e ${fg_bold[magenta]}"${pre}emulate ksh tests${after}"$reset_color"\n"
|
||||
for i in ksh_test[0-9]##.zsh; do
|
||||
./"$i"
|
||||
print
|
||||
print "${fg_bold[blue]}===================================================$reset_color"
|
||||
print
|
||||
print -n "Press any key for next test..."
|
||||
read -sk k
|
||||
[ "$k" != $'\n' ] && print
|
||||
echo -e "\n"
|
||||
done
|
||||
fi
|
||||
|
||||
# csh setopts
|
||||
if [[ "$1" = "csh" || -z "$1" ]]; then
|
||||
echo -e ${fg_bold[magenta]}"${pre}csh setopts tests${after}"$reset_color"\n"
|
||||
for i in csh_test[0-9]##.zsh; do
|
||||
./"$i"
|
||||
print
|
||||
print "${fg_bold[blue]}===================================================$reset_color"
|
||||
print
|
||||
print -n "Press any key for next test..."
|
||||
read -sk k
|
||||
[ "$k" != $'\n' ] && print
|
||||
echo -e "\n"
|
||||
done
|
||||
fi
|
||||
45
test/csh_test1.zsh
Executable file
45
test/csh_test1.zsh
Executable file
|
|
@ -0,0 +1,45 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt CSH_NULL_GLOB CSH_JUNKIE_HISTORY CSH_JUNKIE_LOOPS CSH_NULLCMD
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
MY_VAR="test variable"
|
||||
MY_VAR2="test variable"
|
||||
zplugin snippet -f test/a::test::plugin.zsh
|
||||
my_f() { echo "Hello"; }
|
||||
fpath+=( /a/b/c )
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
|
||||
39
test/csh_test2.zsh
Executable file
39
test/csh_test2.zsh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt CSH_NULL_GLOB CSH_JUNKIE_HISTORY CSH_JUNKIE_LOOPS CSH_NULLCMD
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/safe-paste"
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
39
test/csh_test4.zsh
Executable file
39
test/csh_test4.zsh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt NO_KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/opp.zsh"
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
46
test/csh_test6.zsh
Executable file
46
test/csh_test6.zsh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt CSH_NULL_GLOB CSH_JUNKIE_HISTORY CSH_JUNKIE_LOOPS CSH_NULLCMD
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/smart-cd"
|
||||
local SMART_CD_GIT_STATUS="false"
|
||||
cd test/tzplugin/plugins/_local---smart-cd/test_dir
|
||||
{
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
cd ../test_dir2
|
||||
add-zsh-hook -d chpwd _smart_cd_chpwd_handler
|
||||
cd ../test_dir
|
||||
} > "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
58
test/csh_test7.zsh
Executable file
58
test/csh_test7.zsh
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Common test suite code
|
||||
#
|
||||
|
||||
setopt CSH_NULL_GLOB CSH_JUNKIE_HISTORY CSH_JUNKIE_LOOPS CSH_NULLCMD
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
{
|
||||
|
||||
zplugin dstart
|
||||
|
||||
echo "### Zstatus "
|
||||
zplugin zstatus
|
||||
echo -e "\n### List ###"
|
||||
zplugin list
|
||||
echo -e "\n### Clist ###"
|
||||
zplugin clist
|
||||
echo -e "\n### Csearch ###"
|
||||
zplugin csearch
|
||||
echo -e "\n### Compile-all ###"
|
||||
zplugin compile-all
|
||||
echo -e "\n### Uncompile-all ###"
|
||||
zplugin uncompile-all
|
||||
|
||||
zplugin dstop
|
||||
|
||||
} >> "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
46
test/ksh_test1.zsh
Executable file
46
test/ksh_test1.zsh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
emulate ksh
|
||||
unsetopt localoptions
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
MY_VAR="test variable"
|
||||
MY_VAR2="test variable"
|
||||
zplugin snippet -f test/a::test::plugin.zsh
|
||||
my_f() { echo "Hello"; }
|
||||
fpath+=( /a/b/c )
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
|
||||
40
test/ksh_test2.zsh
Executable file
40
test/ksh_test2.zsh
Executable file
|
|
@ -0,0 +1,40 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
emulate ksh
|
||||
unsetopt localoptions
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/safe-paste"
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
81
test/ksh_test3.zsh
Executable file
81
test/ksh_test3.zsh
Executable file
|
|
@ -0,0 +1,81 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Common test suite code
|
||||
#
|
||||
|
||||
emulate ksh
|
||||
unsetopt localoptions
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
typeset -U path
|
||||
PATH="$PATH:/component/nr1"
|
||||
path+=( "/component/nr2" )
|
||||
# Intentional nr2
|
||||
PATH="/component/nr2:$PATH"
|
||||
declare -p path
|
||||
|
||||
echo
|
||||
|
||||
FPATH="$FPATH:/fcomp/nr1"
|
||||
fpath+=( "/fcomp/nr2" )
|
||||
# Intentional nr2
|
||||
FPATH="/fcomp/nr2:$FPATH"
|
||||
declare -p fpath
|
||||
|
||||
echo
|
||||
|
||||
MY_VAR="test variable1"
|
||||
MY_VAR2="test variable2"
|
||||
|
||||
my_f() { echo "Hello from test3"; MY_VAR3="test variable 3"; typeset -A my_hash }
|
||||
my_f
|
||||
|
||||
typeset -A my_hash2
|
||||
|
||||
typeset -a my_array
|
||||
my_array=( 1 )
|
||||
|
||||
setopt menucomplete
|
||||
|
||||
alias test3alias1="echo Hello"
|
||||
alias -g test3alias2="echo Hello"
|
||||
alias -s jpg="iv"
|
||||
|
||||
my_f2() { echo "Short lived"; }
|
||||
my_f2
|
||||
unfunction "my_f2"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
# A look at hopefully cleaned up variables
|
||||
declare -p path
|
||||
declare -p fpath
|
||||
---mark
|
||||
|
||||
---compare
|
||||
---end
|
||||
50
test/ksh_test5.zsh
Executable file
50
test/ksh_test5.zsh
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
emulate ksh
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/zsh-colors"
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
|
||||
{
|
||||
red Hello
|
||||
blue Blue
|
||||
magenta Magenta
|
||||
echo Yellow | yellow
|
||||
echo Green | green
|
||||
echo Cyan | cyan
|
||||
black Black
|
||||
echo white | white
|
||||
} > "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
46
test/ksh_test6.zsh
Executable file
46
test/ksh_test6.zsh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
emulate ksh
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/smart-cd"
|
||||
local SMART_CD_GIT_STATUS="false"
|
||||
cd test/tzplugin/plugins/_local---smart-cd/test_dir
|
||||
{
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
cd ../test_dir2
|
||||
add-zsh-hook -d chpwd _smart_cd_chpwd_handler
|
||||
cd ../test_dir
|
||||
} > "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
58
test/ksh_test7.zsh
Executable file
58
test/ksh_test7.zsh
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Common test suite code
|
||||
#
|
||||
|
||||
emulate ksh
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
{
|
||||
|
||||
zplugin dstart
|
||||
|
||||
echo "### Zstatus "
|
||||
zplugin zstatus
|
||||
echo -e "\n### List ###"
|
||||
zplugin list
|
||||
echo -e "\n### Clist ###"
|
||||
zplugin clist
|
||||
echo -e "\n### Csearch ###"
|
||||
zplugin csearch
|
||||
echo -e "\n### Compile-all ###"
|
||||
zplugin compile-all
|
||||
echo -e "\n### Uncompile-all ###"
|
||||
zplugin uncompile-all
|
||||
|
||||
zplugin dstop
|
||||
|
||||
} >> "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
44
test/kshar_test1.zsh
Executable file
44
test/kshar_test1.zsh
Executable file
|
|
@ -0,0 +1,44 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
MY_VAR="test variable"
|
||||
MY_VAR2="test variable"
|
||||
zplugin snippet -f test/a::test::plugin.zsh
|
||||
my_f() { echo "Hello"; }
|
||||
fpath+=( /a/b/c )
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
39
test/kshar_test2.zsh
Executable file
39
test/kshar_test2.zsh
Executable file
|
|
@ -0,0 +1,39 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/safe-paste"
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
80
test/kshar_test3.zsh
Executable file
80
test/kshar_test3.zsh
Executable file
|
|
@ -0,0 +1,80 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Common test suite code
|
||||
#
|
||||
|
||||
setopt KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
typeset -U path
|
||||
PATH="$PATH:/component/nr1"
|
||||
path+=( "/component/nr2" )
|
||||
# Intentional nr2
|
||||
PATH="/component/nr2:$PATH"
|
||||
declare -p path
|
||||
|
||||
echo
|
||||
|
||||
FPATH="$FPATH:/fcomp/nr1"
|
||||
fpath+=( "/fcomp/nr2" )
|
||||
# Intentional nr2
|
||||
FPATH="/fcomp/nr2:$FPATH"
|
||||
declare -p fpath
|
||||
|
||||
echo
|
||||
|
||||
MY_VAR="test variable1"
|
||||
MY_VAR2="test variable2"
|
||||
|
||||
my_f() { echo "Hello from test3"; MY_VAR3="test variable 3"; typeset -A my_hash }
|
||||
my_f
|
||||
|
||||
typeset -A my_hash2
|
||||
|
||||
typeset -a my_array
|
||||
my_array=( 1 )
|
||||
|
||||
setopt menucomplete
|
||||
|
||||
alias test3alias1="echo Hello"
|
||||
alias -g test3alias2="echo Hello"
|
||||
alias -s jpg="iv"
|
||||
|
||||
my_f2() { echo "Short lived"; }
|
||||
my_f2
|
||||
unfunction "my_f2"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
# A look at hopefully cleaned up variables
|
||||
declare -p path
|
||||
declare -p fpath
|
||||
---mark
|
||||
|
||||
---compare
|
||||
---end
|
||||
50
test/kshar_test5.zsh
Executable file
50
test/kshar_test5.zsh
Executable file
|
|
@ -0,0 +1,50 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/zsh-colors"
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
|
||||
{
|
||||
red Hello
|
||||
blue Blue
|
||||
magenta Magenta
|
||||
echo Yellow | yellow
|
||||
echo Green | green
|
||||
echo Cyan | cyan
|
||||
black Black
|
||||
echo white | white
|
||||
} > "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
46
test/kshar_test6.zsh
Executable file
46
test/kshar_test6.zsh
Executable file
|
|
@ -0,0 +1,46 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Do some setup
|
||||
# Script can be run from arbitrary directory under zplugin/ tree
|
||||
#
|
||||
|
||||
setopt KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
local PLUGIN_NAME="_local/smart-cd"
|
||||
local SMART_CD_GIT_STATUS="false"
|
||||
cd test/tzplugin/plugins/_local---smart-cd/test_dir
|
||||
{
|
||||
zplugin load "$PLUGIN_NAME"
|
||||
cd ../test_dir2
|
||||
add-zsh-hook -d chpwd _smart_cd_chpwd_handler
|
||||
cd ../test_dir
|
||||
} > "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin report "$PLUGIN_NAME" > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin unload "$PLUGIN_NAME" > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
58
test/kshar_test7.zsh
Executable file
58
test/kshar_test7.zsh
Executable file
|
|
@ -0,0 +1,58 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
#
|
||||
# Common test suite code
|
||||
#
|
||||
|
||||
setopt KSH_ARRAYS
|
||||
source "`pwd`/${0:h}/tinclude.zsh" "$0" || exit 1
|
||||
|
||||
#
|
||||
# Start Dtrace
|
||||
#
|
||||
|
||||
---start
|
||||
zplugin dtrace
|
||||
|
||||
###
|
||||
### Test body
|
||||
###
|
||||
|
||||
{
|
||||
|
||||
zplugin dstart
|
||||
|
||||
echo "### Zstatus "
|
||||
zplugin zstatus
|
||||
echo -e "\n### List ###"
|
||||
zplugin list
|
||||
echo -e "\n### Clist ###"
|
||||
zplugin clist
|
||||
echo -e "\n### Csearch ###"
|
||||
zplugin csearch
|
||||
echo -e "\n### Compile-all ###"
|
||||
zplugin compile-all
|
||||
echo -e "\n### Uncompile-all ###"
|
||||
zplugin uncompile-all
|
||||
|
||||
zplugin dstop
|
||||
|
||||
} >> "$___TEST_OUT_FILE"
|
||||
|
||||
#
|
||||
# Stop Dtrace
|
||||
#
|
||||
|
||||
zplugin dstop
|
||||
---stop
|
||||
|
||||
###
|
||||
### Gather and compare results
|
||||
###
|
||||
|
||||
zplugin dreport > "$___TEST_REPORT_FILE" 2>&1
|
||||
zplugin dunload > "$___TEST_UNLOAD_FILE" 2>&1
|
||||
---dumpenv > "$___TEST_ENV_FILE" 2>&1
|
||||
|
||||
---compare
|
||||
---end
|
||||
7
test/models/csh_test1_env.txt
Normal file
7
test/models/csh_test1_env.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ZPLG_DIR '___ZPLG_DIR'
|
||||
ZPLG_NAME 'zplugin'
|
||||
ZPLG_HOME '___ZPLG_DIR/test/tzplugin'
|
||||
ZPLG_PLUGINS_DIR '___ZPLG_DIR/test/tzplugin/plugins'
|
||||
ZPLG_COMPLETIONS_DIR '___ZPLG_DIR/test/tzplugin/completions'
|
||||
ZPLG_SNIPPETS_DIR '___ZPLG_DIR/test/tzplugin/snippets'
|
||||
ZPLG_HOME_READY '1'
|
||||
37
test/models/csh_test1_report.txt
Normal file
37
test/models/csh_test1_report.txt
Normal file
|
|
@ -0,0 +1,37 @@
|
|||
Plugin report for _dtrace/_dtrace
|
||||
---------------------------------
|
||||
Bindkey -v
|
||||
Warning: last bindkey used non-typical options: -v
|
||||
Alias aa=bb
|
||||
Bindkey -N testmap main
|
||||
Bindkey -M testmap -s ^[t echo test1
|
||||
Bindkey -s ^[y echo test2
|
||||
Bindkey ^J self-insert
|
||||
Bindkey ^_ undo
|
||||
Alias aaa2=bbb
|
||||
Alias -s gif=iv
|
||||
Alias -g LLL=|less
|
||||
Failed autoload -X test
|
||||
Bindkey -N testpluginmain main
|
||||
Bindkey -A testpluginmain main
|
||||
Warning: keymap `main' copied to `_dtrace-main-1' because of `testpluginmain' substitution
|
||||
|
||||
Functions created:
|
||||
my_f
|
||||
|
||||
Options changed:
|
||||
chaselinks was set
|
||||
listpacked was set
|
||||
listtypes was unset
|
||||
menucomplete was set
|
||||
physical was set
|
||||
|
||||
FPATH elements added:
|
||||
/a/b/c
|
||||
/usr/share/zsh
|
||||
|
||||
Variables added or redefined:
|
||||
REPO_DIR [ "" -> scalar ]
|
||||
CONFIG_DIR [ "" -> scalar ]
|
||||
MY_VAR2 [ "" -> scalar ]
|
||||
|
||||
23
test/models/csh_test1_unload.txt
Normal file
23
test/models/csh_test1_unload.txt
Normal file
|
|
@ -0,0 +1,23 @@
|
|||
Deleting function my_f
|
||||
Linking backup-`main' keymap `_dtrace-main-1' back to `main'
|
||||
Deleting keymap `testpluginmain'
|
||||
Deleting bindkey ^_ undo
|
||||
Deleting bindkey ^J self-insert
|
||||
Deleting bindkey ^[y echo test2
|
||||
Deleting bindkey ^[t echo test1 mapped to testmap
|
||||
Deleting keymap `testmap'
|
||||
Unsetting option chaselinks
|
||||
Unsetting option listpacked
|
||||
Setting option listtypes
|
||||
Unsetting option menucomplete
|
||||
Removing global alias LLL=|less
|
||||
Removing suffix alias gif=iv
|
||||
Removing alias aaa2=bbb
|
||||
Removing alias aa=bb
|
||||
Removing FPATH element /usr/share/zsh
|
||||
Removing FPATH element /a/b/c
|
||||
Warning: it didn't exist on disk
|
||||
Unsetting variable REPO_DIR
|
||||
Unsetting variable CONFIG_DIR
|
||||
Unsetting variable MY_VAR2
|
||||
dtrace report saved to $LASTREPORT
|
||||
7
test/models/csh_test2_env.txt
Normal file
7
test/models/csh_test2_env.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ZPLG_DIR '___ZPLG_DIR'
|
||||
ZPLG_NAME 'zplugin'
|
||||
ZPLG_HOME '___ZPLG_DIR/test/tzplugin'
|
||||
ZPLG_PLUGINS_DIR '___ZPLG_DIR/test/tzplugin/plugins'
|
||||
ZPLG_COMPLETIONS_DIR '___ZPLG_DIR/test/tzplugin/completions'
|
||||
ZPLG_SNIPPETS_DIR '___ZPLG_DIR/test/tzplugin/snippets'
|
||||
ZPLG_HOME_READY '1'
|
||||
19
test/models/csh_test2_report.txt
Normal file
19
test/models/csh_test2_report.txt
Normal file
|
|
@ -0,0 +1,19 @@
|
|||
Plugin report for _local/safe-paste
|
||||
-----------------------------------
|
||||
Source safe-paste.plugin.zsh
|
||||
Bindkey -N paste
|
||||
Bindkey -R -M paste ^@-Þ? paste-insert
|
||||
Bindkey ^[[200~ _start_paste
|
||||
Bindkey -M paste ^[[201~ _end_paste
|
||||
Bindkey -M paste -s ^M ^J
|
||||
Zle -N _start_paste
|
||||
Zle -N _end_paste
|
||||
Zle -N zle-line-init _zle_line_init
|
||||
Zle -N zle-line-finish _zle_line_finish
|
||||
Zle -N paste-insert _paste_insert
|
||||
|
||||
Functions created:
|
||||
_end_paste _paste_insert
|
||||
_start_paste _zle_line_finish
|
||||
_zle_line_init
|
||||
|
||||
17
test/models/csh_test2_unload.txt
Normal file
17
test/models/csh_test2_unload.txt
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
Deleting function _end_paste
|
||||
Deleting function _paste_insert
|
||||
Deleting function _start_paste
|
||||
Deleting function _zle_line_finish
|
||||
Deleting function _zle_line_init
|
||||
Deleting bindkey ^M ^J mapped to paste
|
||||
Deleting bindkey ^[[201~ _end_paste mapped to paste
|
||||
Deleting bindkey ^[[200~ _start_paste
|
||||
Deleting range bindkey ^@-Þ? paste-insert mapped to paste
|
||||
Deleting keymap `paste'
|
||||
Removing Zle hook `paste-insert'
|
||||
Removing Zle hook `zle-line-finish'
|
||||
Removing Zle hook `zle-line-init'
|
||||
Removing Zle widget `_end_paste'
|
||||
Removing Zle widget `_start_paste'
|
||||
Unregistering plugin _local/safe-paste
|
||||
Plugin's report saved to $LASTREPORT
|
||||
7
test/models/csh_test4_env.txt
Normal file
7
test/models/csh_test4_env.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ZPLG_DIR '___ZPLG_DIR'
|
||||
ZPLG_NAME 'zplugin'
|
||||
ZPLG_HOME '___ZPLG_DIR/test/tzplugin'
|
||||
ZPLG_PLUGINS_DIR '___ZPLG_DIR/test/tzplugin/plugins'
|
||||
ZPLG_COMPLETIONS_DIR '___ZPLG_DIR/test/tzplugin/completions'
|
||||
ZPLG_SNIPPETS_DIR '___ZPLG_DIR/test/tzplugin/snippets'
|
||||
ZPLG_HOME_READY '1'
|
||||
149
test/models/csh_test4_report.txt
Normal file
149
test/models/csh_test4_report.txt
Normal file
|
|
@ -0,0 +1,149 @@
|
|||
Plugin report for _local/opp.zsh
|
||||
--------------------------------
|
||||
Source opp.zsh
|
||||
Bindkey -N opp
|
||||
Zle -N opp-skip-blank-backward
|
||||
Zle -N opp-skip-blank-forward
|
||||
Zle -N opp-skip-alnum-backward
|
||||
Zle -N opp-skip-alnum-forward
|
||||
Zle -N opp-skip-punct-backward
|
||||
Zle -N opp-skip-punct-forward
|
||||
Zle -N opp-skip-alpunum-backward
|
||||
Zle -N opp-skip-alpunum-forward
|
||||
Bindkey -M opp iw .accept-line
|
||||
Bindkey -M opp aw .accept-line
|
||||
Bindkey -M opp iW .accept-line
|
||||
Bindkey -M opp aW .accept-line
|
||||
Zle -N opp-gps-[
|
||||
Zle -N opp-gps-]
|
||||
Bindkey -M opp i[ .accept-line
|
||||
Bindkey -M opp i] .accept-line
|
||||
Bindkey -M opp ik .accept-line
|
||||
Bindkey -M opp a[ .accept-line
|
||||
Bindkey -M opp a] .accept-line
|
||||
Bindkey -M opp ak .accept-line
|
||||
Zle -N opp-gps-<
|
||||
Zle -N opp-gps->
|
||||
Bindkey -M opp i< .accept-line
|
||||
Bindkey -M opp i> .accept-line
|
||||
Bindkey -M opp a< .accept-line
|
||||
Bindkey -M opp a> .accept-line
|
||||
Zle -N opp-gps-(
|
||||
Zle -N opp-gps-)
|
||||
Bindkey -M opp i( .accept-line
|
||||
Bindkey -M opp i) .accept-line
|
||||
Bindkey -M opp ib .accept-line
|
||||
Bindkey -M opp a( .accept-line
|
||||
Bindkey -M opp a) .accept-line
|
||||
Bindkey -M opp ab .accept-line
|
||||
Zle -N opp-gps-{
|
||||
Zle -N opp-gps-}
|
||||
Bindkey -M opp i{ .accept-line
|
||||
Bindkey -M opp i} .accept-line
|
||||
Bindkey -M opp iB .accept-line
|
||||
Bindkey -M opp a{ .accept-line
|
||||
Bindkey -M opp a} .accept-line
|
||||
Bindkey -M opp aB .accept-line
|
||||
Zle -N opp-gps-inbetween-0-a
|
||||
Zle -N opp-gps-inbetween-0-b
|
||||
Bindkey -M opp i" .accept-line
|
||||
Bindkey -M opp a" .accept-line
|
||||
Zle -N opp-gps-inbetween-1-a
|
||||
Zle -N opp-gps-inbetween-1-b
|
||||
Bindkey -M opp i' .accept-line
|
||||
Bindkey -M opp a' .accept-line
|
||||
Zle -N opp-gps-inbetween-2-a
|
||||
Zle -N opp-gps-inbetween-2-b
|
||||
Bindkey -M opp i` .accept-line
|
||||
Bindkey -M opp a` .accept-line
|
||||
Zle -N opp-recursive-edit
|
||||
Zle -N opp-id
|
||||
Zle -N opp-copy-region
|
||||
Zle -N opp-swap-case-region
|
||||
Zle -N opp-vi-change
|
||||
Zle -N opp-vi-delete
|
||||
Zle -N opp-vi-yank
|
||||
Zle -N opp-vi-tilde
|
||||
Zle -N opp-upper-case-region
|
||||
Zle -N opp-vi-uppercase
|
||||
Zle -N opp-lower-case-region
|
||||
Zle -N opp-vi-lowercase
|
||||
Zle -N opp opp
|
||||
Warning: unknown widget replaced/taken via zle -N: `opp', it is set to be deleted
|
||||
Bindkey -M vicmd c opp
|
||||
Bindkey -M afu-vicmd c opp
|
||||
Bindkey -M vicmd d opp
|
||||
Bindkey -M afu-vicmd d opp
|
||||
Bindkey -M vicmd y opp
|
||||
Bindkey -M afu-vicmd y opp
|
||||
Bindkey -M vicmd g~ opp
|
||||
Bindkey -M afu-vicmd g~ opp
|
||||
Bindkey -M vicmd gU opp
|
||||
Bindkey -M afu-vicmd gU opp
|
||||
Bindkey -M vicmd gu opp
|
||||
Bindkey -M afu-vicmd gu opp
|
||||
|
||||
Functions created:
|
||||
def-opp-skip def-oppc
|
||||
def-oppc-inbetween def-oppc-inbetween-1
|
||||
def-oppc-inbetween-2 def-oppc-pair
|
||||
def-oppc-pair-1 opp
|
||||
opp+aB opp+aW
|
||||
opp+a" opp+a'
|
||||
opp+a( opp+a)
|
||||
opp+a< opp+a>
|
||||
opp+a[ opp+a]
|
||||
opp+a` opp+a{
|
||||
opp+a} opp+ab
|
||||
opp+ak opp+aw
|
||||
opp+iB opp+iW
|
||||
opp+i" opp+i'
|
||||
opp+i( opp+i)
|
||||
opp+i< opp+i>
|
||||
opp+i[ opp+i]
|
||||
opp+i` opp+i{
|
||||
opp+i} opp+ib
|
||||
opp+ik opp+iw
|
||||
opp-accept-p opp-clean
|
||||
opp-copy-region opp-generic
|
||||
opp-generic-pair-scan opp-generic-w
|
||||
opp-gps-( opp-gps-)
|
||||
opp-gps-< opp-gps->
|
||||
opp-gps-[ opp-gps-]
|
||||
opp-gps-{ opp-gps-}
|
||||
opp-gps-inbetween-0-a opp-gps-inbetween-0-b
|
||||
opp-gps-inbetween-0-s-ref opp-gps-inbetween-1-a
|
||||
opp-gps-inbetween-1-b opp-gps-inbetween-1-s-ref
|
||||
opp-gps-inbetween-2-a opp-gps-inbetween-2-b
|
||||
opp-gps-inbetween-2-s-ref opp-id
|
||||
opp-inbetween-scan opp-install
|
||||
opp-install-installer opp-installer-add
|
||||
opp-installer-expand opp-installer-install-opps
|
||||
opp-k opp-linewise
|
||||
opp-linewise~ opp-lower-case-region
|
||||
opp-lower-case-region-0 opp-motion
|
||||
opp-oneshot-region opp-pair-scan
|
||||
opp-read-motion opp-read-motion-p
|
||||
opp-recursive-edit opp-recursive-edit-1
|
||||
opp-regioned-buffer-each opp-regioned-buffer-each~
|
||||
opp-register-zle opp-register-zle-operator-mimic
|
||||
opp-register-zle-operator-mimic-case opp-skip-alnum-backward
|
||||
opp-skip-alnum-forward opp-skip-alpunum-backward
|
||||
opp-skip-alpunum-forward opp-skip-aw-forward-on-blank
|
||||
opp-skip-blank-backward opp-skip-blank-forward
|
||||
opp-skip-punct-backward opp-skip-punct-forward
|
||||
opp-swap-case-region opp-swap-case-region-0
|
||||
opp-undefined-key opp-upper-case-region
|
||||
opp-upper-case-region-0 opp-vi-change
|
||||
opp-vi-delete opp-vi-lowercase
|
||||
opp-vi-tilde opp-vi-uppercase
|
||||
opp-vi-yank opp-zcompile
|
||||
opp1 with-opp
|
||||
with-opp-regioned
|
||||
|
||||
Variables added or redefined:
|
||||
opps [ "" -> association ]
|
||||
opp_installer_codes [ "" -> array ]
|
||||
opp_keybuffer [ "" -> scalar ]
|
||||
opp_operators [ "" -> association ]
|
||||
|
||||
203
test/models/csh_test4_unload.txt
Normal file
203
test/models/csh_test4_unload.txt
Normal file
|
|
@ -0,0 +1,203 @@
|
|||
Deleting function def-opp-skip
|
||||
Deleting function def-oppc
|
||||
Deleting function def-oppc-inbetween
|
||||
Deleting function def-oppc-inbetween-1
|
||||
Deleting function def-oppc-inbetween-2
|
||||
Deleting function def-oppc-pair
|
||||
Deleting function def-oppc-pair-1
|
||||
Deleting function opp
|
||||
Deleting function opp+aB
|
||||
Deleting function opp+aW
|
||||
Deleting function opp+a"
|
||||
Deleting function opp+a'
|
||||
Deleting function opp+a(
|
||||
Deleting function opp+a)
|
||||
Deleting function opp+a<
|
||||
Deleting function opp+a>
|
||||
Deleting function opp+a[
|
||||
Deleting function opp+a]
|
||||
Deleting function opp+a`
|
||||
Deleting function opp+a{
|
||||
Deleting function opp+a}
|
||||
Deleting function opp+ab
|
||||
Deleting function opp+ak
|
||||
Deleting function opp+aw
|
||||
Deleting function opp+iB
|
||||
Deleting function opp+iW
|
||||
Deleting function opp+i"
|
||||
Deleting function opp+i'
|
||||
Deleting function opp+i(
|
||||
Deleting function opp+i)
|
||||
Deleting function opp+i<
|
||||
Deleting function opp+i>
|
||||
Deleting function opp+i[
|
||||
Deleting function opp+i]
|
||||
Deleting function opp+i`
|
||||
Deleting function opp+i{
|
||||
Deleting function opp+i}
|
||||
Deleting function opp+ib
|
||||
Deleting function opp+ik
|
||||
Deleting function opp+iw
|
||||
Deleting function opp-accept-p
|
||||
Deleting function opp-clean
|
||||
Deleting function opp-copy-region
|
||||
Deleting function opp-generic
|
||||
Deleting function opp-generic-pair-scan
|
||||
Deleting function opp-generic-w
|
||||
Deleting function opp-gps-(
|
||||
Deleting function opp-gps-)
|
||||
Deleting function opp-gps-<
|
||||
Deleting function opp-gps->
|
||||
Deleting function opp-gps-[
|
||||
Deleting function opp-gps-]
|
||||
Deleting function opp-gps-{
|
||||
Deleting function opp-gps-}
|
||||
Deleting function opp-gps-inbetween-0-a
|
||||
Deleting function opp-gps-inbetween-0-b
|
||||
Deleting function opp-gps-inbetween-0-s-ref
|
||||
Deleting function opp-gps-inbetween-1-a
|
||||
Deleting function opp-gps-inbetween-1-b
|
||||
Deleting function opp-gps-inbetween-1-s-ref
|
||||
Deleting function opp-gps-inbetween-2-a
|
||||
Deleting function opp-gps-inbetween-2-b
|
||||
Deleting function opp-gps-inbetween-2-s-ref
|
||||
Deleting function opp-id
|
||||
Deleting function opp-inbetween-scan
|
||||
Deleting function opp-install
|
||||
Deleting function opp-install-installer
|
||||
Deleting function opp-installer-add
|
||||
Deleting function opp-installer-expand
|
||||
Deleting function opp-installer-install-opps
|
||||
Deleting function opp-k
|
||||
Deleting function opp-linewise
|
||||
Deleting function opp-linewise~
|
||||
Deleting function opp-lower-case-region
|
||||
Deleting function opp-lower-case-region-0
|
||||
Deleting function opp-motion
|
||||
Deleting function opp-oneshot-region
|
||||
Deleting function opp-pair-scan
|
||||
Deleting function opp-read-motion
|
||||
Deleting function opp-read-motion-p
|
||||
Deleting function opp-recursive-edit
|
||||
Deleting function opp-recursive-edit-1
|
||||
Deleting function opp-regioned-buffer-each
|
||||
Deleting function opp-regioned-buffer-each~
|
||||
Deleting function opp-register-zle
|
||||
Deleting function opp-register-zle-operator-mimic
|
||||
Deleting function opp-register-zle-operator-mimic-case
|
||||
Deleting function opp-skip-alnum-backward
|
||||
Deleting function opp-skip-alnum-forward
|
||||
Deleting function opp-skip-alpunum-backward
|
||||
Deleting function opp-skip-alpunum-forward
|
||||
Deleting function opp-skip-aw-forward-on-blank
|
||||
Deleting function opp-skip-blank-backward
|
||||
Deleting function opp-skip-blank-forward
|
||||
Deleting function opp-skip-punct-backward
|
||||
Deleting function opp-skip-punct-forward
|
||||
Deleting function opp-swap-case-region
|
||||
Deleting function opp-swap-case-region-0
|
||||
Deleting function opp-undefined-key
|
||||
Deleting function opp-upper-case-region
|
||||
Deleting function opp-upper-case-region-0
|
||||
Deleting function opp-vi-change
|
||||
Deleting function opp-vi-delete
|
||||
Deleting function opp-vi-lowercase
|
||||
Deleting function opp-vi-tilde
|
||||
Deleting function opp-vi-uppercase
|
||||
Deleting function opp-vi-yank
|
||||
Deleting function opp-zcompile
|
||||
Deleting function opp1
|
||||
Deleting function with-opp
|
||||
Deleting function with-opp-regioned
|
||||
Deleting bindkey gu opp mapped to afu-vicmd
|
||||
-zplg-unload:bindkey:57: no such keymap `afu-vicmd'
|
||||
Deleting bindkey gu opp mapped to vicmd
|
||||
Deleting bindkey gU opp mapped to afu-vicmd
|
||||
-zplg-unload:bindkey:57: no such keymap `afu-vicmd'
|
||||
Deleting bindkey gU opp mapped to vicmd
|
||||
Deleting bindkey g~ opp mapped to afu-vicmd
|
||||
-zplg-unload:bindkey:57: no such keymap `afu-vicmd'
|
||||
Deleting bindkey g~ opp mapped to vicmd
|
||||
Deleting bindkey y opp mapped to afu-vicmd
|
||||
-zplg-unload:bindkey:57: no such keymap `afu-vicmd'
|
||||
Deleting bindkey y opp mapped to vicmd
|
||||
Deleting bindkey d opp mapped to afu-vicmd
|
||||
-zplg-unload:bindkey:57: no such keymap `afu-vicmd'
|
||||
Deleting bindkey d opp mapped to vicmd
|
||||
Deleting bindkey c opp mapped to afu-vicmd
|
||||
-zplg-unload:bindkey:57: no such keymap `afu-vicmd'
|
||||
Deleting bindkey c opp mapped to vicmd
|
||||
Deleting bindkey a` .accept-line mapped to opp
|
||||
Deleting bindkey i` .accept-line mapped to opp
|
||||
Deleting bindkey a' .accept-line mapped to opp
|
||||
Deleting bindkey i' .accept-line mapped to opp
|
||||
Deleting bindkey a" .accept-line mapped to opp
|
||||
Deleting bindkey i" .accept-line mapped to opp
|
||||
Deleting bindkey aB .accept-line mapped to opp
|
||||
Deleting bindkey a} .accept-line mapped to opp
|
||||
Deleting bindkey a{ .accept-line mapped to opp
|
||||
Deleting bindkey iB .accept-line mapped to opp
|
||||
Deleting bindkey i} .accept-line mapped to opp
|
||||
Deleting bindkey i{ .accept-line mapped to opp
|
||||
Deleting bindkey ab .accept-line mapped to opp
|
||||
Deleting bindkey a) .accept-line mapped to opp
|
||||
Deleting bindkey a( .accept-line mapped to opp
|
||||
Deleting bindkey ib .accept-line mapped to opp
|
||||
Deleting bindkey i) .accept-line mapped to opp
|
||||
Deleting bindkey i( .accept-line mapped to opp
|
||||
Deleting bindkey a> .accept-line mapped to opp
|
||||
Deleting bindkey a< .accept-line mapped to opp
|
||||
Deleting bindkey i> .accept-line mapped to opp
|
||||
Deleting bindkey i< .accept-line mapped to opp
|
||||
Deleting bindkey ak .accept-line mapped to opp
|
||||
Deleting bindkey a] .accept-line mapped to opp
|
||||
Deleting bindkey a[ .accept-line mapped to opp
|
||||
Deleting bindkey ik .accept-line mapped to opp
|
||||
Deleting bindkey i] .accept-line mapped to opp
|
||||
Deleting bindkey i[ .accept-line mapped to opp
|
||||
Deleting bindkey aW .accept-line mapped to opp
|
||||
Deleting bindkey iW .accept-line mapped to opp
|
||||
Deleting bindkey aw .accept-line mapped to opp
|
||||
Deleting bindkey iw .accept-line mapped to opp
|
||||
Deleting keymap `opp'
|
||||
Removing Zle widget `opp'
|
||||
Removing Zle widget `opp-vi-lowercase'
|
||||
Removing Zle widget `opp-lower-case-region'
|
||||
Removing Zle widget `opp-vi-uppercase'
|
||||
Removing Zle widget `opp-upper-case-region'
|
||||
Removing Zle widget `opp-vi-tilde'
|
||||
Removing Zle widget `opp-vi-yank'
|
||||
Removing Zle widget `opp-vi-delete'
|
||||
Removing Zle widget `opp-vi-change'
|
||||
Removing Zle widget `opp-swap-case-region'
|
||||
Removing Zle widget `opp-copy-region'
|
||||
Removing Zle widget `opp-id'
|
||||
Removing Zle widget `opp-recursive-edit'
|
||||
Removing Zle widget `opp-gps-inbetween-2-b'
|
||||
Removing Zle widget `opp-gps-inbetween-2-a'
|
||||
Removing Zle widget `opp-gps-inbetween-1-b'
|
||||
Removing Zle widget `opp-gps-inbetween-1-a'
|
||||
Removing Zle widget `opp-gps-inbetween-0-b'
|
||||
Removing Zle widget `opp-gps-inbetween-0-a'
|
||||
Removing Zle widget `opp-gps-}'
|
||||
Removing Zle widget `opp-gps-{'
|
||||
Removing Zle widget `opp-gps-)'
|
||||
Removing Zle widget `opp-gps-('
|
||||
Removing Zle widget `opp-gps->'
|
||||
Removing Zle widget `opp-gps-<'
|
||||
Removing Zle widget `opp-gps-]'
|
||||
Removing Zle widget `opp-gps-['
|
||||
Removing Zle widget `opp-skip-alpunum-forward'
|
||||
Removing Zle widget `opp-skip-alpunum-backward'
|
||||
Removing Zle widget `opp-skip-punct-forward'
|
||||
Removing Zle widget `opp-skip-punct-backward'
|
||||
Removing Zle widget `opp-skip-alnum-forward'
|
||||
Removing Zle widget `opp-skip-alnum-backward'
|
||||
Removing Zle widget `opp-skip-blank-forward'
|
||||
Removing Zle widget `opp-skip-blank-backward'
|
||||
Unsetting variable opps
|
||||
Unsetting variable opp_installer_codes
|
||||
Unsetting variable opp_keybuffer
|
||||
Unsetting variable opp_operators
|
||||
Unregistering plugin _local/opp.zsh
|
||||
Plugin's report saved to $LASTREPORT
|
||||
7
test/models/csh_test6_env.txt
Normal file
7
test/models/csh_test6_env.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ZPLG_DIR '___ZPLG_DIR'
|
||||
ZPLG_NAME 'zplugin'
|
||||
ZPLG_HOME '___ZPLG_DIR/test/tzplugin'
|
||||
ZPLG_PLUGINS_DIR '___ZPLG_DIR/test/tzplugin/plugins'
|
||||
ZPLG_COMPLETIONS_DIR '___ZPLG_DIR/test/tzplugin/completions'
|
||||
ZPLG_SNIPPETS_DIR '___ZPLG_DIR/test/tzplugin/snippets'
|
||||
ZPLG_HOME_READY '1'
|
||||
2
test/models/csh_test6_out.txt
Normal file
2
test/models/csh_test6_out.txt
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
test_file
|
||||
test_file2
|
||||
14
test/models/csh_test6_report.txt
Normal file
14
test/models/csh_test6_report.txt
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
Plugin report for _local/smart-cd
|
||||
---------------------------------
|
||||
Source smart-cd.plugin.zsh
|
||||
Autoload add-zsh-hook with options -U
|
||||
Autoload _smart_cd_chpwd_handler
|
||||
|
||||
Functions created:
|
||||
_smart_cd_chpwd_handler add-zsh-hook
|
||||
|
||||
Variables added or redefined:
|
||||
chpwd_functions [ "" -> array ]
|
||||
SMART_CD_LS [ "" -> scalar ]
|
||||
_smart_cd_lastgitdir [ "" -> scalar ]
|
||||
|
||||
6
test/models/csh_test6_unload.txt
Normal file
6
test/models/csh_test6_unload.txt
Normal file
|
|
@ -0,0 +1,6 @@
|
|||
Deleting function _smart_cd_chpwd_handler
|
||||
Deleting function add-zsh-hook
|
||||
Unsetting variable SMART_CD_LS
|
||||
Unsetting variable _smart_cd_lastgitdir
|
||||
Unregistering plugin _local/smart-cd
|
||||
Plugin's report saved to $LASTREPORT
|
||||
7
test/models/csh_test7_env.txt
Normal file
7
test/models/csh_test7_env.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ZPLG_DIR '___ZPLG_DIR'
|
||||
ZPLG_NAME 'zplugin'
|
||||
ZPLG_HOME '___ZPLG_DIR/test/tzplugin'
|
||||
ZPLG_PLUGINS_DIR '___ZPLG_DIR/test/tzplugin/plugins'
|
||||
ZPLG_COMPLETIONS_DIR '___ZPLG_DIR/test/tzplugin/completions'
|
||||
ZPLG_SNIPPETS_DIR '___ZPLG_DIR/test/tzplugin/snippets'
|
||||
ZPLG_HOME_READY '1'
|
||||
43
test/models/csh_test7_out.txt
Normal file
43
test/models/csh_test7_out.txt
Normal file
|
|
@ -0,0 +1,43 @@
|
|||
Dtrace is already active, stop it first with `dstop'
|
||||
### Zstatus
|
||||
Zplugin's main directory: ___ZPLG_HOME
|
||||
Zplugin's binary directory: ___ZPLG_DIR
|
||||
Plugin directory: ___ZPLG_HOME/plugins
|
||||
Completions directory: ___ZPLG_HOME/completions
|
||||
Loaded plugins: 0
|
||||
Light loaded: 0
|
||||
Downloaded plugins: 4
|
||||
Enabled completions: 1
|
||||
Disabled completions: 0
|
||||
Completions available overall: 1
|
||||
Snippets loaded:
|
||||
Compiled plugins: 0
|
||||
|
||||
### List ###
|
||||
|
||||
### Clist ###
|
||||
zplugin _local/zplugin
|
||||
|
||||
### Csearch ###
|
||||
[+] is installed, [-] uninstalled, [+-] partially installed
|
||||
[+] _local/zplugin _zplugin
|
||||
|
||||
### Compile-all ###
|
||||
_local/opp.zsh:
|
||||
Compiling opp.zsh...
|
||||
_local/safe-paste:
|
||||
Compiling safe-paste.plugin.zsh...
|
||||
_local/smart-cd:
|
||||
Compiling smart-cd.plugin.zsh...
|
||||
_local/zsh-colors:
|
||||
Compiling colors.plugin.zsh...
|
||||
|
||||
### Uncompile-all ###
|
||||
_local/opp.zsh:
|
||||
Removing opp.zsh.zwc
|
||||
_local/safe-paste:
|
||||
Removing safe-paste.plugin.zsh.zwc
|
||||
_local/smart-cd:
|
||||
Removing smart-cd.plugin.zsh.zwc
|
||||
_local/zsh-colors:
|
||||
Removing colors.plugin.zsh.zwc
|
||||
7
test/models/csh_test7_report.txt
Normal file
7
test/models/csh_test7_report.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
Plugin report for _dtrace/_dtrace
|
||||
---------------------------------
|
||||
|
||||
Variables added or redefined:
|
||||
reply [ "" -> array ]
|
||||
REPLY [ "" -> scalar ]
|
||||
|
||||
3
test/models/csh_test7_unload.txt
Normal file
3
test/models/csh_test7_unload.txt
Normal file
|
|
@ -0,0 +1,3 @@
|
|||
Unsetting variable reply
|
||||
Unsetting variable REPLY
|
||||
dtrace report saved to $LASTREPORT
|
||||
7
test/models/ksh_test1_env.txt
Normal file
7
test/models/ksh_test1_env.txt
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
ZPLG_DIR '___ZPLG_DIR'
|
||||
ZPLG_NAME 'zplugin'
|
||||
ZPLG_HOME '___ZPLG_DIR/test/tzplugin'
|
||||
ZPLG_PLUGINS_DIR '___ZPLG_DIR/test/tzplugin/plugins'
|
||||
ZPLG_COMPLETIONS_DIR '___ZPLG_DIR/test/tzplugin/completions'
|
||||
ZPLG_SNIPPETS_DIR '___ZPLG_DIR/test/tzplugin/snippets'
|
||||
ZPLG_HOME_READY '1'
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue