Skip to content

Latest commit

 

History

History
860 lines (565 loc) · 17.7 KB

zinit-install.zsh.adoc

File metadata and controls

860 lines (565 loc) · 17.7 KB

NAME

zinit-install.zsh - a shell script

Documentation automatically generated with `zshelldoc'

FUNCTIONS

 .zi÷get-architecture
 .zinit-at-eval
 .zinit-compile-plugin
 .zinit-compinit
 .zinit-configure-run-autoconf
 .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
 zicp
 ziextract
 zimv
 zpextract
 ∞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-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

.zi÷get-architecture

Has 43 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-compile-plugin

Compiles given plugin (its main source file, and also an
additional "....zsh" file if it exists).
$1 - plugin spec (4 formats: user---plugin, user/plugin, user, plugin)
$2 - plugin (only when $1 - i.e. user - given)

Has 83 line(s). Calls functions:

.zinit-compile-plugin
|-- zinit-side.zsh/.zinit-compute-ice
|-- zinit-side.zsh/.zinit-first
`-- zinit.zsh/+zi-log

Uses feature(s): eval, setopt, zcompile

Called by:

∞zinit-compile-plugin-hook
zinit-autoload.zsh/.zinit-compile-uncompile-all
zinit.zsh/zinit

.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-configure-run-autoconf

Called if # passed to configure ice or no ./configure found
Runs autoconf, autoreconf, and autogen.sh

Has 64 line(s). Calls functions:

.zinit-configure-run-autoconf
`-- zinit-side.zsh/.zinit-countdown

Called by:

∞zinit-configure-base-hook

.zinit-download-file-stdout

Downloads file to stdout. Supports following backend commands:
curl, wget, lftp, lynx. Used by snippet loading.

Has 53 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-side.zsh/.zinit-store-ices
|-- zinit.zsh/+zi-log
`-- 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 52 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 195 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
'clist' or '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). Doesn’t call other functions.

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 214 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-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-side.zsh/.zinit-store-ices
|   |-- zinit.zsh/+zi-log
|   `-- 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

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.
Next stage is scanning of files with the common utility file
to detect executables. They are given +x mode. There are also
messages to the user on performed actions.
$1 - url
$2 - file

Has 283 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
zpextract

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.).

zpextract

Has 1 line(s). Calls functions:

zpextract
`-- ziextract
    `-- zinit.zsh/+zi-log

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

∞zinit-atclone-hook

Has 26 line(s). Calls functions:

∞zinit-atclone-hook
|-- zinit-side.zsh/.zinit-countdown
`-- zinit.zsh/@zinit-substitute

Uses feature(s): eval, setopt

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

∞zinit-atpull-e-hook

Has 22 line(s). Calls functions:

∞zinit-atpull-e-hook
|-- .zinit-at-eval
|   `-- zinit.zsh/@zinit-substitute
`-- zinit-side.zsh/.zinit-countdown

Uses feature(s): setopt

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

∞zinit-atpull-hook

Has 22 line(s). Calls functions:

∞zinit-atpull-hook
|-- .zinit-at-eval
|   `-- zinit.zsh/@zinit-substitute
`-- zinit-side.zsh/.zinit-countdown

Uses feature(s): setopt

Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).

∞zinit-compile-plugin-hook

Has 19 line(s). Calls functions:

∞zinit-compile-plugin-hook
`-- .zinit-compile-plugin
    |-- zinit-side.zsh/.zinit-compute-ice
    |-- zinit-side.zsh/.zinit-first
    `-- 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-configure-base-hook

A base common implementation of configure'', as all
the starting steps are rigid and the same in all
hooks, hence the idea. TODO: use in make'' and other
places.

Has 65 line(s). Calls functions:

∞zinit-configure-base-hook
|-- .zinit-configure-run-autoconf
|   `-- zinit-side.zsh/.zinit-countdown
|-- zinit-side.zsh/.zinit-countdown
`-- zinit.zsh/@zinit-substitute

Called by:

∞zinit-configure-e-hook
∞zinit-configure-hook

∞zinit-configure-e-hook

The !-version of configure'' ice. Runs in between
of make'!!' and make'!'. Configure naturally runs
before make.

Has 1 line(s). Calls functions:

∞zinit-configure-e-hook
`-- ∞zinit-configure-base-hook
    |-- .zinit-configure-run-autoconf
    |   `-- zinit-side.zsh/.zinit-countdown
    |-- zinit-side.zsh/.zinit-countdown
    `-- 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-configure-run-autoconf
    |   `-- zinit-side.zsh/.zinit-countdown
    |-- zinit-side.zsh/.zinit-countdown
    `-- 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 30 line(s). Calls functions:

∞zinit-cp-hook
`-- zinit.zsh/@zinit-substitute

Uses feature(s): setopt

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-make-base-hook

Has 29 line(s). Calls functions:

∞zinit-make-base-hook
|-- zinit-side.zsh/.zinit-countdown
`-- zinit.zsh/@zinit-substitute

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-side.zsh/.zinit-countdown
    `-- 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-side.zsh/.zinit-countdown
    `-- 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-side.zsh/.zinit-countdown
    `-- 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 35 line(s). Calls functions:

∞zinit-mv-hook
|-- zinit.zsh/+zi-log
`-- zinit.zsh/@zinit-substitute

Uses feature(s): setopt

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