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 "v2.07" 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
|
||||
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
24
.github/ISSUE_TEMPLATE/bug_report.md
vendored
Normal file
|
|
@ -0,0 +1,24 @@
|
|||
---
|
||||
name: Bug report
|
||||
about: Create a report to help Zplugin improve
|
||||
|
||||
---
|
||||
|
||||
**Describe the bug**
|
||||
A clear and concise description of what the bug is.
|
||||
|
||||
**To Reproduce**
|
||||
Steps to reproduce the behavior.
|
||||
|
||||
**Expected behavior**
|
||||
A clear and concise description of what you expected to happen.
|
||||
|
||||
**Screenshots**
|
||||
If applicable, add screenshots to help explain your problem.
|
||||
|
||||
**Versions:**
|
||||
- $ZSH_VERSION == ...
|
||||
- Operating system name and version (uname -a): ...
|
||||
|
||||
**Additional context**
|
||||
Add any other context about the problem here.
|
||||
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/feature_request.md
vendored
Normal file
17
.github/ISSUE_TEMPLATE/feature_request.md
vendored
Normal file
|
|
@ -0,0 +1,17 @@
|
|||
---
|
||||
name: Feature request
|
||||
about: Suggest an idea for this project
|
||||
|
||||
---
|
||||
|
||||
**Is your feature request related to a problem? Please describe.**
|
||||
A clear and concise description of what the problem is. Ex. I'm always frustrated when [...]
|
||||
|
||||
**Describe the solution you'd like**
|
||||
A clear and concise description of what you want to happen.
|
||||
|
||||
**Describe alternatives you've considered**
|
||||
A clear and concise description of any alternative solutions or features you've considered.
|
||||
|
||||
**Additional context**
|
||||
Add any other context or screenshots about the feature request here.
|
||||
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
|
||||
111
.gitignore
vendored
111
.gitignore
vendored
|
|
@ -1,24 +1,95 @@
|
|||
*.[aos]
|
||||
*.bundle
|
||||
*.dll
|
||||
tags
|
||||
TAGS
|
||||
*.o
|
||||
*.o.c
|
||||
*.orig
|
||||
*.txt
|
||||
*.zini
|
||||
*.zwc
|
||||
*deploy*key*
|
||||
*.a
|
||||
*.so
|
||||
*.dll
|
||||
*~
|
||||
.*.sw?
|
||||
.project
|
||||
TAGS
|
||||
TODO*
|
||||
\#*
|
||||
doc/zsdoc/data
|
||||
other
|
||||
site*/
|
||||
tags
|
||||
test/
|
||||
txt/
|
||||
zmodules/
|
||||
tests/_output/
|
||||
tests/_support/tmp*
|
||||
.idea
|
||||
|
||||
/zmodules/META-FAQ
|
||||
/zmodules/config.cache
|
||||
/zmodules/config.h
|
||||
/zmodules/config.log
|
||||
/zmodules/config.modules
|
||||
/zmodules/config.modules.sh
|
||||
/zmodules/config.status
|
||||
/zmodules/config.status.lineno
|
||||
/zmodules/cscope.out
|
||||
/zmodules/stamp-h
|
||||
/zmodules/autom4te.cache
|
||||
|
||||
zmodules/Config/defs.mk
|
||||
|
||||
CVS
|
||||
.#*
|
||||
|
||||
zmodules/Src/*.epro
|
||||
zmodules/Src/*.export
|
||||
zmodules/Src/*.mdh
|
||||
zmodules/Src/*.mdh.tmp
|
||||
zmodules/Src/*.mdhi
|
||||
zmodules/Src/*.mdhs
|
||||
zmodules/Src/*.syms
|
||||
zmodules/Src/Makemod.in
|
||||
zmodules/Src/Makemod
|
||||
zmodules/Src/[_a-zA-Z0-9]*.pro
|
||||
zmodules/Src/ansi2knr
|
||||
zmodules/Src/bltinmods.list
|
||||
zmodules/Src/cscope.out
|
||||
zmodules/Src/libzsh.so*
|
||||
zmodules/Src/modules-bltin
|
||||
zmodules/Src/modules.index
|
||||
zmodules/Src/modules.index.tmp
|
||||
zmodules/Src/modules.stamp
|
||||
zmodules/Src/patchlevel.h
|
||||
zmodules/Src/sigcount.h
|
||||
zmodules/Src/signames.c
|
||||
zmodules/Src/signames2.c
|
||||
zmodules/Src/stamp-modobjs
|
||||
zmodules/Src/stamp-modobjs.tmp
|
||||
zmodules/Src/tags
|
||||
zmodules/Src/TAGS
|
||||
zmodules/Src/version.h
|
||||
zmodules/Src/zshcurses.h
|
||||
zmodules/Src/zshpaths.h
|
||||
zmodules/Src/zshterm.h
|
||||
zmodules/Src/zshxmods.h
|
||||
|
||||
zmodules/Src/zdharma/Makefile.in
|
||||
zmodules/Src/zdharma/*.export
|
||||
zmodules/Src/zdharma/so_locations
|
||||
zmodules/Src/zdharma/*.pro
|
||||
zmodules/Src/zdharma/*.epro
|
||||
zmodules/Src/zdharma/*.syms
|
||||
zmodules/Src/zdharma/*.mdh
|
||||
zmodules/Src/zdharma/*.mdhi
|
||||
zmodules/Src/zdharma/*.mdhs
|
||||
zmodules/Src/zdharma/*.mdh.tmp
|
||||
zmodules/Src/zdharma/errnames.c
|
||||
zmodules/Src/zdharma/errcount.h
|
||||
zmodules/Src/zdharma/curses_keys.h
|
||||
|
||||
test/test_plugins/zsh-select/.git
|
||||
test/test_plugins/zsh-select/.test_git/COMMIT_EDITMSG
|
||||
test/test_plugins/zsh-select-more/.test_git/COMMIT_EDITMSG
|
||||
test/test_plugins/ice-order/.test_git/COMMIT_EDITMSG
|
||||
*.zwc
|
||||
answer
|
||||
test/data
|
||||
test/zplugin*.zsh
|
||||
test/_zplugin
|
||||
*.txt
|
||||
*.zini
|
||||
.ycm_extra_conf.py
|
||||
zmodules/COMPILED_AT
|
||||
zmodules/Src/*.dSYM
|
||||
zmodules/Src/zdharma/*.dSYM
|
||||
|
||||
zmodules/Test/*.tmp
|
||||
/.project
|
||||
zmodules/ValTest/test_type
|
||||
/*deploy*key*
|
||||
|
|
|
|||
|
|
@ -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"
|
||||
]
|
||||
}
|
||||
42
.travis.yml
Normal file
42
.travis.yml
Normal file
|
|
@ -0,0 +1,42 @@
|
|||
language: ruby
|
||||
dist: trusty
|
||||
rvm:
|
||||
- 2.2
|
||||
install: gem install asciidoctor-pdf --pre
|
||||
|
||||
git:
|
||||
depth: 1
|
||||
branches:
|
||||
only:
|
||||
- master
|
||||
addons:
|
||||
apt:
|
||||
packages:
|
||||
- zsh
|
||||
|
||||
env:
|
||||
global:
|
||||
- ENCRYPTION_LABEL: "de1faff15945"
|
||||
- COMMIT_AUTHOR_EMAIL: "psprint@zdharma.org"
|
||||
|
||||
before_script:
|
||||
- zsh --version
|
||||
- >-
|
||||
zsh -c 'print -rl -- "ZSH_VERSION: $ZSH_VERSION" "ZSH_PATCHLEVEL: $ZSH_PATCHLEVEL" "OSTYPE: $OSTYPE" "CPUTYPE: $CPUTYPE" "MACHTYPE: $MACHTYPE"'
|
||||
script:
|
||||
- make
|
||||
- make test VERBOSE=1
|
||||
- make testB VERBOSE=1
|
||||
- make testC VERBOSE=1
|
||||
- make testD VERBOSE=1
|
||||
- make testE VERBOSE=1
|
||||
- make -C zsdoc pdf
|
||||
- share/deploy_doc.sh
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
channels:
|
||||
- "chat.freenode.net#zplugin"
|
||||
on_success: change # default: always
|
||||
on_failure: always # default: always
|
||||
skip_join: false
|
||||
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
|
||||
82
GALLERY.md
Normal file
82
GALLERY.md
Normal file
|
|
@ -0,0 +1,82 @@
|
|||
# Gallery Of Zplugin Invocations
|
||||
|
||||
```zsh
|
||||
# PRs welcomed :)
|
||||
|
||||
# Programs
|
||||
|
||||
zplugin ice from"gh-r" as"program"
|
||||
zplugin light junegunn/fzf-bin
|
||||
|
||||
zplugin ice from"gh-r" as"program" mv"docker* -> docker-compose"
|
||||
zplugin light docker/compose
|
||||
|
||||
zplugin ice as"program" atclone"rm -f src/auto/config.cache; ./configure" atpull"%atclone" make pick"src/vim"
|
||||
zplugin light vim/vim
|
||||
|
||||
zplugin ice as"program" make'!' atclone'./direnv hook zsh > zhook.zsh' atpull'%atclone' src"zhook.zsh"
|
||||
zplugin light direnv/direnv
|
||||
|
||||
zplugin ice from"gh-r" as"program" mv"direnv* -> direnv"; zplugin light direnv/direnv
|
||||
|
||||
zplugin ice from"gh-r" as"program" mv"shfmt* -> shfmt"
|
||||
zplugin light mvdan/sh
|
||||
|
||||
zplugin ice from"gh-r" as"program" mv"gotcha_* -> gotcha"
|
||||
zplugin light b4b4r07/gotcha
|
||||
|
||||
zplugin ice as"program" pick"yank" make
|
||||
zplugin light mptre/yank
|
||||
|
||||
zplugin ice wait"2" lucid as'command' pick'src/vramsteg' atclone'cmake .' atpull'%atclone' make # use turbo-mode
|
||||
zplugin light psprint/vramsteg-zsh
|
||||
|
||||
# Scripts
|
||||
|
||||
zplugin ice as"program" pick"$ZPFX/bin/git-*" make"PREFIX=$ZPFX"
|
||||
zplugin light tj/git-extras
|
||||
|
||||
zplugin ice as"program" atclone'perl Makefile.PL PREFIX=$ZPFX' atpull'%atclone' make'install' pick"$ZPFX/bin/git-cal"
|
||||
zplugin light k4rthik/git-cal
|
||||
|
||||
zplugin ice as"program" cp"wd.sh -> wd" pick"wd"
|
||||
zplugin light mfaerevaag/wd
|
||||
|
||||
zplugin ice as"program" pick"bin/archey"
|
||||
zplugin load obihann/archey-osx
|
||||
|
||||
# Plugins
|
||||
|
||||
zplugin ice pick"h.sh"
|
||||
zplugin light paoloantinori/hhighlighter
|
||||
|
||||
# Snippets
|
||||
|
||||
zplugin ice svn pick"completion.zsh" src"git.zsh"
|
||||
zplugin snippet OMZ::lib
|
||||
|
||||
zplugin ice svn wait"0" lucid atinit"local ZSH=\$PWD" \
|
||||
atclone"mkdir -p plugins; cd plugins; ln -sfn ../. osx"
|
||||
zplugin snippet OMZ::plugins/osx
|
||||
|
||||
# Themes
|
||||
|
||||
GEOMETRY_COLOR_DIR=152
|
||||
zplugin ice wait"0" lucid atload"prompt_geometry_render"
|
||||
zplugin light geometry-zsh/geometry
|
||||
|
||||
zplugin ice pick"async.zsh" src"pure.zsh"
|
||||
zplugin light sindresorhus/pure
|
||||
|
||||
zplugin ice pick"powerless.zsh" src"utilities.zsh"
|
||||
zplugin light martinrotter/powerless
|
||||
|
||||
zplugin light mafredri/zsh-async # dependency
|
||||
zplugin ice svn silent atload'prompt sorin'
|
||||
zplugin snippet PZT::modules/prompt
|
||||
|
||||
zplugin ice atload"fpath+=( \$PWD );"
|
||||
zplugin light chauncey-garrett/zsh-prompt-garrett
|
||||
zplugin ice svn atload"prompt garrett"
|
||||
zplugin snippet PZT::modules/prompt
|
||||
```
|
||||
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.
|
||||
|
|
|
|||
76
Makefile
76
Makefile
|
|
@ -1,54 +1,32 @@
|
|||
.EXPORT_ALL_VARIABLES:
|
||||
all: zplugin.zsh.zwc zplugin-side.zsh.zwc zplugin-install.zsh.zwc zplugin-autoload.zsh.zwc
|
||||
|
||||
ZSH := $(shell command -v zsh 2> /dev/null)
|
||||
SRC := zinit{'','-additional','-autoload','-install','-side'}.zsh
|
||||
DOC_SRC := $(foreach wrd,$(SRC),../$(wrd))
|
||||
%.zwc: %
|
||||
doc/zcompile $<
|
||||
|
||||
.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
|
||||
alltest: test testB testC testD testE
|
||||
|
||||
test:
|
||||
zunit run
|
||||
make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS=$(OPTS) -C test test
|
||||
|
||||
zwc:
|
||||
$(or $(ZSH),:) -fc 'for f in *.zsh; do zcompile -R -- $$f.zwc $$f || exit; done'
|
||||
testB:
|
||||
make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="kshglob" -C test test
|
||||
|
||||
testC:
|
||||
make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="noextendedglob" -C test test
|
||||
|
||||
testD:
|
||||
make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="ksharrays" -C test test
|
||||
|
||||
testE:
|
||||
make VERBOSE=$(VERBOSE) NODIFF=$(NODIFF) DEBUG=$(DEBUG) OPTDUMP=$(OPTDUMP) OPTS="ignoreclosebraces" -C test test
|
||||
|
||||
doc: zplugin.zsh zplugin-side.zsh zplugin-install.zsh zplugin-autoload.zsh
|
||||
rm -rf zsdoc/data zsdoc/*.adoc
|
||||
zsd -v --cignore '(\#*FUNCTION:*{{{*|\#[[:space:]]#}}}*)' zplugin.zsh zplugin-side.zsh zplugin-install.zsh zplugin-autoload.zsh
|
||||
|
||||
clean:
|
||||
rm -f zplugin.zsh.zwc zplugin-side.zsh.zwc zplugin-install.zsh.zwc zplugin-autoload.zsh.zwc
|
||||
rm -rf zsdoc/data
|
||||
|
||||
.PHONY: all test clean
|
||||
# vim:noet:sts=8:ts=8
|
||||
|
|
|
|||
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:
|
||||
256
_zplugin
Normal file
256
_zplugin
Normal file
|
|
@ -0,0 +1,256 @@
|
|||
#compdef zplugin
|
||||
|
||||
local context state state_descr line ret=1
|
||||
typeset -A opt_args
|
||||
|
||||
typeset -a commands
|
||||
commands=(
|
||||
zstatus:'overall Zplugin status'
|
||||
times:'statistics on plugin loading times'
|
||||
self-update:'updates Zplugin'
|
||||
help:'usage information'
|
||||
man:'manual'
|
||||
env-whitelist:'specify names (also patterns) of parameters to be left unchanged during an unload'
|
||||
load:'load plugin'
|
||||
delete:'delete plugin'
|
||||
unload:'unload plugin'
|
||||
snippet:"source (or add to PATH with --command) local or remote file (-f: force - don't use cache)"
|
||||
update:'Git update plugin (or all plugins and snippets if --all passed)'
|
||||
status:'Git status for plugin (or all plugins if --all passed)'
|
||||
report:'show plugin'"'"'s report (or all plugins'"'"' if --all passed)'
|
||||
loaded:'show what plugins are loaded'
|
||||
list:'show what plugins are loaded'
|
||||
ls:'list snippets in formatted and colorized manner'
|
||||
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'
|
||||
cclear:'clear stray and improper completions'
|
||||
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 (or all plugins if --all passed)'
|
||||
uncompile:'remove compiled version of plugin (or of all plugins if --all passed)'
|
||||
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
|
||||
;;
|
||||
times)
|
||||
_message "Hit enter to get plugin load time statistics" && ret=0
|
||||
;;
|
||||
load|light|update|status|compile|stress|cd|edit|glance|changes)
|
||||
typeset -a plugins
|
||||
plugins=( "${ZPLGM[PLUGINS_DIR]}"/*(N:t) )
|
||||
plugins=( "${plugins[@]/---//}" )
|
||||
plugins=( "${plugins[@]:#_local/zplugin}" )
|
||||
plugins=( "${plugins[@]:#custom}" )
|
||||
|
||||
# _wanted plugins expl "Plugins" \
|
||||
# compadd "$@" -a - plugins && ret=0
|
||||
_alternative 'files:file:_files' 'plugins:plugin:compadd -a - plugins'
|
||||
;;
|
||||
delete)
|
||||
typeset -a plugins
|
||||
plugins=( "${ZPLGM[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 absolute normal
|
||||
plugins=( "${ZPLG_REGISTERED_PLUGINS[@]:#_local/zplugin}" )
|
||||
normal=( "${plugins[@]:#%*}" )
|
||||
absolute=( "${(M)plugins[@]:#%*}" )
|
||||
absolute=( "${absolute[@]/\%\/\//%/}" )
|
||||
local hm="${HOME%/}"
|
||||
absolute=( "${absolute[@]/$hm/HOME}" )
|
||||
plugins=( $absolute $normal )
|
||||
|
||||
_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
|
||||
;;
|
||||
cclear)
|
||||
_message "Hit enter to clear stray and improper completions" && ret=0
|
||||
;;
|
||||
cdisable)
|
||||
# Find enabled completions
|
||||
typeset -a completions
|
||||
completions=( "${ZPLGM[COMPLETIONS_DIR]}"/_*(N:t) )
|
||||
completions=( "${completions[@]#_}" )
|
||||
compadd "$@" -a - completions && ret=0
|
||||
;;
|
||||
cenable)
|
||||
# Find disabled
|
||||
typeset -a completions
|
||||
completions=( "${ZPLGM[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 "${ZPLGM[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 "${ZPLGM[PLUGINS_DIR]}"/*; do
|
||||
completions=( "$p"/**/_[^_.][^.]#(N) )
|
||||
for c in "${completions[@]}"; do
|
||||
cfile="${c:t}"
|
||||
bkpfile="${cfile#_}"
|
||||
# Completion installed, either enabled or disabled?
|
||||
if [[ -e "${ZPLGM[COMPLETIONS_DIR]}"/"$cfile" || -e "${ZPLGM[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 soptions
|
||||
soptions=( "-f" "--command" )
|
||||
_wanted soptions expl "Options" \
|
||||
compadd "$@" -a - soptions && ret=0
|
||||
;;
|
||||
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=( "${ZPLGM[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 show_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 |
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 --depth 10 https://github.com/zdharma/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"
|
||||
|
||||
3
doc/zcompile
Executable file
3
doc/zcompile
Executable file
|
|
@ -0,0 +1,3 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
zcompile "$@"
|
||||
1775
doc/zinit.1
1775
doc/zinit.1
File diff suppressed because it is too large
Load diff
593
doc/zplugin.1
Normal file
593
doc/zplugin.1
Normal file
|
|
@ -0,0 +1,593 @@
|
|||
.\" generated with Ronn/v0.7.3
|
||||
.\" http://github.com/rtomayko/ronn/tree/0.7.3
|
||||
.
|
||||
.TH "README" "" "May 2017" "" ""
|
||||
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\. Completion management functionality is provided to allow user call \fBcompinit\fR only once in \fB\.zshrc\fR\.To install, execute:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
sh \-c "$(curl \-fsSL https://raw\.githubusercontent\.com/psprint/zplugin/master/doc/install\.sh)"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
Then add to \fB~/\.zshrc\fR, at bottom:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
zplugin load psprint zsh\-navigation\-tools
|
||||
zplugin ice from"notabug" atload"echo loaded zui" if"(( 1 ))"
|
||||
zplugin load zdharma/zui
|
||||
zplugin load zsh\-users/zsh\-autosuggestions
|
||||
zplugin light zsh\-users/zsh\-syntax\-highlighting
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
(No need to add:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
source "$HOME/\.zplugin/bin/zplugin\.zsh"
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.P
|
||||
because the install script does this\.)
|
||||
.
|
||||
.P
|
||||
\fBZNT\fR – multi\-word searching of history (Ctrl\-R), \fBzui\fR – textual UI library for Zshell\. The \fBice\fR subcommand – modifiers for following single command\. \fBnotabug\fR – the site \fBnotabug\.org\fR
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
.SH "News"
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
23\-05\-2017
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
New \fBice\fR modifier: \fBif\fR, to which you can provide a conditional expression
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zplg ice if"(( 0 ))"
|
||||
% zplg snippet \-\-command https://github\.com/b4b4r07/httpstat/blob/master/httpstat\.sh
|
||||
% zplg ice if"(( 1 ))"
|
||||
% zplg snippet \-\-command https://github\.com/b4b4r07/httpstat/blob/master/httpstat\.sh
|
||||
Setting up snippet httpstat\.sh
|
||||
Downloading httpstat\.sh\.\.\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
|
||||
.
|
||||
.IP "" 0
|
||||
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
16\-05\-2017
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
A very slick feature: \fBadding ice to commands\fR\. Ice is something added and something that melts\. You add modifiers to single next command, and the format (using quotes) guarantees you will see the syntax highlighted in editors:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zplg ice from"notabug" atload"echo \-\-Loaded\-\-" atclone"echo \-\-Cloned\-\-"
|
||||
% zplg load zdharma/zui
|
||||
Downloading zdharma/zui\.\.\.
|
||||
\.\.\.
|
||||
Checking connectivity\.\.\. done\.
|
||||
\-\-Cloned\-\-
|
||||
Compiling zui\.plugin\.zsh\.\.\.
|
||||
\-\-Loaded\-\-
|
||||
% grep notabug ~/\.zplugin/plugins/zdharma\-\-\-zui/\.git/config
|
||||
url = https://notabug\.org/zdharma/zui
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.IP
|
||||
One other \fBice\fR is \fBproto\fR\. Use \fBproto"git"\fR with Github to be able to use private repositories\.
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
Completion\-management supports completions provided in subdirectory, like in \fBzsh\-users/zsh\-completions\fR plugin\. With \fBice\fR modifier \fBblockf\fR (block\-fpath), you can manage such completions:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zplg ice blockf
|
||||
% zplg load zsh\-users/zsh\-completions
|
||||
\.\.\.
|
||||
Symlinking completion `_ack\' to /Users/sgniazdowski/\.zplugin/completions
|
||||
Forgetting completion `_ack\'\.\.\.
|
||||
|
||||
Symlinking completion `_afew\' to /Users/sgniazdowski/\.zplugin/completions
|
||||
Forgetting completion `_afew\'\.\.\.
|
||||
\.\.\.
|
||||
Compiling zsh\-completions\.plugin\.zsh\.\.\.
|
||||
% echo $fpath
|
||||
/Users/sgniazdowski/\.zplugin/completions /usr/local/share/zsh/site\-functions
|
||||
% zplg cdisable vagrant
|
||||
Disabled vagrant completion belonging to zsh\-users/zsh\-completions
|
||||
Forgetting completion `_vagrant\'\.\.\.
|
||||
|
||||
Initializing completion system (compinit)\.\.\.
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
|
||||
.
|
||||
.IP "" 0
|
||||
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
14\-05\-2017
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
The \fBall\fR\-variants of commands (e\.g\. \fBupdate\-all\fR) have been merged into normal variants (with \fB\-\-all\fR switch)
|
||||
.
|
||||
.IP "" 0
|
||||
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
13\-05\-2017
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
Bug fixes related to local plugins
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fB100\fR \fBms\fR gain in performance
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
When updating plugin a list of new commits is shown
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
\fBlftp\fR as fallback transport support for snippets
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
Snippets support \fBftp\fR and \fBscp\fR protocols
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
With snippets you can load a file as \fBcommand\fR that is added to PATH:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% zplg snippet \-\-command https://github\.com/b4b4r07/httpstat/blob/master/httpstat\.sh
|
||||
% httpstat\.sh
|
||||
too few arguments
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
|
||||
.
|
||||
.IP "\(bu" 4
|
||||
Snippets are updated on \fBupdate \-\-all\fR command
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "Introduction"
|
||||
.
|
||||
.P
|
||||
\fBExample use:\fR
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
% \. ~/github/zplugin/zplugin\.zsh
|
||||
% zplugin light 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) or run \fBzplugin self\-update\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\-spec}\fR\. There are also commands \fBcompile\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] [\-\-command] {url} \- source (or add to PATH with \-\-command) local or remote file (\-f: force \- don\'t use cache)
|
||||
update {plugin\-name} \- Git update plugin (or all plugins and snippets if \-\-all passed)
|
||||
status {plugin\-name} \- Git status for plugin (or all plugins if \-\-all passed)
|
||||
report {plugin\-name} \- show plugin\'s report (or all plugins\' if \-\-all passed)
|
||||
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 (or all plugins if \-\-all passed)
|
||||
uncompile {plugin\-name} \- remove compiled version of plugin (or of all plugins if \-\-all passed)
|
||||
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 as snippets (\fBzplugin snippet {file path or Github URL}\fR)\. 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\.
|
||||
.
|
||||
.P
|
||||
You might want to supress completions provided by the git plugin by issuing \fBzplugin cdclear \-q\fR (\fB\-q\fR is for quiet) – see below \fBIgnoring Compdefs\fR\.
|
||||
.
|
||||
.P
|
||||
To summarize:
|
||||
.
|
||||
.IP "" 4
|
||||
.
|
||||
.nf
|
||||
|
||||
zplugin snippet \'http://github\.com/robbyrussell/oh\-my\-zsh/raw/master/lib/git\.zsh\'
|
||||
zplugin snippet \'https://github\.com/robbyrussell/oh\-my\-zsh/raw/master/plugins/git/git\.plugin\.zsh\'
|
||||
zplugin cdclear \-q # <\- forget completions provided up to this moment
|
||||
setopt promptsubst
|
||||
# Load theme
|
||||
zplugin snippet \'https://github\.com/robbyrussell/oh\-my\-zsh/blob/master/themes/dstufft\.zsh\-theme\'
|
||||
# Load plugin\-theme depending on OMZ git library
|
||||
zplugin light NicoSantangelo/Alpharized
|
||||
.
|
||||
.fi
|
||||
.
|
||||
.IP "" 0
|
||||
.
|
||||
.SH "Calling compinit"
|
||||
Compinit should be called after loading of all plugins and before possibly calling \fBcdreply\fR\. \fBZplugin\fR takes control over completions, symlinks them to \fB~/\.zplugin/completions\fR and adds this directory to \fB$FPATH\fR\. You manage those completions via commands starting with \fBc\fR: \fBcsearch\fR, \fBclist\fR, \fBcreinstall\fR, \fBcuninstall\fR, \fBcenable\fR, \fBcdisable\fR\. All this brings order to \fB$FPATH\fR, there is only one directory there\. Also, plugins aren\'t allowed to simply run \fBcompdefs\fR\. You can decide whether to run \fBcompdefs\fR by issuing \fBzplugin cdreplay\fR (\fBcompdef\fR\-replay)\. To summarize:
|
||||
.
|
||||
.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
|
||||
This allows to call compinit once\. 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\.
|
||||
.
|
||||
.SH "Ignoring Compdefs"
|
||||
If you want to ignore \fBcompdef\fRs 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 \-q # <\- 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
|
||||
|
||||
70
git-process-output.zsh
Executable file
70
git-process-output.zsh
Executable file
|
|
@ -0,0 +1,70 @@
|
|||
#!/usr/bin/env zsh
|
||||
|
||||
emulate -LR zsh -o typesetsilent -o extendedglob -o warncreateglobal
|
||||
|
||||
local first=1
|
||||
|
||||
# $1 - n. of objects
|
||||
# $2 - packed objects
|
||||
# $3 - total objects
|
||||
# $4 - receiving percentage
|
||||
# $5 - resolving percentage
|
||||
print_my_line() {
|
||||
(( first == 0 )) && print -n $'\015'
|
||||
first=0
|
||||
print -nr -- "OBJ: $1, PACKED: $2/$3${${4:#...}:+, RECEIVING: $4%}${${5:#...}:+, RESOLVING: $5%} "
|
||||
}
|
||||
|
||||
print_my_line_compress() {
|
||||
(( first == 0 )) && print -n $'\015'
|
||||
first=0
|
||||
print -nr -- "OBJ: $1, PACKED: $2/$3, COMPRESS: $4%${${5:#...}:+, RECEIVING: $5%} "
|
||||
}
|
||||
|
||||
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
|
||||
|
||||
IFS=''
|
||||
local delim=$'\r'
|
||||
|
||||
tr '\n' '\r' | while read -rd$delim line; do
|
||||
if [[ "$line" = "Cloning into"* ]]; then
|
||||
print; print $line
|
||||
fi
|
||||
if [[ "$line" = (#b)"remote: Counting 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]##)%* ]]; then
|
||||
have_3_receiving=1
|
||||
receiving_3="${match[1]}"
|
||||
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 (( have_5_compress )); then
|
||||
print_my_line_compress "${${${(M)have_1_counting:#1}:+$counting_1}:-...}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_packed_2}:-...}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_2}:-...}" \
|
||||
"${${${(M)have_5_compress:#1}:+$compress_5}:-...}" \
|
||||
"${${${(M)have_3_receiving:#1}:+$receiving_3}:-...}"
|
||||
else
|
||||
print_my_line "${${${(M)have_1_counting:#1}:+$counting_1}:-...}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_packed_2}:-...}" \
|
||||
"${${${(M)have_2_total:#1}:+$total_2}:-...}" \
|
||||
"${${${(M)have_3_receiving:#1}:+$receiving_3}:-...}" \
|
||||
"${${${(M)have_4_deltas:#1}:+$deltas_4}:-...}"
|
||||
fi
|
||||
done
|
||||
|
||||
print
|
||||
|
|
@ -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
|
||||
78
share/deploy_doc.sh
Executable file
78
share/deploy_doc.sh
Executable file
|
|
@ -0,0 +1,78 @@
|
|||
#!/bin/bash
|
||||
|
||||
# Non-zero exit code if anything fails
|
||||
set -e
|
||||
|
||||
SOURCE_BRANCH="master"
|
||||
TARGET_BRANCH="gh-pages"
|
||||
|
||||
# No pull requests and commits to other branches
|
||||
if [[ "$TRAVIS_PULL_REQUEST" != "false" || "$TRAVIS_BRANCH" != "$SOURCE_BRANCH" ]]; then
|
||||
echo "Skipping deploy (pull request or different branch)"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
REPO=`git config remote.origin.url`
|
||||
SSH_REPO=${REPO/https:\/\/github.com\//git@github.com:}
|
||||
SHA=`git rev-parse --verify HEAD`
|
||||
|
||||
# Create an empty branch if gh-pages doesn't exist
|
||||
git clone "$REPO" out
|
||||
git -C out checkout "$TARGET_BRANCH" || git -C out checkout --orphan "$TARGET_BRANCH"
|
||||
|
||||
# To count original files
|
||||
LIST_ORIGINAL=( out/* )
|
||||
|
||||
# Remove existing contents
|
||||
mv -v out/.git .git_out
|
||||
mv -v out/index.html .
|
||||
rm -rf out
|
||||
mkdir out
|
||||
mv .git_out out/.git
|
||||
mv index.html out
|
||||
touch out/.nojekyll
|
||||
|
||||
# Copy the PDFs (built earlier by .travis.yml / make)
|
||||
cp -v zsdoc/pdf/*.pdf out
|
||||
|
||||
# To count new files
|
||||
LIST_NEW=( out/* )
|
||||
|
||||
### CD ###
|
||||
cd out
|
||||
|
||||
# No changes?
|
||||
if git diff --quiet --exit-code && [[ "${#LIST_ORIGINAL}" -eq "${#LIST_NEW}" ]]; then
|
||||
echo -- "<- ${LIST_ORIGINAL[@]}"
|
||||
echo -- "-> ${LIST_NEW[@]}"
|
||||
echo "NO CHANGES, exiting"
|
||||
exit 0
|
||||
fi
|
||||
|
||||
# Now let's go have some fun with the cloned repo
|
||||
git config user.name "Sebastian Gniazdowski [Travis CI]"
|
||||
git config user.email "$COMMIT_AUTHOR_EMAIL"
|
||||
|
||||
# Commit the new files
|
||||
git add -A .
|
||||
git commit -m "GitHub Pages deploy: ${SHA}"
|
||||
|
||||
# Get the deploy key by using Travis's stored variables to decrypt deploy_key.enc
|
||||
ENCRYPTED_KEY_VAR="encrypted_${ENCRYPTION_LABEL}_key"
|
||||
ENCRYPTED_IV_VAR="encrypted_${ENCRYPTION_LABEL}_iv"
|
||||
ENCRYPTED_KEY="${!ENCRYPTED_KEY_VAR}"
|
||||
ENCRYPTED_IV="${!ENCRYPTED_IV_VAR}"
|
||||
|
||||
openssl aes-256-cbc -K $ENCRYPTED_KEY -iv $ENCRYPTED_IV -in ../share/deploy_key.enc -out ../share/deploy_key -d
|
||||
chmod 600 ../share/deploy_key
|
||||
eval `ssh-agent -s`
|
||||
ssh-add ../share/deploy_key
|
||||
|
||||
echo
|
||||
ls -1
|
||||
echo
|
||||
|
||||
# Push to GitHub, without --force, it shouldn't be needed
|
||||
git push "$SSH_REPO" "$TARGET_BRANCH"
|
||||
|
||||
rm -f ../share/deploy_key
|
||||
BIN
share/deploy_key.enc
Normal file
BIN
share/deploy_key.enc
Normal file
Binary file not shown.
|
|
@ -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/.//
|
||||
55
test/Makefile
Normal file
55
test/Makefile
Normal file
|
|
@ -0,0 +1,55 @@
|
|||
all: test
|
||||
|
||||
alltest: test testB testC testD testE
|
||||
|
||||
test:
|
||||
make plugin svn curl general
|
||||
|
||||
testB:
|
||||
make OPTS="kshglob" plugin svn curl general
|
||||
|
||||
testC:
|
||||
make OPTS="noextendedglob" plugin svn curl general
|
||||
|
||||
testD:
|
||||
make OPTS="ksharrays" plugin svn curl general
|
||||
|
||||
testE:
|
||||
make OPTS="ignoreclosebraces" plugin svn curl general
|
||||
|
||||
plugin: test1 test2 test3 test4 test5 test6 test7 test8 test9 test10 \
|
||||
test50 test51
|
||||
|
||||
svn: test11 test12 test13 test14 test15 test16 test17 test18 test19 test20 \
|
||||
test60
|
||||
|
||||
curl: test21 test22 test23 test24 test25 test26 test27 test29 test30 \
|
||||
test70
|
||||
|
||||
general: test100 test101 test102
|
||||
|
||||
prepare: ../zplugin.zsh ../zplugin-side.zsh ../zplugin-install.zsh ../zplugin-autoload.zsh
|
||||
cp ../zplugin.zsh ../zplugin-side.zsh ../zplugin-install.zsh ../zplugin-autoload.zsh ../_zplugin ../git-process-output.zsh .
|
||||
rm -rf data
|
||||
@: ./bin/zsd-transform -q zplugin.zsh zplugin-side.zsh zplugin-install.zsh zplugin-autoload.zsh
|
||||
@: mv zsdoc/data .
|
||||
@: rm -rf zsdoc
|
||||
@: cp ../_zplugin data/functions/zplugin.zsh/
|
||||
perl -pi -e 's/command git/internet_mock_git/g' zplugin-install.zsh zplugin-autoload.zsh
|
||||
perl -pi -e 's/command svn/internet_mock_svn/g' zplugin-install.zsh
|
||||
perl -pi -e 's/command curl/internet_mock_curl/g' zplugin-install.zsh
|
||||
|
||||
test%: _test%/script _test%/urlmap _test%/model data
|
||||
rm -rf _$@/answer
|
||||
./bin/runtest.zsh _$@ "$(VERBOSE)" "$(DEBUG)" "$(OPTDUMP)" "$(EMUL)" "$(OPTS)"
|
||||
if [ "$(NODIFF)" = "" -a ! -f _$@/skip ]; then diff -x .git -x .svn -x .test_git -x '*.zwc' -x .model_keep -u -r _$@/model _$@/answer; exit $$?; fi
|
||||
@echo
|
||||
|
||||
data: ../zplugin.zsh ../zplugin-side.zsh ../zplugin-install.zsh ../zplugin-autoload.zsh ../_zplugin
|
||||
make prepare
|
||||
|
||||
clean:
|
||||
rm -rf -- data zsdoc zplugin.zsh zplugin-side.zsh zplugin-install.zsh zplugin-autoload.zsh _zplugin
|
||||
rm -rf _test*/answer _test*/*.txt _test*/skip
|
||||
|
||||
.PHONY: all test prepare clean
|
||||
5
test/README
Normal file
5
test/README
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
test 1-10 on plugin tests of Ice-mods + test 50-59
|
||||
test 11-20 on svn-snippets tests of Ice-mods + test 60-69
|
||||
test 21-30 on curl-snippets tests of Ice-mods + test 70-79
|
||||
|
||||
test 100-… general tests
|
||||
22
test/_test1/Makefile
Normal file
22
test/_test1/Makefile
Normal file
|
|
@ -0,0 +1,22 @@
|
|||
current_dir = $(notdir $(shell pwd))
|
||||
|
||||
test: script urlmap model ../data
|
||||
rm -rf answer
|
||||
cd .. && ./bin/runtest.zsh $(current_dir) "$(VERBOSE)" "$(DEBUG)" "$(OPTDUMP)" "$(EMUL)" "$(OPTS)"
|
||||
if [ "$(NODIFF)" = "" -a ! -f skip ]; then cd ..; diff -x .git -x .test_git -x '*.zwc' -x _zplugin -x .model_keep -u -r $(current_dir)/model $(current_dir)/answer; exit $$?; fi
|
||||
@echo
|
||||
|
||||
test%: ../_test%/script ../_test%/urlmap ../_test%/model ../data
|
||||
rm -rf answer
|
||||
cd .. && ./bin/runtest.zsh _$@ "$(VERBOSE)" "$(DEBUG)" "$(OPTDUMP)" "$(EMUL)" "$(OPTS)"
|
||||
if [ "$(NODIFF)" = "" -a ! -f skip ]; then cd ..; diff -x .git -x .test_git -x '*.zwc' -x _zplugin -x .model_keep -u -r _$@/model _$@/answer; exit $$?; fi
|
||||
@echo
|
||||
|
||||
../data: ../../zplugin.zsh ../../zplugin-side.zsh ../../zplugin-install.zsh ../../zplugin-autoload.zsh ../../_zplugin
|
||||
make -C .. prepare
|
||||
|
||||
clean:
|
||||
rm -rf answer
|
||||
rm -f *.txt
|
||||
|
||||
.PHONY: test clean
|
||||
5
test/_test1/README
Normal file
5
test/_test1/README
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
This test verifies:
|
||||
|
||||
1. If clone is properly done
|
||||
|
||||
2. If ice and static ice are empty
|
||||
1
test/_test1/model/completions/_zplugin
Symbolic link
1
test/_test1/model/completions/_zplugin
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../plugins/_local---zplugin/_zplugin
|
||||
5
test/_test1/model/errors
Normal file
5
test/_test1/model/errors
Normal file
|
|
@ -0,0 +1,5 @@
|
|||
ERRORS
|
||||
Failed: -zplg-diff-functions-compute for _local/zplugin
|
||||
Failed: -zplg-diff-options-compute for _local/zplugin
|
||||
Failed: -zplg-diff-env-compute _local/zplugin
|
||||
Failed: -zplg-diff-parameter-compute _local/zplugin
|
||||
1
test/_test1/model/ice
Normal file
1
test/_test1/model/ice
Normal file
|
|
@ -0,0 +1 @@
|
|||
|
||||
1
test/_test1/model/plugins/_local---zplugin/_zplugin
Symbolic link
1
test/_test1/model/plugins/_local---zplugin/_zplugin
Symbolic link
|
|
@ -0,0 +1 @@
|
|||
../../../../_zplugin
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
|
|
@ -0,0 +1 @@
|
|||
|
||||
700
test/_test1/model/plugins/psprint---zsh-select/LICENSE
Normal file
700
test/_test1/model/plugins/psprint---zsh-select/LICENSE
Normal file
|
|
@ -0,0 +1,700 @@
|
|||
This software is dual-licensed under MIT and GPLv3.
|
||||
|
||||
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
|
||||
in the Software without restriction, including without limitation the rights
|
||||
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 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.
|
||||
|
||||
GPLv3 License
|
||||
--------------
|
||||
|
||||
GNU GENERAL PUBLIC LICENSE
|
||||
Version 3, 29 June 2007
|
||||
|
||||
Copyright (C) 2007 Free Software Foundation, Inc. <http://fsf.org/>
|
||||
Everyone is permitted to copy and distribute verbatim copies
|
||||
of this license document, but changing it is not allowed.
|
||||
|
||||
Preamble
|
||||
|
||||
The GNU General Public License is a free, copyleft license for
|
||||
software and other kinds of works.
|
||||
|
||||
The licenses for most software and other practical works are designed
|
||||
to take away your freedom to share and change the works. By contrast,
|
||||
the GNU General Public License is intended to guarantee your freedom to
|
||||
share and change all versions of a program--to make sure it remains free
|
||||
software for all its users. We, the Free Software Foundation, use the
|
||||
GNU General Public License for most of our software; it applies also to
|
||||
any other work released this way by its authors. You can apply it to
|
||||
your programs, too.
|
||||
|
||||
When we speak of free software, we are referring to freedom, not
|
||||
price. Our General Public Licenses are designed to make sure that you
|
||||
have the freedom to distribute copies of free software (and charge for
|
||||
them if you wish), that you receive source code or can get it if you
|
||||
want it, that you can change the software or use pieces of it in new
|
||||
free programs, and that you know you can do these things.
|
||||
|
||||
To protect your rights, we need to prevent others from denying you
|
||||
these rights or asking you to surrender the rights. Therefore, you have
|
||||
certain responsibilities if you distribute copies of the software, or if
|
||||
you modify it: responsibilities to respect the freedom of others.
|
||||
|
||||
For example, if you distribute copies of such a program, whether
|
||||
gratis or for a fee, you must pass on to the recipients the same
|
||||
freedoms that you received. You must make sure that they, too, receive
|
||||
or can get the source code. And you must show them these terms so they
|
||||
know their rights.
|
||||
|
||||
Developers that use the GNU GPL protect your rights with two steps:
|
||||
(1) assert copyright on the software, and (2) offer you this License
|
||||
giving you legal permission to copy, distribute and/or modify it.
|
||||
|
||||
For the developers' and authors' protection, the GPL clearly explains
|
||||
that there is no warranty for this free software. For both users' and
|
||||
authors' sake, the GPL requires that modified versions be marked as
|
||||
changed, so that their problems will not be attributed erroneously to
|
||||
authors of previous versions.
|
||||
|
||||
Some devices are designed to deny users access to install or run
|
||||
modified versions of the software inside them, although the manufacturer
|
||||
can do so. This is fundamentally incompatible with the aim of
|
||||
protecting users' freedom to change the software. The systematic
|
||||
pattern of such abuse occurs in the area of products for individuals to
|
||||
use, which is precisely where it is most unacceptable. Therefore, we
|
||||
have designed this version of the GPL to prohibit the practice for those
|
||||
products. If such problems arise substantially in other domains, we
|
||||
stand ready to extend this provision to those domains in future versions
|
||||
of the GPL, as needed to protect the freedom of users.
|
||||
|
||||
Finally, every program is threatened constantly by software patents.
|
||||
States should not allow patents to restrict development and use of
|
||||
software on general-purpose computers, but in those that do, we wish to
|
||||
avoid the special danger that patents applied to a free program could
|
||||
make it effectively proprietary. To prevent this, the GPL assures that
|
||||
patents cannot be used to render the program non-free.
|
||||
|
||||
The precise terms and conditions for copying, distribution and
|
||||
modification follow.
|
||||
|
||||
TERMS AND CONDITIONS
|
||||
|
||||
0. Definitions.
|
||||
|
||||
"This License" refers to version 3 of the GNU General Public License.
|
||||
|
||||
"Copyright" also means copyright-like laws that apply to other kinds of
|
||||
works, such as semiconductor masks.
|
||||
|
||||
"The Program" refers to any copyrightable work licensed under this
|
||||
License. Each licensee is addressed as "you". "Licensees" and
|
||||
"recipients" may be individuals or organizations.
|
||||
|
||||
To "modify" a work means to copy from or adapt all or part of the work
|
||||
in a fashion requiring copyright permission, other than the making of an
|
||||
exact copy. The resulting work is called a "modified version" of the
|
||||
earlier work or a work "based on" the earlier work.
|
||||
|
||||
A "covered work" means either the unmodified Program or a work based
|
||||
on the Program.
|
||||
|
||||
To "propagate" a work means to do anything with it that, without
|
||||
permission, would make you directly or secondarily liable for
|
||||
infringement under applicable copyright law, except executing it on a
|
||||
computer or modifying a private copy. Propagation includes copying,
|
||||
distribution (with or without modification), making available to the
|
||||
public, and in some countries other activities as well.
|
||||
|
||||
To "convey" a work means any kind of propagation that enables other
|
||||
parties to make or receive copies. Mere interaction with a user through
|
||||
a computer network, with no transfer of a copy, is not conveying.
|
||||
|
||||
An interactive user interface displays "Appropriate Legal Notices"
|
||||
to the extent that it includes a convenient and prominently visible
|
||||
feature that (1) displays an appropriate copyright notice, and (2)
|
||||
tells the user that there is no warranty for the work (except to the
|
||||
extent that warranties are provided), that licensees may convey the
|
||||
work under this License, and how to view a copy of this License. If
|
||||
the interface presents a list of user commands or options, such as a
|
||||
menu, a prominent item in the list meets this criterion.
|
||||
|
||||
1. Source Code.
|
||||
|
||||
The "source code" for a work means the preferred form of the work
|
||||
for making modifications to it. "Object code" means any non-source
|
||||
form of a work.
|
||||
|
||||
A "Standard Interface" means an interface that either is an official
|
||||
standard defined by a recognized standards body, or, in the case of
|
||||
interfaces specified for a particular programming language, one that
|
||||
is widely used among developers working in that language.
|
||||
|
||||
The "System Libraries" of an executable work include anything, other
|
||||
than the work as a whole, that (a) is included in the normal form of
|
||||
packaging a Major Component, but which is not part of that Major
|
||||
Component, and (b) serves only to enable use of the work with that
|
||||
Major Component, or to implement a Standard Interface for which an
|
||||
implementation is available to the public in source code form. A
|
||||
"Major Component", in this context, means a major essential component
|
||||
(kernel, window system, and so on) of the specific operating system
|
||||
(if any) on which the executable work runs, or a compiler used to
|
||||
produce the work, or an object code interpreter used to run it.
|
||||
|
||||
The "Corresponding Source" for a work in object code form means all
|
||||
the source code needed to generate, install, and (for an executable
|
||||
work) run the object code and to modify the work, including scripts to
|
||||
control those activities. However, it does not include the work's
|
||||
System Libraries, or general-purpose tools or generally available free
|
||||
programs which are used unmodified in performing those activities but
|
||||
which are not part of the work. For example, Corresponding Source
|
||||
includes interface definition files associated with source files for
|
||||
the work, and the source code for shared libraries and dynamically
|
||||
linked subprograms that the work is specifically designed to require,
|
||||
such as by intimate data communication or control flow between those
|
||||
subprograms and other parts of the work.
|
||||
|
||||
The Corresponding Source need not include anything that users
|
||||
can regenerate automatically from other parts of the Corresponding
|
||||
Source.
|
||||
|
||||
The Corresponding Source for a work in source code form is that
|
||||
same work.
|
||||
|
||||
2. Basic Permissions.
|
||||
|
||||
All rights granted under this License are granted for the term of
|
||||
copyright on the Program, and are irrevocable provided the stated
|
||||
conditions are met. This License explicitly affirms your unlimited
|
||||
permission to run the unmodified Program. The output from running a
|
||||
covered work is covered by this License only if the output, given its
|
||||
content, constitutes a covered work. This License acknowledges your
|
||||
rights of fair use or other equivalent, as provided by copyright law.
|
||||
|
||||
You may make, run and propagate covered works that you do not
|
||||
convey, without conditions so long as your license otherwise remains
|
||||
in force. You may convey covered works to others for the sole purpose
|
||||
of having them make modifications exclusively for you, or provide you
|
||||
with facilities for running those works, provided that you comply with
|
||||
the terms of this License in conveying all material for which you do
|
||||
not control copyright. Those thus making or running the covered works
|
||||
for you must do so exclusively on your behalf, under your direction
|
||||
and control, on terms that prohibit them from making any copies of
|
||||
your copyrighted material outside their relationship with you.
|
||||
|
||||
Conveying under any other circumstances is permitted solely under
|
||||
the conditions stated below. Sublicensing is not allowed; section 10
|
||||
makes it unnecessary.
|
||||
|
||||
3. Protecting Users' Legal Rights From Anti-Circumvention Law.
|
||||
|
||||
No covered work shall be deemed part of an effective technological
|
||||
measure under any applicable law fulfilling obligations under article
|
||||
11 of the WIPO copyright treaty adopted on 20 December 1996, or
|
||||
similar laws prohibiting or restricting circumvention of such
|
||||
measures.
|
||||
|
||||
When you convey a covered work, you waive any legal power to forbid
|
||||
circumvention of technological measures to the extent such circumvention
|
||||
is effected by exercising rights under this License with respect to
|
||||
the covered work, and you disclaim any intention to limit operation or
|
||||
modification of the work as a means of enforcing, against the work's
|
||||
users, your or third parties' legal rights to forbid circumvention of
|
||||
technological measures.
|
||||
|
||||
4. Conveying Verbatim Copies.
|
||||
|
||||
You may convey verbatim copies of the Program's source code as you
|
||||
receive it, in any medium, provided that you conspicuously and
|
||||
appropriately publish on each copy an appropriate copyright notice;
|
||||
keep intact all notices stating that this License and any
|
||||
non-permissive terms added in accord with section 7 apply to the code;
|
||||
keep intact all notices of the absence of any warranty; and give all
|
||||
recipients a copy of this License along with the Program.
|
||||
|
||||
You may charge any price or no price for each copy that you convey,
|
||||
and you may offer support or warranty protection for a fee.
|
||||
|
||||
5. Conveying Modified Source Versions.
|
||||
|
||||
You may convey a work based on the Program, or the modifications to
|
||||
produce it from the Program, in the form of source code under the
|
||||
terms of section 4, provided that you also meet all of these conditions:
|
||||
|
||||
a) The work must carry prominent notices stating that you modified
|
||||
it, and giving a relevant date.
|
||||
|
||||
b) The work must carry prominent notices stating that it is
|
||||
released under this License and any conditions added under section
|
||||
7. This requirement modifies the requirement in section 4 to
|
||||
"keep intact all notices".
|
||||
|
||||
c) You must license the entire work, as a whole, under this
|
||||
License to anyone who comes into possession of a copy. This
|
||||
License will therefore apply, along with any applicable section 7
|
||||
additional terms, to the whole of the work, and all its parts,
|
||||
regardless of how they are packaged. This License gives no
|
||||
permission to license the work in any other way, but it does not
|
||||
invalidate such permission if you have separately received it.
|
||||
|
||||
d) If the work has interactive user interfaces, each must display
|
||||
Appropriate Legal Notices; however, if the Program has interactive
|
||||
interfaces that do not display Appropriate Legal Notices, your
|
||||
work need not make them do so.
|
||||
|
||||
A compilation of a covered work with other separate and independent
|
||||
works, which are not by their nature extensions of the covered work,
|
||||
and which are not combined with it such as to form a larger program,
|
||||
in or on a volume of a storage or distribution medium, is called an
|
||||
"aggregate" if the compilation and its resulting copyright are not
|
||||
used to limit the access or legal rights of the compilation's users
|
||||
beyond what the individual works permit. Inclusion of a covered work
|
||||
in an aggregate does not cause this License to apply to the other
|
||||
parts of the aggregate.
|
||||
|
||||
6. Conveying Non-Source Forms.
|
||||
|
||||
You may convey a covered work in object code form under the terms
|
||||
of sections 4 and 5, provided that you also convey the
|
||||
machine-readable Corresponding Source under the terms of this License,
|
||||
in one of these ways:
|
||||
|
||||
a) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by the
|
||||
Corresponding Source fixed on a durable physical medium
|
||||
customarily used for software interchange.
|
||||
|
||||
b) Convey the object code in, or embodied in, a physical product
|
||||
(including a physical distribution medium), accompanied by a
|
||||
written offer, valid for at least three years and valid for as
|
||||
long as you offer spare parts or customer support for that product
|
||||
model, to give anyone who possesses the object code either (1) a
|
||||
copy of the Corresponding Source for all the software in the
|
||||
product that is covered by this License, on a durable physical
|
||||
medium customarily used for software interchange, for a price no
|
||||
more than your reasonable cost of physically performing this
|
||||
conveying of source, or (2) access to copy the
|
||||
Corresponding Source from a network server at no charge.
|
||||
|
||||
c) Convey individual copies of the object code with a copy of the
|
||||
written offer to provide the Corresponding Source. This
|
||||
alternative is allowed only occasionally and noncommercially, and
|
||||
only if you received the object code with such an offer, in accord
|
||||
with subsection 6b.
|
||||
|
||||
d) Convey the object code by offering access from a designated
|
||||
place (gratis or for a charge), and offer equivalent access to the
|
||||
Corresponding Source in the same way through the same place at no
|
||||
further charge. You need not require recipients to copy the
|
||||
Corresponding Source along with the object code. If the place to
|
||||
copy the object code is a network server, the Corresponding Source
|
||||
may be on a different server (operated by you or a third party)
|
||||
that supports equivalent copying facilities, provided you maintain
|
||||
clear directions next to the object code saying where to find the
|
||||
Corresponding Source. Regardless of what server hosts the
|
||||
Corresponding Source, you remain obligated to ensure that it is
|
||||
available for as long as needed to satisfy these requirements.
|
||||
|
||||
e) Convey the object code using peer-to-peer transmission, provided
|
||||
you inform other peers where the object code and Corresponding
|
||||
Source of the work are being offered to the general public at no
|
||||
charge under subsection 6d.
|
||||
|
||||
A separable portion of the object code, whose source code is excluded
|
||||
from the Corresponding Source as a System Library, need not be
|
||||
included in conveying the object code work.
|
||||
|
||||
A "User Product" is either (1) a "consumer product", which means any
|
||||
tangible personal property which is normally used for personal, family,
|
||||
or household purposes, or (2) anything designed or sold for incorporation
|
||||
into a dwelling. In determining whether a product is a consumer product,
|
||||
doubtful cases shall be resolved in favor of coverage. For a particular
|
||||
product received by a particular user, "normally used" refers to a
|
||||
typical or common use of that class of product, regardless of the status
|
||||
of the particular user or of the way in which the particular user
|
||||
actually uses, or expects or is expected to use, the product. A product
|
||||
is a consumer product regardless of whether the product has substantial
|
||||
commercial, industrial or non-consumer uses, unless such uses represent
|
||||
the only significant mode of use of the product.
|
||||
|
||||
"Installation Information" for a User Product means any methods,
|
||||
procedures, authorization keys, or other information required to install
|
||||
and execute modified versions of a covered work in that User Product from
|
||||
a modified version of its Corresponding Source. The information must
|
||||
suffice to ensure that the continued functioning of the modified object
|
||||
code is in no case prevented or interfered with solely because
|
||||
modification has been made.
|
||||
|
||||
If you convey an object code work under this section in, or with, or
|
||||
specifically for use in, a User Product, and the conveying occurs as
|
||||
part of a transaction in which the right of possession and use of the
|
||||
User Product is transferred to the recipient in perpetuity or for a
|
||||
fixed term (regardless of how the transaction is characterized), the
|
||||
Corresponding Source conveyed under this section must be accompanied
|
||||
by the Installation Information. But this requirement does not apply
|
||||
if neither you nor any third party retains the ability to install
|
||||
modified object code on the User Product (for example, the work has
|
||||
been installed in ROM).
|
||||
|
||||
The requirement to provide Installation Information does not include a
|
||||
requirement to continue to provide support service, warranty, or updates
|
||||
for a work that has been modified or installed by the recipient, or for
|
||||
the User Product in which it has been modified or installed. Access to a
|
||||
network may be denied when the modification itself materially and
|
||||
adversely affects the operation of the network or violates the rules and
|
||||
protocols for communication across the network.
|
||||
|
||||
Corresponding Source conveyed, and Installation Information provided,
|
||||
in accord with this section must be in a format that is publicly
|
||||
documented (and with an implementation available to the public in
|
||||
source code form), and must require no special password or key for
|
||||
unpacking, reading or copying.
|
||||
|
||||
7. Additional Terms.
|
||||
|
||||
"Additional permissions" are terms that supplement the terms of this
|
||||
License by making exceptions from one or more of its conditions.
|
||||
Additional permissions that are applicable to the entire Program shall
|
||||
be treated as though they were included in this License, to the extent
|
||||
that they are valid under applicable law. If additional permissions
|
||||
apply only to part of the Program, that part may be used separately
|
||||
under those permissions, but the entire Program remains governed by
|
||||
this License without regard to the additional permissions.
|
||||
|
||||
When you convey a copy of a covered work, you may at your option
|
||||
remove any additional permissions from that copy, or from any part of
|
||||
it. (Additional permissions may be written to require their own
|
||||
removal in certain cases when you modify the work.) You may place
|
||||
additional permissions on material, added by you to a covered work,
|
||||
for which you have or can give appropriate copyright permission.
|
||||
|
||||
Notwithstanding any other provision of this License, for material you
|
||||
add to a covered work, you may (if authorized by the copyright holders of
|
||||
that material) supplement the terms of this License with terms:
|
||||
|
||||
a) Disclaiming warranty or limiting liability differently from the
|
||||
terms of sections 15 and 16 of this License; or
|
||||
|
||||
b) Requiring preservation of specified reasonable legal notices or
|
||||
author attributions in that material or in the Appropriate Legal
|
||||
Notices displayed by works containing it; or
|
||||
|
||||
c) Prohibiting misrepresentation of the origin of that material, or
|
||||
requiring that modified versions of such material be marked in
|
||||
reasonable ways as different from the original version; or
|
||||
|
||||
d) Limiting the use for publicity purposes of names of licensors or
|
||||
authors of the material; or
|
||||
|
||||
e) Declining to grant rights under trademark law for use of some
|
||||
trade names, trademarks, or service marks; or
|
||||
|
||||
f) Requiring indemnification of licensors and authors of that
|
||||
material by anyone who conveys the material (or modified versions of
|
||||
it) with contractual assumptions of liability to the recipient, for
|
||||
any liability that these contractual assumptions directly impose on
|
||||
those licensors and authors.
|
||||
|
||||
All other non-permissive additional terms are considered "further
|
||||
restrictions" within the meaning of section 10. If the Program as you
|
||||
received it, or any part of it, contains a notice stating that it is
|
||||
governed by this License along with a term that is a further
|
||||
restriction, you may remove that term. If a license document contains
|
||||
a further restriction but permits relicensing or conveying under this
|
||||
License, you may add to a covered work material governed by the terms
|
||||
of that license document, provided that the further restriction does
|
||||
not survive such relicensing or conveying.
|
||||
|
||||
If you add terms to a covered work in accord with this section, you
|
||||
must place, in the relevant source files, a statement of the
|
||||
additional terms that apply to those files, or a notice indicating
|
||||
where to find the applicable terms.
|
||||
|
||||
Additional terms, permissive or non-permissive, may be stated in the
|
||||
form of a separately written license, or stated as exceptions;
|
||||
the above requirements apply either way.
|
||||
|
||||
8. Termination.
|
||||
|
||||
You may not propagate or modify a covered work except as expressly
|
||||
provided under this License. Any attempt otherwise to propagate or
|
||||
modify it is void, and will automatically terminate your rights under
|
||||
this License (including any patent licenses granted under the third
|
||||
paragraph of section 11).
|
||||
|
||||
However, if you cease all violation of this License, then your
|
||||
license from a particular copyright holder is reinstated (a)
|
||||
provisionally, unless and until the copyright holder explicitly and
|
||||
finally terminates your license, and (b) permanently, if the copyright
|
||||
holder fails to notify you of the violation by some reasonable means
|
||||
prior to 60 days after the cessation.
|
||||
|
||||
Moreover, your license from a particular copyright holder is
|
||||
reinstated permanently if the copyright holder notifies you of the
|
||||
violation by some reasonable means, this is the first time you have
|
||||
received notice of violation of this License (for any work) from that
|
||||
copyright holder, and you cure the violation prior to 30 days after
|
||||
your receipt of the notice.
|
||||
|
||||
Termination of your rights under this section does not terminate the
|
||||
licenses of parties who have received copies or rights from you under
|
||||
this License. If your rights have been terminated and not permanently
|
||||
reinstated, you do not qualify to receive new licenses for the same
|
||||
material under section 10.
|
||||
|
||||
9. Acceptance Not Required for Having Copies.
|
||||
|
||||
You are not required to accept this License in order to receive or
|
||||
run a copy of the Program. Ancillary propagation of a covered work
|
||||
occurring solely as a consequence of using peer-to-peer transmission
|
||||
to receive a copy likewise does not require acceptance. However,
|
||||
nothing other than this License grants you permission to propagate or
|
||||
modify any covered work. These actions infringe copyright if you do
|
||||
not accept this License. Therefore, by modifying or propagating a
|
||||
covered work, you indicate your acceptance of this License to do so.
|
||||
|
||||
10. Automatic Licensing of Downstream Recipients.
|
||||
|
||||
Each time you convey a covered work, the recipient automatically
|
||||
receives a license from the original licensors, to run, modify and
|
||||
propagate that work, subject to this License. You are not responsible
|
||||
for enforcing compliance by third parties with this License.
|
||||
|
||||
An "entity transaction" is a transaction transferring control of an
|
||||
organization, or substantially all assets of one, or subdividing an
|
||||
organization, or merging organizations. If propagation of a covered
|
||||
work results from an entity transaction, each party to that
|
||||
transaction who receives a copy of the work also receives whatever
|
||||
licenses to the work the party's predecessor in interest had or could
|
||||
give under the previous paragraph, plus a right to possession of the
|
||||
Corresponding Source of the work from the predecessor in interest, if
|
||||
the predecessor has it or can get it with reasonable efforts.
|
||||
|
||||
You may not impose any further restrictions on the exercise of the
|
||||
rights granted or affirmed under this License. For example, you may
|
||||
not impose a license fee, royalty, or other charge for exercise of
|
||||
rights granted under this License, and you may not initiate litigation
|
||||
(including a cross-claim or counterclaim in a lawsuit) alleging that
|
||||
any patent claim is infringed by making, using, selling, offering for
|
||||
sale, or importing the Program or any portion of it.
|
||||
|
||||
11. Patents.
|
||||
|
||||
A "contributor" is a copyright holder who authorizes use under this
|
||||
License of the Program or a work on which the Program is based. The
|
||||
work thus licensed is called the contributor's "contributor version".
|
||||
|
||||
A contributor's "essential patent claims" are all patent claims
|
||||
owned or controlled by the contributor, whether already acquired or
|
||||
hereafter acquired, that would be infringed by some manner, permitted
|
||||
by this License, of making, using, or selling its contributor version,
|
||||
but do not include claims that would be infringed only as a
|
||||
consequence of further modification of the contributor version. For
|
||||
purposes of this definition, "control" includes the right to grant
|
||||
patent sublicenses in a manner consistent with the requirements of
|
||||
this License.
|
||||
|
||||
Each contributor grants you a non-exclusive, worldwide, royalty-free
|
||||
patent license under the contributor's essential patent claims, to
|
||||
make, use, sell, offer for sale, import and otherwise run, modify and
|
||||
propagate the contents of its contributor version.
|
||||
|
||||
In the following three paragraphs, a "patent license" is any express
|
||||
agreement or commitment, however denominated, not to enforce a patent
|
||||
(such as an express permission to practice a patent or covenant not to
|
||||
sue for patent infringement). To "grant" such a patent license to a
|
||||
party means to make such an agreement or commitment not to enforce a
|
||||
patent against the party.
|
||||
|
||||
If you convey a covered work, knowingly relying on a patent license,
|
||||
and the Corresponding Source of the work is not available for anyone
|
||||
to copy, free of charge and under the terms of this License, through a
|
||||
publicly available network server or other readily accessible means,
|
||||
then you must either (1) cause the Corresponding Source to be so
|
||||
available, or (2) arrange to deprive yourself of the benefit of the
|
||||
patent license for this particular work, or (3) arrange, in a manner
|
||||
consistent with the requirements of this License, to extend the patent
|
||||
license to downstream recipients. "Knowingly relying" means you have
|
||||
actual knowledge that, but for the patent license, your conveying the
|
||||
covered work in a country, or your recipient's use of the covered work
|
||||
in a country, would infringe one or more identifiable patents in that
|
||||
country that you have reason to believe are valid.
|
||||
|
||||
If, pursuant to or in connection with a single transaction or
|
||||
arrangement, you convey, or propagate by procuring conveyance of, a
|
||||
covered work, and grant a patent license to some of the parties
|
||||
receiving the covered work authorizing them to use, propagate, modify
|
||||
or convey a specific copy of the covered work, then the patent license
|
||||
you grant is automatically extended to all recipients of the covered
|
||||
work and works based on it.
|
||||
|
||||
A patent license is "discriminatory" if it does not include within
|
||||
the scope of its coverage, prohibits the exercise of, or is
|
||||
conditioned on the non-exercise of one or more of the rights that are
|
||||
specifically granted under this License. You may not convey a covered
|
||||
work if you are a party to an arrangement with a third party that is
|
||||
in the business of distributing software, under which you make payment
|
||||
to the third party based on the extent of your activity of conveying
|
||||
the work, and under which the third party grants, to any of the
|
||||
parties who would receive the covered work from you, a discriminatory
|
||||
patent license (a) in connection with copies of the covered work
|
||||
conveyed by you (or copies made from those copies), or (b) primarily
|
||||
for and in connection with specific products or compilations that
|
||||
contain the covered work, unless you entered into that arrangement,
|
||||
or that patent license was granted, prior to 28 March 2007.
|
||||
|
||||
Nothing in this License shall be construed as excluding or limiting
|
||||
any implied license or other defenses to infringement that may
|
||||
otherwise be available to you under applicable patent law.
|
||||
|
||||
12. No Surrender of Others' Freedom.
|
||||
|
||||
If conditions are imposed on you (whether by court order, agreement or
|
||||
otherwise) that contradict the conditions of this License, they do not
|
||||
excuse you from the conditions of this License. If you cannot convey a
|
||||
covered work so as to satisfy simultaneously your obligations under this
|
||||
License and any other pertinent obligations, then as a consequence you may
|
||||
not convey it at all. For example, if you agree to terms that obligate you
|
||||
to collect a royalty for further conveying from those to whom you convey
|
||||
the Program, the only way you could satisfy both those terms and this
|
||||
License would be to refrain entirely from conveying the Program.
|
||||
|
||||
13. Use with the GNU Affero General Public License.
|
||||
|
||||
Notwithstanding any other provision of this License, you have
|
||||
permission to link or combine any covered work with a work licensed
|
||||
under version 3 of the GNU Affero General Public License into a single
|
||||
combined work, and to convey the resulting work. The terms of this
|
||||
License will continue to apply to the part which is the covered work,
|
||||
but the special requirements of the GNU Affero General Public License,
|
||||
section 13, concerning interaction through a network will apply to the
|
||||
combination as such.
|
||||
|
||||
14. Revised Versions of this License.
|
||||
|
||||
The Free Software Foundation may publish revised and/or new versions of
|
||||
the GNU General Public License from time to time. Such new versions will
|
||||
be similar in spirit to the present version, but may differ in detail to
|
||||
address new problems or concerns.
|
||||
|
||||
Each version is given a distinguishing version number. If the
|
||||
Program specifies that a certain numbered version of the GNU General
|
||||
Public License "or any later version" applies to it, you have the
|
||||
option of following the terms and conditions either of that numbered
|
||||
version or of any later version published by the Free Software
|
||||
Foundation. If the Program does not specify a version number of the
|
||||
GNU General Public License, you may choose any version ever published
|
||||
by the Free Software Foundation.
|
||||
|
||||
If the Program specifies that a proxy can decide which future
|
||||
versions of the GNU General Public License can be used, that proxy's
|
||||
public statement of acceptance of a version permanently authorizes you
|
||||
to choose that version for the Program.
|
||||
|
||||
Later license versions may give you additional or different
|
||||
permissions. However, no additional obligations are imposed on any
|
||||
author or copyright holder as a result of your choosing to follow a
|
||||
later version.
|
||||
|
||||
15. Disclaimer of Warranty.
|
||||
|
||||
THERE IS NO WARRANTY FOR THE PROGRAM, TO THE EXTENT PERMITTED BY
|
||||
APPLICABLE LAW. EXCEPT WHEN OTHERWISE STATED IN WRITING THE COPYRIGHT
|
||||
HOLDERS AND/OR OTHER PARTIES PROVIDE THE PROGRAM "AS IS" WITHOUT WARRANTY
|
||||
OF ANY KIND, EITHER EXPRESSED OR IMPLIED, INCLUDING, BUT NOT LIMITED TO,
|
||||
THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR
|
||||
PURPOSE. THE ENTIRE RISK AS TO THE QUALITY AND PERFORMANCE OF THE PROGRAM
|
||||
IS WITH YOU. SHOULD THE PROGRAM PROVE DEFECTIVE, YOU ASSUME THE COST OF
|
||||
ALL NECESSARY SERVICING, REPAIR OR CORRECTION.
|
||||
|
||||
16. Limitation of Liability.
|
||||
|
||||
IN NO EVENT UNLESS REQUIRED BY APPLICABLE LAW OR AGREED TO IN WRITING
|
||||
WILL ANY COPYRIGHT HOLDER, OR ANY OTHER PARTY WHO MODIFIES AND/OR CONVEYS
|
||||
THE PROGRAM AS PERMITTED ABOVE, BE LIABLE TO YOU FOR DAMAGES, INCLUDING ANY
|
||||
GENERAL, SPECIAL, INCIDENTAL OR CONSEQUENTIAL DAMAGES ARISING OUT OF THE
|
||||
USE OR INABILITY TO USE THE PROGRAM (INCLUDING BUT NOT LIMITED TO LOSS OF
|
||||
DATA OR DATA BEING RENDERED INACCURATE OR LOSSES SUSTAINED BY YOU OR THIRD
|
||||
PARTIES OR A FAILURE OF THE PROGRAM TO OPERATE WITH ANY OTHER PROGRAMS),
|
||||
EVEN IF SUCH HOLDER OR OTHER PARTY HAS BEEN ADVISED OF THE POSSIBILITY OF
|
||||
SUCH DAMAGES.
|
||||
|
||||
17. Interpretation of Sections 15 and 16.
|
||||
|
||||
If the disclaimer of warranty and limitation of liability provided
|
||||
above cannot be given local legal effect according to their terms,
|
||||
reviewing courts shall apply local law that most closely approximates
|
||||
an absolute waiver of all civil liability in connection with the
|
||||
Program, unless a warranty or assumption of liability accompanies a
|
||||
copy of the Program in return for a fee.
|
||||
|
||||
END OF TERMS AND CONDITIONS
|
||||
|
||||
How to Apply These Terms to Your New Programs
|
||||
|
||||
If you develop a new program, and you want it to be of the greatest
|
||||
possible use to the public, the best way to achieve this is to make it
|
||||
free software which everyone can redistribute and change under these terms.
|
||||
|
||||
To do so, attach the following notices to the program. It is safest
|
||||
to attach them to the start of each source file to most effectively
|
||||
state the exclusion of warranty; and each file should have at least
|
||||
the "copyright" line and a pointer to where the full notice is found.
|
||||
|
||||
<one line to give the program's name and a brief idea of what it does.>
|
||||
Copyright (C) <year> <name of author>
|
||||
|
||||
This program is free software: you can redistribute it and/or modify
|
||||
it under the terms of the GNU General Public License as published by
|
||||
the Free Software Foundation, either version 3 of the License, or
|
||||
(at your option) any later version.
|
||||
|
||||
This program is distributed in the hope that it will be useful,
|
||||
but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
GNU General Public License for more details.
|
||||
|
||||
You should have received a copy of the GNU General Public License
|
||||
along with this program. If not, see <http://www.gnu.org/licenses/>.
|
||||
|
||||
Also add information on how to contact you by electronic and paper mail.
|
||||
|
||||
If the program does terminal interaction, make it output a short
|
||||
notice like this when it starts in an interactive mode:
|
||||
|
||||
<program> Copyright (C) <year> <name of author>
|
||||
This program comes with ABSOLUTELY NO WARRANTY; for details type `show w'.
|
||||
This is free software, and you are welcome to redistribute it
|
||||
under certain conditions; type `show c' for details.
|
||||
|
||||
The hypothetical commands `show w' and `show c' should show the appropriate
|
||||
parts of the General Public License. Of course, your program's commands
|
||||
might be different; for a GUI interface, you would use an "about box".
|
||||
|
||||
You should also get your employer (if you work as a programmer) or school,
|
||||
if any, to sign a "copyright disclaimer" for the program, if necessary.
|
||||
For more information on this, and how to apply and follow the GNU GPL, see
|
||||
<http://www.gnu.org/licenses/>.
|
||||
|
||||
The GNU General Public License does not permit incorporating your program
|
||||
into proprietary programs. If your program is a subroutine library, you
|
||||
may consider it more useful to permit linking proprietary applications with
|
||||
the library. If this is what you want to do, use the GNU Lesser General
|
||||
Public License instead of this License. But first, please read
|
||||
<http://www.gnu.org/philosophy/why-not-lgpl.html>.
|
||||
89
test/_test1/model/plugins/psprint---zsh-select/README.md
Normal file
89
test/_test1/model/plugins/psprint---zsh-select/README.md
Normal file
|
|
@ -0,0 +1,89 @@
|
|||
[](https://www.paypal.com/cgi-bin/webscr?cmd=_s-xclick&hosted_button_id=D6XDCHDSBDSDG)
|
||||
|
||||
## Introduction
|
||||
|
||||
A shell command that will display selection list. It is similar to `selecta`,
|
||||
but uses curses library to do display, and when compared to `fzf`, the main
|
||||
difference is approximate matching instead of fuzzy matching. It is written in
|
||||
Zshell and has it's capabilities:
|
||||
|
||||
- patterns, allowing multi-term searching
|
||||
- curses module
|
||||
- approximate matching (`Ctrl-F`)
|
||||
|
||||
The file `zsh-select` can be copied to any `bin` directory. `Zsh` will
|
||||
serve as say `Ruby`, and `zsh-select` will be a regular program available
|
||||
in system.
|
||||
|
||||
Pressing `o` will make elements uniqe. To search again after pressing enter,
|
||||
press `/`. Approximate matching mode is activated by `Ctrl-F`.
|
||||
|
||||
Video: [asciinema](https://asciinema.org/a/48490). You can resize the video by pressing `Ctrl-+` or `Cmd-+`.
|
||||
|
||||
[](https://asciinema.org/a/48490)
|
||||
|
||||
## Installation
|
||||
|
||||
Simply copy file `zsh-select` to any `bin` directory such as `/usr/local/bin`.
|
||||
The package is also available as plugin. `zsh-select` will be available in
|
||||
interactive `Zsh` sessions only when using this method. Nevertheless, integration
|
||||
with `Vim` and other uses will simply work when `Zsh` is your main shell. Also,
|
||||
plugin managers often allow easy updates.
|
||||
|
||||
## Integration with Vim
|
||||
|
||||
Adding following snippet to `vimrc` will provide `\f` keyboard shortcut that will
|
||||
run `zsh-select` as file-selector. Multi-term searching and approximate matching
|
||||
(`Ctrl-F`) will be available. The snippet is based on code from `selecta` github
|
||||
page (MIT license):
|
||||
|
||||
```vim
|
||||
" Run a given vim command on the results of fuzzy selecting from a given shell
|
||||
" command. See usage below.
|
||||
function! ZshSelectCommand(choice_command, zshselect_args, vim_command)
|
||||
try
|
||||
let selection = system(a:choice_command . " | zsh-select " . a:zshselect_args)
|
||||
catch /Vim:Interrupt/
|
||||
" Swallow the ^C so that the redraw below happens; otherwise there will be
|
||||
" leftovers from zshselect on the screen
|
||||
redraw!
|
||||
return
|
||||
endtry
|
||||
redraw!
|
||||
exec a:vim_command . " " . selection
|
||||
endfunction
|
||||
|
||||
" Find all files in all non-dot directories starting in the working directory.
|
||||
" Fuzzy select one of those. Open the selected file with :e.
|
||||
nnoremap <leader>f :call ZshSelectCommand("find * -type f 2>/dev/null", "", ":e")<cr>
|
||||
```
|
||||
|
||||
## Configuring
|
||||
|
||||
There are a few environment variables that can be set to alter `Zsh-Select`
|
||||
behavior. Values assigned below are the defaults:
|
||||
|
||||
```zsh
|
||||
export ZSHSELECT_BOLD="1" # The interface will be drawn in bold font. Use "0" for no bold
|
||||
export ZSHSELECT_COLOR_PAIR="white/black" # Draw in white foreground, black background. Try e.g.: "white/green"
|
||||
export ZSHSELECT_BORDER="0" # No border around interface, Use "1" for the border
|
||||
export ZSHSELECT_ACTIVE_TEXT="reverse" # Mark current element with reversed text. Use "underline" for marking with underline
|
||||
export ZSHSELECT_START_IN_SEARCH_MODE="1" # Starts Zsh-Select with searching active. "0" will not invoke searching at start.
|
||||
```
|
||||
|
||||
## Use with plugin managers
|
||||
### [Zplugin](https://github.com/psprint/zplugin)
|
||||
|
||||
Add `zplugin load psprint/zsh-select` to `.zshrc`.
|
||||
The plugin will be loaded next time you start `Zsh`.
|
||||
To update issue `zplugin update psprint/zsh-select` from command line.
|
||||
|
||||
### Zgen
|
||||
|
||||
Add `zgen load psprint/zsh-select` to `.zshrc` and issue a `zgen reset` (this
|
||||
assumes that there is a proper `zgen save` construct in `.zshrc`).
|
||||
|
||||
### Antigen
|
||||
Add `antigen bundle psprint/zsh-select` to `.zshrc`. There also should be
|
||||
`antigen apply`.
|
||||
|
||||
1130
test/_test1/model/plugins/psprint---zsh-select/zsh-select
Executable file
1130
test/_test1/model/plugins/psprint---zsh-select/zsh-select
Executable file
File diff suppressed because it is too large
Load diff
|
|
@ -0,0 +1 @@
|
|||
The file has a +x permission
|
||||
|
|
@ -0,0 +1,8 @@
|
|||
# Copy the file "zsh-select" to e.g. /usr/local/bin
|
||||
# The package is also available as plugin. `zsh-select` will be
|
||||
# available in interactive `Zsh` sessions only when using this
|
||||
# method.
|
||||
|
||||
0="${(%):-%N}" # this gives immunity to functionargzero being unset
|
||||
local REPO_DIR="${0%/*}"
|
||||
path+=( "$REPO_DIR" )
|
||||
Binary file not shown.
1
test/_test1/model/services/.model_keep
Normal file
1
test/_test1/model/services/.model_keep
Normal file
|
|
@ -0,0 +1 @@
|
|||
Keep `services' in Git repository
|
||||
2
test/_test1/model/sice
Normal file
2
test/_test1/model/sice
Normal file
|
|
@ -0,0 +1,2 @@
|
|||
depth 1
|
||||
psprint/zsh-select
|
||||
1
test/_test1/model/snippets/.model_keep
Normal file
1
test/_test1/model/snippets/.model_keep
Normal file
|
|
@ -0,0 +1 @@
|
|||
Keep `snippets' in Git repository
|
||||
50
test/_test1/model/state
Normal file
50
test/_test1/model/state
Normal file
|
|
@ -0,0 +1,50 @@
|
|||
BIN_DIR
|
||||
test
|
||||
COMPLETIONS_DIR
|
||||
_test1/answer/completions
|
||||
CUR_USPL2
|
||||
|
||||
CUR_USR
|
||||
|
||||
DTRACE
|
||||
0
|
||||
EXTENDED_GLOB
|
||||
|
||||
HOME_DIR
|
||||
_test1/answer
|
||||
HOME_READY
|
||||
1
|
||||
PLUGINS_DIR
|
||||
_test1/answer/plugins
|
||||
SERVICES_DIR
|
||||
_test1/answer/services
|
||||
SHADOWING
|
||||
inactive
|
||||
SNIPPETS_DIR
|
||||
_test1/answer/snippets
|
||||
TIME_1_psprint---zsh-select
|
||||
__reset-by-test__
|
||||
TIME_INDEX
|
||||
1
|
||||
ZERO
|
||||
zplugin.zsh
|
||||
---
|
||||
ZPLG_REGISTERED_PLUGINS: '_local/zplugin' 'psprint/zsh-select'
|
||||
ZPLG_REGISTERED_STATES: '_local/zplugin' '1' 'psprint/zsh-select' '2'
|
||||
ZPLG_SNIPPETS:
|
||||
ZPLG_SICE: 'psprint/zsh-select' 'depth 1 '
|
||||
ZPLG_FUNCTIONS: 'psprint/zsh-select' ''
|
||||
ZPLG_OPTIONS: 'psprint/zsh-select' ''
|
||||
ZPLG_PATH: 'psprint/zsh-select' '_test1/answer/plugins/psprint---zsh-select '
|
||||
ZPLG_FPATH: 'psprint/zsh-select' ''
|
||||
ZPLG_PARAMETERS_PRE: 'psprint/zsh-select' ''
|
||||
ZPLG_PARAMETERS_POST: 'psprint/zsh-select' ''
|
||||
ZPLG_ZSTYLES: 'psprint/zsh-select' ''
|
||||
ZPLG_BINDKEYS: 'psprint/zsh-select' ''
|
||||
ZPLG_ALIASES: 'psprint/zsh-select' ''
|
||||
ZPLG_WIDGETS_SAVED: 'psprint/zsh-select' ''
|
||||
ZPLG_WIDGETS_DELETE: 'psprint/zsh-select' ''
|
||||
ZPLG_COMPDEF_REPLAY:
|
||||
ZPLG_CUR_PLUGIN: ''
|
||||
---
|
||||
Parameter module: 1
|
||||
1
test/_test1/plugins
Normal file
1
test/_test1/plugins
Normal file
|
|
@ -0,0 +1 @@
|
|||
zsh-select
|
||||
9
test/_test1/script
Normal file
9
test/_test1/script
Normal file
|
|
@ -0,0 +1,9 @@
|
|||
tst_verbosity
|
||||
|
||||
zplugin ice depth"1"
|
||||
zplugin load psprint/zsh-select
|
||||
|
||||
print -rl -- "${(o)ZPLG_ICE[@]}" >! answer/ice
|
||||
print -rl -- "${(okv)ZPLG_SICE[@]}" >! answer/sice
|
||||
|
||||
# vim:ft=zsh
|
||||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Reference in a new issue