refactor: rename +zinit-message to +zi-log (#563)

- Rename all instances of +zinit-message to +zi-log
- Maintain compatibility with community plugins/annexes by forwarding +zinit-message calls to +zi-log

Signed-off-by: Doster, Vladislav <mvdoster@gmail.com>
This commit is contained in:
vladislav doster 2023-08-20 00:59:44 -05:00 committed by GitHub
parent 68a6b42caf
commit 14cc16167f
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
8 changed files with 413 additions and 414 deletions

View file

@ -126,7 +126,7 @@ Has 39 line(s). Calls functions:
.zinit-build-module .zinit-build-module
|-- .zinit-module |-- .zinit-module
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_, _trap_ Uses feature(s): _setopt_, _trap_
@ -152,7 +152,7 @@ Has 15 line(s). Calls functions:
.zinit-cd .zinit-cd
|-- .zinit-get-path |-- .zinit-get-path
|   `-- zinit.zsh/.zinit-get-object-path |   `-- zinit.zsh/.zinit-get-object-path
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -405,7 +405,7 @@ ____
Has 17 line(s). Calls functions: Has 17 line(s). Calls functions:
.zinit-confirm .zinit-confirm
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _eval_, _read_ Uses feature(s): _eval_, _read_
@ -452,7 +452,7 @@ Has 111 line(s). Calls functions:
|-- .zinit-run-delete-hooks |-- .zinit-run-delete-hooks
|   `-- zinit-side.zsh/.zinit-countdown |   `-- zinit-side.zsh/.zinit-countdown
|-- zinit-side.zsh/.zinit-compute-ice |-- zinit-side.zsh/.zinit-compute-ice
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
|-- zinit.zsh/.zinit-any-to-user-plugin |-- zinit.zsh/.zinit-any-to-user-plugin
`-- zinit.zsh/zinit `-- zinit.zsh/zinit
@ -781,7 +781,7 @@ Has 39 line(s). Calls functions:
|-- .zinit-pager |-- .zinit-pager
|-- zinit-side.zsh/.zinit-exists-physically-message |-- zinit-side.zsh/.zinit-exists-physically-message
|-- zinit-side.zsh/.zinit-first |-- zinit-side.zsh/.zinit-first
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/.zinit-any-to-user-plugin `-- zinit.zsh/.zinit-any-to-user-plugin
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -874,7 +874,7 @@ Has 24 line(s). Calls functions:
.zinit-module .zinit-module
`-- .zinit-build-module `-- .zinit-build-module
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Called by: Called by:
@ -1059,7 +1059,7 @@ Has 42 line(s). Calls functions:
.zinit-self-update .zinit-self-update
|-- .zinit-pager |-- .zinit-pager
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/.zinit-get-mtime-into `-- zinit.zsh/.zinit-get-mtime-into
Uses feature(s): _setopt_, _source_, _zcompile_ Uses feature(s): _setopt_, _source_, _zcompile_
@ -1248,7 +1248,7 @@ ____
Has 47 line(s). Calls functions: Has 47 line(s). Calls functions:
.zinit-show-zstatus .zinit-show-zstatus
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -1329,7 +1329,7 @@ Has 46 line(s). Calls functions:
|   `-- zinit.zsh/.zinit-get-object-path |   `-- zinit.zsh/.zinit-get-object-path
|-- zinit-install.zsh/.zinit-compinit |-- zinit-install.zsh/.zinit-compinit
|-- zinit-install.zsh/.zinit-forget-completion |-- zinit-install.zsh/.zinit-forget-completion
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_, _source_ Uses feature(s): _setopt_, _source_
@ -1425,16 +1425,16 @@ Has 84 line(s). Calls functions:
|   |-- zinit-side.zsh/.zinit-exists-physically-message |   |-- zinit-side.zsh/.zinit-exists-physically-message
|   |-- zinit-side.zsh/.zinit-store-ices |   |-- zinit-side.zsh/.zinit-store-ices
|   |-- zinit-side.zsh/.zinit-two-paths |   |-- zinit-side.zsh/.zinit-two-paths
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   |-- zinit.zsh/.zinit-any-to-user-plugin |   |-- zinit.zsh/.zinit-any-to-user-plugin
|   `-- zinit.zsh/.zinit-set-m-func |   `-- zinit.zsh/.zinit-set-m-func
|-- .zinit-update-or-status-snippet |-- .zinit-update-or-status-snippet
|   |-- zinit-install.zsh/.zinit-update-snippet |   |-- zinit-install.zsh/.zinit-update-snippet
|   `-- zinit-side.zsh/.zinit-compute-ice |   `-- zinit-side.zsh/.zinit-compute-ice
|-- .zinit-wait-for-update-jobs |-- .zinit-wait-for-update-jobs
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/.zinit-any-to-user-plugin `-- zinit.zsh/.zinit-any-to-user-plugin
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -1472,7 +1472,7 @@ Has 325 line(s). Calls functions:
|-- zinit-side.zsh/.zinit-exists-physically-message |-- zinit-side.zsh/.zinit-exists-physically-message
|-- zinit-side.zsh/.zinit-store-ices |-- zinit-side.zsh/.zinit-store-ices
|-- zinit-side.zsh/.zinit-two-paths |-- zinit-side.zsh/.zinit-two-paths
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
|-- zinit.zsh/.zinit-any-to-user-plugin |-- zinit.zsh/.zinit-any-to-user-plugin
`-- zinit.zsh/.zinit-set-m-func `-- zinit.zsh/.zinit-set-m-func
@ -1501,7 +1501,7 @@ Has 133 line(s). Calls functions:
.zinit-update-or-status-all .zinit-update-or-status-all
|-- .zinit-self-update |-- .zinit-self-update
|   |-- .zinit-pager |   |-- .zinit-pager
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   `-- zinit.zsh/.zinit-get-mtime-into |   `-- zinit.zsh/.zinit-get-mtime-into
|-- .zinit-update-all-parallel |-- .zinit-update-all-parallel
|   |-- .zinit-update-or-status |   |-- .zinit-update-or-status
@ -1517,16 +1517,16 @@ Has 133 line(s). Calls functions:
|   |   |-- zinit-side.zsh/.zinit-exists-physically-message |   |   |-- zinit-side.zsh/.zinit-exists-physically-message
|   |   |-- zinit-side.zsh/.zinit-store-ices |   |   |-- zinit-side.zsh/.zinit-store-ices
|   |   |-- zinit-side.zsh/.zinit-two-paths |   |   |-- zinit-side.zsh/.zinit-two-paths
|   |   |-- zinit.zsh/+zinit-message |   |   |-- zinit.zsh/+zi-log
|   |   |-- zinit.zsh/.zinit-any-to-user-plugin |   |   |-- zinit.zsh/.zinit-any-to-user-plugin
|   |   `-- zinit.zsh/.zinit-set-m-func |   |   `-- zinit.zsh/.zinit-set-m-func
|   |-- .zinit-update-or-status-snippet |   |-- .zinit-update-or-status-snippet
|   |   |-- zinit-install.zsh/.zinit-update-snippet |   |   |-- zinit-install.zsh/.zinit-update-snippet
|   |   `-- zinit-side.zsh/.zinit-compute-ice |   |   `-- zinit-side.zsh/.zinit-compute-ice
|   |-- .zinit-wait-for-update-jobs |   |-- .zinit-wait-for-update-jobs
|   |   `-- zinit.zsh/+zinit-message |   |   `-- zinit.zsh/+zi-log
|   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   `-- zinit.zsh/.zinit-any-to-user-plugin |   `-- zinit.zsh/.zinit-any-to-user-plugin
|-- .zinit-update-or-status |-- .zinit-update-or-status
|   |-- .zinit-pager |   |-- .zinit-pager
@ -1541,7 +1541,7 @@ Has 133 line(s). Calls functions:
|   |-- zinit-side.zsh/.zinit-exists-physically-message |   |-- zinit-side.zsh/.zinit-exists-physically-message
|   |-- zinit-side.zsh/.zinit-store-ices |   |-- zinit-side.zsh/.zinit-store-ices
|   |-- zinit-side.zsh/.zinit-two-paths |   |-- zinit-side.zsh/.zinit-two-paths
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   |-- zinit.zsh/.zinit-any-to-user-plugin |   |-- zinit.zsh/.zinit-any-to-user-plugin
|   `-- zinit.zsh/.zinit-set-m-func |   `-- zinit.zsh/.zinit-set-m-func
|-- .zinit-update-or-status-snippet |-- .zinit-update-or-status-snippet
@ -1549,7 +1549,7 @@ Has 133 line(s). Calls functions:
|   `-- zinit-side.zsh/.zinit-compute-ice |   `-- zinit-side.zsh/.zinit-compute-ice
|-- zinit-install.zsh/.zinit-compinit |-- zinit-install.zsh/.zinit-compinit
|-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
|-- zinit.zsh/.zinit-any-to-user-plugin |-- zinit.zsh/.zinit-any-to-user-plugin
`-- zinit.zsh/.zinit-get-mtime-into `-- zinit.zsh/.zinit-get-mtime-into
@ -1590,7 +1590,7 @@ Called by:
Has 18 line(s). Calls functions: Has 18 line(s). Calls functions:
.zinit-wait-for-update-jobs .zinit-wait-for-update-jobs
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _wait_ Uses feature(s): _wait_
@ -1611,7 +1611,7 @@ ____
Has 2 line(s). Calls functions: Has 2 line(s). Calls functions:
zi::version zi::version
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Called by: Called by:

View file

@ -62,7 +62,7 @@ Uses feature(s): _source_
Has 43 line(s). Calls functions: Has 43 line(s). Calls functions:
.zi::get-architecture .zi::get-architecture
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -99,7 +99,7 @@ Has 83 line(s). Calls functions:
.zinit-compile-plugin .zinit-compile-plugin
|-- zinit-side.zsh/.zinit-compute-ice |-- zinit-side.zsh/.zinit-compute-ice
|-- zinit-side.zsh/.zinit-first |-- zinit-side.zsh/.zinit-first
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _eval_, _setopt_, _zcompile_ Uses feature(s): _eval_, _setopt_, _zcompile_
@ -127,7 +127,7 @@ Has 26 line(s). Calls functions:
.zinit-compinit .zinit-compinit
|-- .zinit-forget-completion |-- .zinit-forget-completion
|-- compinit |-- compinit
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _autoload_, _compinit_, _setopt_, _unfunction_ Uses feature(s): _autoload_, _compinit_, _setopt_, _unfunction_
@ -169,7 +169,7 @@ ____
Has 53 line(s). Calls functions: Has 53 line(s). Calls functions:
.zinit-download-file-stdout .zinit-download-file-stdout
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_, _trap_, _type_ Uses feature(s): _setopt_, _trap_, _type_
@ -197,21 +197,21 @@ Has 377 line(s). Calls functions:
.zinit-download-snippet .zinit-download-snippet
|-- .zinit-download-file-stdout |-- .zinit-download-file-stdout
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-get-url-mtime |-- .zinit-get-url-mtime
|-- .zinit-install-completions |-- .zinit-install-completions
|   |-- .zinit-compinit |   |-- .zinit-compinit
|   |   |-- .zinit-forget-completion |   |   |-- .zinit-forget-completion
|   |   |-- compinit |   |   |-- compinit
|   |   `-- zinit.zsh/+zinit-message |   |   `-- zinit.zsh/+zi-log
|   |-- .zinit-forget-completion |   |-- .zinit-forget-completion
|   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|   |-- zinit-side.zsh/.zinit-exists-physically-message |   |-- zinit-side.zsh/.zinit-exists-physically-message
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   `-- zinit.zsh/.zinit-any-to-user-plugin |   `-- zinit.zsh/.zinit-any-to-user-plugin
|-- .zinit-mirror-using-svn |-- .zinit-mirror-using-svn
|-- zinit-side.zsh/.zinit-store-ices |-- zinit-side.zsh/.zinit-store-ices
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/is-at-least `-- zinit.zsh/is-at-least
Uses feature(s): _is-at-least_, _setopt_, _trap_, _zcompile_ Uses feature(s): _is-at-least_, _setopt_, _trap_, _zcompile_
@ -227,8 +227,8 @@ Has 30 line(s). Calls functions:
.zinit-extract .zinit-extract
|-- ziextract |-- ziextract
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -264,8 +264,8 @@ Has 70 line(s). Calls functions:
.zinit-get-cygwin-package .zinit-get-cygwin-package
|-- .zinit-download-file-stdout |-- .zinit-download-file-stdout
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -285,7 +285,7 @@ ____
Has 52 line(s). Calls functions: Has 52 line(s). Calls functions:
.zinit-get-latest-gh-r-url-part .zinit-get-latest-gh-r-url-part
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -300,15 +300,15 @@ Has 195 line(s). Calls functions:
.zinit-get-package .zinit-get-package
|-- .zinit-download-file-stdout |-- .zinit-download-file-stdout
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-jq-check |-- .zinit-jq-check
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-json-to-array |-- .zinit-json-to-array
|   `-- .zinit-jq-check |   `-- .zinit-jq-check
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- ziextract |-- ziextract
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/@zinit-substitute `-- zinit.zsh/@zinit-substitute
Uses feature(s): _eval_, _setopt_, _trap_ Uses feature(s): _eval_, _setopt_, _trap_
@ -355,11 +355,11 @@ Has 62 line(s). Calls functions:
|-- .zinit-compinit |-- .zinit-compinit
|   |-- .zinit-forget-completion |   |-- .zinit-forget-completion
|   |-- compinit |   |-- compinit
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-forget-completion |-- .zinit-forget-completion
|-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|-- zinit-side.zsh/.zinit-exists-physically-message |-- zinit-side.zsh/.zinit-exists-physically-message
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/.zinit-any-to-user-plugin `-- zinit.zsh/.zinit-any-to-user-plugin
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -382,7 +382,7 @@ ____
Has 8 line(s). Calls functions: Has 8 line(s). Calls functions:
.zinit-jq-check .zinit-jq-check
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Called by: Called by:
@ -405,7 +405,7 @@ Has 4 line(s). Calls functions:
.zinit-json-get-value .zinit-json-get-value
`-- .zinit-jq-check `-- .zinit-jq-check
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -426,7 +426,7 @@ Has 13 line(s). Calls functions:
.zinit-json-to-array .zinit-json-to-array
`-- .zinit-jq-check `-- .zinit-jq-check
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _eval_, _setopt_ Uses feature(s): _eval_, _setopt_
@ -475,28 +475,28 @@ Has 214 line(s). Calls functions:
.zinit-setup-plugin-dir .zinit-setup-plugin-dir
|-- .zinit-download-file-stdout |-- .zinit-download-file-stdout
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-get-cygwin-package |-- .zinit-get-cygwin-package
|   |-- .zinit-download-file-stdout |   |-- .zinit-download-file-stdout
|   |   `-- zinit.zsh/+zinit-message |   |   `-- zinit.zsh/+zi-log
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-get-latest-gh-r-url-part |-- .zinit-get-latest-gh-r-url-part
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- .zinit-install-completions |-- .zinit-install-completions
|   |-- .zinit-compinit |   |-- .zinit-compinit
|   |   |-- .zinit-forget-completion |   |   |-- .zinit-forget-completion
|   |   |-- compinit |   |   |-- compinit
|   |   `-- zinit.zsh/+zinit-message |   |   `-- zinit.zsh/+zi-log
|   |-- .zinit-forget-completion |   |-- .zinit-forget-completion
|   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|   |-- zinit-side.zsh/.zinit-exists-physically-message |   |-- zinit-side.zsh/.zinit-exists-physically-message
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   `-- zinit.zsh/.zinit-any-to-user-plugin |   `-- zinit.zsh/.zinit-any-to-user-plugin
|-- ziextract |-- ziextract
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
|-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|-- zinit-side.zsh/.zinit-store-ices |-- zinit-side.zsh/.zinit-store-ices
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/.zinit-get-object-path `-- zinit.zsh/.zinit-get-object-path
Uses feature(s): _setopt_, _trap_ Uses feature(s): _setopt_, _trap_
@ -527,23 +527,23 @@ Has 76 line(s). Calls functions:
.zinit-update-snippet .zinit-update-snippet
|-- .zinit-download-snippet |-- .zinit-download-snippet
|   |-- .zinit-download-file-stdout |   |-- .zinit-download-file-stdout
|   |   `-- zinit.zsh/+zinit-message |   |   `-- zinit.zsh/+zi-log
|   |-- .zinit-get-url-mtime |   |-- .zinit-get-url-mtime
|   |-- .zinit-install-completions |   |-- .zinit-install-completions
|   |   |-- .zinit-compinit |   |   |-- .zinit-compinit
|   |   |   |-- .zinit-forget-completion |   |   |   |-- .zinit-forget-completion
|   |   |   |-- compinit |   |   |   |-- compinit
|   |   |   `-- zinit.zsh/+zinit-message |   |   |   `-- zinit.zsh/+zi-log
|   |   |-- .zinit-forget-completion |   |   |-- .zinit-forget-completion
|   |   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2 |   |   |-- zinit-side.zsh/.zinit-any-colorify-as-uspl2
|   |   |-- zinit-side.zsh/.zinit-exists-physically-message |   |   |-- zinit-side.zsh/.zinit-exists-physically-message
|   |   |-- zinit.zsh/+zinit-message |   |   |-- zinit.zsh/+zi-log
|   |   `-- zinit.zsh/.zinit-any-to-user-plugin |   |   `-- zinit.zsh/.zinit-any-to-user-plugin
|   |-- .zinit-mirror-using-svn |   |-- .zinit-mirror-using-svn
|   |-- zinit-side.zsh/.zinit-store-ices |   |-- zinit-side.zsh/.zinit-store-ices
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   `-- zinit.zsh/is-at-least |   `-- zinit.zsh/is-at-least
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
|-- zinit.zsh/.zinit-get-object-path |-- zinit.zsh/.zinit-get-object-path
`-- zinit.zsh/.zinit-pack-ice `-- zinit.zsh/.zinit-pack-ice
@ -580,7 +580,7 @@ ____
Has 283 line(s). Calls functions: Has 283 line(s). Calls functions:
ziextract ziextract
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_, _unfunction_, _zparseopts_ Uses feature(s): _setopt_, _unfunction_, _zparseopts_
@ -606,7 +606,7 @@ Has 1 line(s). Calls functions:
zpextract zpextract
`-- ziextract `-- ziextract
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -656,7 +656,7 @@ Has 19 line(s). Calls functions:
`-- .zinit-compile-plugin `-- .zinit-compile-plugin
|-- zinit-side.zsh/.zinit-compute-ice |-- zinit-side.zsh/.zinit-compute-ice
|-- zinit-side.zsh/.zinit-first |-- zinit-side.zsh/.zinit-first
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -746,8 +746,8 @@ Has 10 line(s). Calls functions:
∞zinit-extract-hook ∞zinit-extract-hook
|-- .zinit-extract |-- .zinit-extract
|   |-- ziextract |   |-- ziextract
|   |   `-- zinit.zsh/+zinit-message |   |   `-- zinit.zsh/+zi-log
|   `-- zinit.zsh/+zinit-message |   `-- zinit.zsh/+zi-log
`-- zinit.zsh/@zinit-substitute `-- zinit.zsh/@zinit-substitute
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -804,7 +804,7 @@ Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
Has 35 line(s). Calls functions: Has 35 line(s). Calls functions:
∞zinit-mv-hook ∞zinit-mv-hook
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
`-- zinit.zsh/@zinit-substitute `-- zinit.zsh/@zinit-substitute
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -816,7 +816,7 @@ Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
Has 18 line(s). Calls functions: Has 18 line(s). Calls functions:
∞zinit-ps-on-update-hook ∞zinit-ps-on-update-hook
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _eval_ Uses feature(s): _eval_
@ -827,7 +827,7 @@ Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
Has 79 line(s). Calls functions: Has 79 line(s). Calls functions:
∞zinit-reset-hook ∞zinit-reset-hook
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _eval_ Uses feature(s): _eval_

View file

@ -99,7 +99,7 @@ Has 110 line(s). Calls functions:
|   |   `-- zinit.zsh/.zinit-any-to-user-plugin |   |   `-- zinit.zsh/.zinit-any-to-user-plugin
|   |-- .zinit-exists-physically |   |-- .zinit-exists-physically
|   |   `-- zinit.zsh/.zinit-any-to-user-plugin |   |   `-- zinit.zsh/.zinit-any-to-user-plugin
|   |-- zinit.zsh/+zinit-message |   |-- zinit.zsh/+zi-log
|   |-- zinit.zsh/.zinit-any-to-pid |   |-- zinit.zsh/.zinit-any-to-pid
|   `-- zinit.zsh/.zinit-any-to-user-plugin |   `-- zinit.zsh/.zinit-any-to-user-plugin
|-- .zinit-two-paths |-- .zinit-two-paths
@ -136,7 +136,7 @@ ____
Has 20 line(s). Calls functions: Has 20 line(s). Calls functions:
.zinit-countdown .zinit-countdown
`-- zinit.zsh/+zinit-message `-- zinit.zsh/+zi-log
Uses feature(s): _trap_ Uses feature(s): _trap_
@ -192,7 +192,7 @@ Has 25 line(s). Calls functions:
|   `-- zinit.zsh/.zinit-any-to-user-plugin |   `-- zinit.zsh/.zinit-any-to-user-plugin
|-- .zinit-exists-physically |-- .zinit-exists-physically
|   `-- zinit.zsh/.zinit-any-to-user-plugin |   `-- zinit.zsh/.zinit-any-to-user-plugin
|-- zinit.zsh/+zinit-message |-- zinit.zsh/+zi-log
|-- zinit.zsh/.zinit-any-to-pid |-- zinit.zsh/.zinit-any-to-pid
`-- zinit.zsh/.zinit-any-to-user-plugin `-- zinit.zsh/.zinit-any-to-user-plugin

View file

@ -88,7 +88,7 @@ PRECMD-HOOK @zinit-scheduler
Has 244 line(s). Calls functions: Has 244 line(s). Calls functions:
Script-Body Script-Body
|-- +zinit-message |-- +zi-log
|-- .zinit-get-mtime-into |-- .zinit-get-mtime-into
|-- .zinit-prepare-home |-- .zinit-prepare-home
|   |-- zinit-autoload.zsh/.zinit-clear-completions |   |-- zinit-autoload.zsh/.zinit-clear-completions
@ -98,15 +98,15 @@ Has 244 line(s). Calls functions:
|-- colors |-- colors
|-- is-at-least |-- is-at-least
|-- zinit |-- zinit
|   |-- +zinit-message |   |-- +zi-log
|   |-- +zinit-prehelp-usage-message |   |-- +zinit-prehelp-usage-message
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-add-fpath |   |-- .zinit-add-fpath
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
|   |-- .zinit-compdef-clear |   |-- .zinit-compdef-clear
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-compdef-replay |   |-- .zinit-compdef-replay
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-get-object-path |   |-- .zinit-get-object-path
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
|   |-- .zinit-ice |   |-- .zinit-ice
@ -129,45 +129,45 @@ Has 244 line(s). Calls functions:
|   |   |   |   |-- .zinit-tmp-subst-off |   |   |   |   |-- .zinit-tmp-subst-off
|   |   |   |   |-- .zinit-tmp-subst-on |   |   |   |   |-- .zinit-tmp-subst-on
|   |   |   |   `-- :zinit-tmp-subst-autoload |   |   |   |   `-- :zinit-tmp-subst-autoload
|   |   |   |   |-- +zinit-message |   |   |   |   |-- +zi-log
|   |   |   |   |-- .zinit-add-report |   |   |   |   |-- .zinit-add-report
|   |   |   |   |-- .zinit-any-to-user-plugin |   |   |   |   |-- .zinit-any-to-user-plugin
|   |   |   |   `-- is-at-least |   |   |   |   `-- is-at-least
|   |   |   |-- .zinit-load-snippet |   |   |   |-- .zinit-load-snippet
|   |   |   |   |-- +zi-log
|   |   |   |   |-- +zinit-deploy-message |   |   |   |   |-- +zinit-deploy-message
|   |   |   |   |-- +zinit-message
|   |   |   |   |-- .zinit-add-report |   |   |   |   |-- .zinit-add-report
|   |   |   |   |-- .zinit-find-other-matches |   |   |   |   |-- .zinit-find-other-matches
|   |   |   |   |-- .zinit-get-object-path |   |   |   |   |-- .zinit-get-object-path
|   |   |   |   |   `-- .zinit-any-to-user-plugin |   |   |   |   |   `-- .zinit-any-to-user-plugin
|   |   |   |   |-- .zinit-pack-ice |   |   |   |   |-- .zinit-pack-ice
|   |   |   |   |-- .zinit-set-m-func |   |   |   |   |-- .zinit-set-m-func
|   |   |   |   |   `-- +zinit-message |   |   |   |   |   `-- +zi-log
|   |   |   |   |-- .zinit-setup-params |   |   |   |   |-- .zinit-setup-params
|   |   |   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |   |   |-- .zinit-pack-ice |   |   |   |-- .zinit-pack-ice
|   |   |   |-- .zinit-register-plugin |   |   |   |-- .zinit-register-plugin
|   |   |   |   `-- +zinit-message |   |   |   |   `-- +zi-log
|   |   |   |-- .zinit-set-m-func |   |   |   |-- .zinit-set-m-func
|   |   |   |   `-- +zinit-message |   |   |   |   `-- +zi-log
|   |   |   |-- .zinit-setup-params |   |   |   |-- .zinit-setup-params
|   |   |   |-- zinit-install.zsh/.zinit-get-package |   |   |   |-- zinit-install.zsh/.zinit-get-package
|   |   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir |   |   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir
|   |   `-- .zinit-load-snippet |   |   `-- .zinit-load-snippet
|   |   |-- +zi-log
|   |   |-- +zinit-deploy-message |   |   |-- +zinit-deploy-message
|   |   |-- +zinit-message
|   |   |-- .zinit-add-report |   |   |-- .zinit-add-report
|   |   |-- .zinit-find-other-matches |   |   |-- .zinit-find-other-matches
|   |   |-- .zinit-get-object-path |   |   |-- .zinit-get-object-path
|   |   |   `-- .zinit-any-to-user-plugin |   |   |   `-- .zinit-any-to-user-plugin
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |-- .zinit-parse-opts |   |-- .zinit-parse-opts
|   |-- .zinit-run |   |-- .zinit-run
|   |   |-- +zinit-message |   |   |-- +zi-log
|   |   |-- .zinit-any-to-user-plugin |   |   |-- .zinit-any-to-user-plugin
|   |   `-- .zinit-get-object-path |   |   `-- .zinit-get-object-path
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
@ -212,50 +212,6 @@ _Exports (environment):_ PMSPEC [big]*//* ZPFX [big]*//* ZSH_CACHE_DIR
==== +zi-log ==== +zi-log
____
Wrapper function for +zinit-message until migrated to +zi-log
____
Has 1 line(s). Calls functions:
+zi-log
`-- +zinit-message
Called by:
zinit-additional.zsh/.zinit-debug-clear
zinit-additional.zsh/.zinit-debug-report
zinit-additional.zsh/.zinit-debug-revert
zinit-additional.zsh/.zinit-debug-start
zinit-additional.zsh/.zinit-debug-status
zinit-additional.zsh/.zinit-debug-stop
zinit-additional.zsh/:zinit-tmp-subst-source
zinit-autoload.zsh/.zinit-list-plugins
zinit-autoload.zsh/.zinit-unload
==== +zinit-deploy-message
____
Deploys a sub-prompt message to be displayed OR a 'zle .reset-prompt'
call to be invoked
____
Has 13 line(s). Doesn't call other functions.
Uses feature(s): _read_, _zle_
Called by:
.zinit-load-snippet
.zinit-load
zinit-autoload.zsh/.zinit-recall
==== +zinit-message
____ ____
Logging function Logging function
@ -266,7 +222,7 @@ Has 16 line(s). Doesn't call other functions.
Called by: Called by:
+zi-log +zinit-message
+zinit-prehelp-usage-message +zinit-prehelp-usage-message
.zinit-compdef-clear .zinit-compdef-clear
.zinit-compdef-replay .zinit-compdef-replay
@ -277,14 +233,23 @@ Called by:
:zinit-tmp-subst-autoload :zinit-tmp-subst-autoload
Script-Body Script-Body
zinit zinit
zinit-additional.zsh/.zinit-debug-clear
zinit-additional.zsh/.zinit-debug-report
zinit-additional.zsh/.zinit-debug-revert
zinit-additional.zsh/.zinit-debug-start
zinit-additional.zsh/.zinit-debug-status
zinit-additional.zsh/.zinit-debug-stop
zinit-additional.zsh/:zinit-tmp-subst-source
zinit-autoload.zsh/.zinit-build-module zinit-autoload.zsh/.zinit-build-module
zinit-autoload.zsh/.zinit-cd zinit-autoload.zsh/.zinit-cd
zinit-autoload.zsh/.zinit-confirm zinit-autoload.zsh/.zinit-confirm
zinit-autoload.zsh/.zinit-delete zinit-autoload.zsh/.zinit-delete
zinit-autoload.zsh/.zinit-glance zinit-autoload.zsh/.zinit-glance
zinit-autoload.zsh/.zinit-list-plugins
zinit-autoload.zsh/.zinit-self-update zinit-autoload.zsh/.zinit-self-update
zinit-autoload.zsh/.zinit-show-zstatus zinit-autoload.zsh/.zinit-show-zstatus
zinit-autoload.zsh/.zinit-uninstall-completions zinit-autoload.zsh/.zinit-uninstall-completions
zinit-autoload.zsh/.zinit-unload
zinit-autoload.zsh/.zinit-update-all-parallel zinit-autoload.zsh/.zinit-update-all-parallel
zinit-autoload.zsh/.zinit-update-or-status-all zinit-autoload.zsh/.zinit-update-or-status-all
zinit-autoload.zsh/.zinit-update-or-status zinit-autoload.zsh/.zinit-update-or-status
@ -310,12 +275,46 @@ Called by:
zinit-side.zsh/.zinit-countdown zinit-side.zsh/.zinit-countdown
zinit-side.zsh/.zinit-exists-physically-message zinit-side.zsh/.zinit-exists-physically-message
==== +zinit-deploy-message
____
Deploys a sub-prompt message to be displayed OR a 'zle .reset-prompt'
call to be invoked
____
Has 13 line(s). Doesn't call other functions.
Uses feature(s): _read_, _zle_
Called by:
.zinit-load-snippet
.zinit-load
zinit-autoload.zsh/.zinit-recall
==== +zinit-message
____
Wrapper function to maintain backward compatibility
____
Has 1 line(s). Calls functions:
+zinit-message
`-- +zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
==== +zinit-prehelp-usage-message ==== +zinit-prehelp-usage-message
Has 38 line(s). Calls functions: Has 38 line(s). Calls functions:
+zinit-prehelp-usage-message +zinit-prehelp-usage-message
`-- +zinit-message `-- +zi-log
Called by: Called by:
@ -443,7 +442,7 @@ ____
Has 3 line(s). Calls functions: Has 3 line(s). Calls functions:
.zinit-compdef-clear .zinit-compdef-clear
`-- +zinit-message `-- +zi-log
Called by: Called by:
@ -462,7 +461,7 @@ ____
Has 17 line(s). Calls functions: Has 17 line(s). Calls functions:
.zinit-compdef-replay .zinit-compdef-replay
`-- +zinit-message `-- +zi-log
Uses feature(s): _compdef_ Uses feature(s): _compdef_
@ -726,27 +725,27 @@ Has 95 line(s). Calls functions:
|   |-- .zinit-tmp-subst-off |   |-- .zinit-tmp-subst-off
|   |-- .zinit-tmp-subst-on |   |-- .zinit-tmp-subst-on
|   `-- :zinit-tmp-subst-autoload |   `-- :zinit-tmp-subst-autoload
|   |-- +zinit-message |   |-- +zi-log
|   |-- .zinit-add-report |   |-- .zinit-add-report
|   |-- .zinit-any-to-user-plugin |   |-- .zinit-any-to-user-plugin
|   `-- is-at-least |   `-- is-at-least
|-- .zinit-load-snippet |-- .zinit-load-snippet
|   |-- +zi-log
|   |-- +zinit-deploy-message |   |-- +zinit-deploy-message
|   |-- +zinit-message
|   |-- .zinit-add-report |   |-- .zinit-add-report
|   |-- .zinit-find-other-matches |   |-- .zinit-find-other-matches
|   |-- .zinit-get-object-path |   |-- .zinit-get-object-path
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
|   |-- .zinit-pack-ice |   |-- .zinit-pack-ice
|   |-- .zinit-set-m-func |   |-- .zinit-set-m-func
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-setup-params |   |-- .zinit-setup-params
|   `-- zinit-install.zsh/.zinit-download-snippet |   `-- zinit-install.zsh/.zinit-download-snippet
|-- .zinit-pack-ice |-- .zinit-pack-ice
|-- .zinit-register-plugin |-- .zinit-register-plugin
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-set-m-func |-- .zinit-set-m-func
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-setup-params |-- .zinit-setup-params
|-- zinit-install.zsh/.zinit-get-package |-- zinit-install.zsh/.zinit-get-package
`-- zinit-install.zsh/.zinit-setup-plugin-dir `-- zinit-install.zsh/.zinit-setup-plugin-dir
@ -791,40 +790,40 @@ Has 12 line(s). Calls functions:
|   |   |-- .zinit-tmp-subst-off |   |   |-- .zinit-tmp-subst-off
|   |   |-- .zinit-tmp-subst-on |   |   |-- .zinit-tmp-subst-on
|   |   `-- :zinit-tmp-subst-autoload |   |   `-- :zinit-tmp-subst-autoload
|   |   |-- +zinit-message |   |   |-- +zi-log
|   |   |-- .zinit-add-report |   |   |-- .zinit-add-report
|   |   |-- .zinit-any-to-user-plugin |   |   |-- .zinit-any-to-user-plugin
|   |   `-- is-at-least |   |   `-- is-at-least
|   |-- .zinit-load-snippet |   |-- .zinit-load-snippet
|   |   |-- +zi-log
|   |   |-- +zinit-deploy-message |   |   |-- +zinit-deploy-message
|   |   |-- +zinit-message
|   |   |-- .zinit-add-report |   |   |-- .zinit-add-report
|   |   |-- .zinit-find-other-matches |   |   |-- .zinit-find-other-matches
|   |   |-- .zinit-get-object-path |   |   |-- .zinit-get-object-path
|   |   |   `-- .zinit-any-to-user-plugin |   |   |   `-- .zinit-any-to-user-plugin
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |-- .zinit-pack-ice |   |-- .zinit-pack-ice
|   |-- .zinit-register-plugin |   |-- .zinit-register-plugin
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-set-m-func |   |-- .zinit-set-m-func
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-setup-params |   |-- .zinit-setup-params
|   |-- zinit-install.zsh/.zinit-get-package |   |-- zinit-install.zsh/.zinit-get-package
|   `-- zinit-install.zsh/.zinit-setup-plugin-dir |   `-- zinit-install.zsh/.zinit-setup-plugin-dir
`-- .zinit-load-snippet `-- .zinit-load-snippet
|-- +zi-log
|-- +zinit-deploy-message |-- +zinit-deploy-message
|-- +zinit-message
|-- .zinit-add-report |-- .zinit-add-report
|-- .zinit-find-other-matches |-- .zinit-find-other-matches
|-- .zinit-get-object-path |-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-pack-ice |-- .zinit-pack-ice
|-- .zinit-set-m-func |-- .zinit-set-m-func
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-setup-params |-- .zinit-setup-params
`-- zinit-install.zsh/.zinit-download-snippet `-- zinit-install.zsh/.zinit-download-snippet
@ -858,7 +857,7 @@ Has 128 line(s). Calls functions:
|-- .zinit-tmp-subst-off |-- .zinit-tmp-subst-off
|-- .zinit-tmp-subst-on |-- .zinit-tmp-subst-on
`-- :zinit-tmp-subst-autoload `-- :zinit-tmp-subst-autoload
|-- +zinit-message |-- +zi-log
|-- .zinit-add-report |-- .zinit-add-report
|-- .zinit-any-to-user-plugin |-- .zinit-any-to-user-plugin
`-- is-at-least `-- is-at-least
@ -882,15 +881,15 @@ ____
Has 203 line(s). Calls functions: Has 203 line(s). Calls functions:
.zinit-load-snippet .zinit-load-snippet
|-- +zi-log
|-- +zinit-deploy-message |-- +zinit-deploy-message
|-- +zinit-message
|-- .zinit-add-report |-- .zinit-add-report
|-- .zinit-find-other-matches |-- .zinit-find-other-matches
|-- .zinit-get-object-path |-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-pack-ice |-- .zinit-pack-ice
|-- .zinit-set-m-func |-- .zinit-set-m-func
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-setup-params |-- .zinit-setup-params
`-- zinit-install.zsh/.zinit-download-snippet `-- zinit-install.zsh/.zinit-download-snippet
@ -973,7 +972,7 @@ ____
Has 23 line(s). Calls functions: Has 23 line(s). Calls functions:
.zinit-register-plugin .zinit-register-plugin
`-- +zinit-message `-- +zi-log
Called by: Called by:
@ -991,7 +990,7 @@ ____
Has 24 line(s). Calls functions: Has 24 line(s). Calls functions:
.zinit-run .zinit-run
|-- +zinit-message |-- +zi-log
|-- .zinit-any-to-user-plugin |-- .zinit-any-to-user-plugin
`-- .zinit-get-object-path `-- .zinit-get-object-path
`-- .zinit-any-to-user-plugin `-- .zinit-any-to-user-plugin
@ -1038,40 +1037,40 @@ Has 47 line(s). Calls functions:
|   |   |-- .zinit-tmp-subst-off |   |   |-- .zinit-tmp-subst-off
|   |   |-- .zinit-tmp-subst-on |   |   |-- .zinit-tmp-subst-on
|   |   `-- :zinit-tmp-subst-autoload |   |   `-- :zinit-tmp-subst-autoload
|   |   |-- +zinit-message |   |   |-- +zi-log
|   |   |-- .zinit-add-report |   |   |-- .zinit-add-report
|   |   |-- .zinit-any-to-user-plugin |   |   |-- .zinit-any-to-user-plugin
|   |   `-- is-at-least |   |   `-- is-at-least
|   |-- .zinit-load-snippet |   |-- .zinit-load-snippet
|   |   |-- +zi-log
|   |   |-- +zinit-deploy-message |   |   |-- +zinit-deploy-message
|   |   |-- +zinit-message
|   |   |-- .zinit-add-report |   |   |-- .zinit-add-report
|   |   |-- .zinit-find-other-matches |   |   |-- .zinit-find-other-matches
|   |   |-- .zinit-get-object-path |   |   |-- .zinit-get-object-path
|   |   |   `-- .zinit-any-to-user-plugin |   |   |   `-- .zinit-any-to-user-plugin
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |-- .zinit-pack-ice |   |-- .zinit-pack-ice
|   |-- .zinit-register-plugin |   |-- .zinit-register-plugin
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-set-m-func |   |-- .zinit-set-m-func
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-setup-params |   |-- .zinit-setup-params
|   |-- zinit-install.zsh/.zinit-get-package |   |-- zinit-install.zsh/.zinit-get-package
|   `-- zinit-install.zsh/.zinit-setup-plugin-dir |   `-- zinit-install.zsh/.zinit-setup-plugin-dir
|-- .zinit-load-snippet |-- .zinit-load-snippet
|   |-- +zi-log
|   |-- +zinit-deploy-message |   |-- +zinit-deploy-message
|   |-- +zinit-message
|   |-- .zinit-add-report |   |-- .zinit-add-report
|   |-- .zinit-find-other-matches |   |-- .zinit-find-other-matches
|   |-- .zinit-get-object-path |   |-- .zinit-get-object-path
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
|   |-- .zinit-pack-ice |   |-- .zinit-pack-ice
|   |-- .zinit-set-m-func |   |-- .zinit-set-m-func
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-setup-params |   |-- .zinit-setup-params
|   `-- zinit-install.zsh/.zinit-download-snippet |   `-- zinit-install.zsh/.zinit-download-snippet
`-- zinit-autoload.zsh/.zinit-unload `-- zinit-autoload.zsh/.zinit-unload
@ -1094,7 +1093,7 @@ ____
Has 17 line(s). Calls functions: Has 17 line(s). Calls functions:
.zinit-set-m-func .zinit-set-m-func
`-- +zinit-message `-- +zi-log
Uses feature(s): _setopt_ Uses feature(s): _setopt_
@ -1242,7 +1241,7 @@ ____
Has 111 line(s). Calls functions: Has 111 line(s). Calls functions:
:zinit-tmp-subst-autoload :zinit-tmp-subst-autoload
|-- +zinit-message |-- +zi-log
|-- .zinit-add-report |-- .zinit-add-report
|-- .zinit-any-to-user-plugin |-- .zinit-any-to-user-plugin
`-- is-at-least `-- is-at-least
@ -1337,7 +1336,7 @@ Has 4 line(s). Calls functions:
@autoload @autoload
`-- :zinit-tmp-subst-autoload `-- :zinit-tmp-subst-autoload
|-- +zinit-message |-- +zi-log
|-- .zinit-add-report |-- .zinit-add-report
|-- .zinit-any-to-user-plugin |-- .zinit-any-to-user-plugin
`-- is-at-least `-- is-at-least
@ -1414,40 +1413,40 @@ Has 75 line(s). *Is a precmd hook*. Calls functions:
|   |   |   |-- .zinit-tmp-subst-off |   |   |   |-- .zinit-tmp-subst-off
|   |   |   |-- .zinit-tmp-subst-on |   |   |   |-- .zinit-tmp-subst-on
|   |   |   `-- :zinit-tmp-subst-autoload |   |   |   `-- :zinit-tmp-subst-autoload
|   |   |   |-- +zinit-message |   |   |   |-- +zi-log
|   |   |   |-- .zinit-add-report |   |   |   |-- .zinit-add-report
|   |   |   |-- .zinit-any-to-user-plugin |   |   |   |-- .zinit-any-to-user-plugin
|   |   |   `-- is-at-least |   |   |   `-- is-at-least
|   |   |-- .zinit-load-snippet |   |   |-- .zinit-load-snippet
|   |   |   |-- +zi-log
|   |   |   |-- +zinit-deploy-message |   |   |   |-- +zinit-deploy-message
|   |   |   |-- +zinit-message
|   |   |   |-- .zinit-add-report |   |   |   |-- .zinit-add-report
|   |   |   |-- .zinit-find-other-matches |   |   |   |-- .zinit-find-other-matches
|   |   |   |-- .zinit-get-object-path |   |   |   |-- .zinit-get-object-path
|   |   |   |   `-- .zinit-any-to-user-plugin |   |   |   |   `-- .zinit-any-to-user-plugin
|   |   |   |-- .zinit-pack-ice |   |   |   |-- .zinit-pack-ice
|   |   |   |-- .zinit-set-m-func |   |   |   |-- .zinit-set-m-func
|   |   |   |   `-- +zinit-message |   |   |   |   `-- +zi-log
|   |   |   |-- .zinit-setup-params |   |   |   |-- .zinit-setup-params
|   |   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-register-plugin |   |   |-- .zinit-register-plugin
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   |-- zinit-install.zsh/.zinit-get-package |   |   |-- zinit-install.zsh/.zinit-get-package
|   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir |   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir
|   |-- .zinit-load-snippet |   |-- .zinit-load-snippet
|   |   |-- +zi-log
|   |   |-- +zinit-deploy-message |   |   |-- +zinit-deploy-message
|   |   |-- +zinit-message
|   |   |-- .zinit-add-report |   |   |-- .zinit-add-report
|   |   |-- .zinit-find-other-matches |   |   |-- .zinit-find-other-matches
|   |   |-- .zinit-get-object-path |   |   |-- .zinit-get-object-path
|   |   |   `-- .zinit-any-to-user-plugin |   |   |   `-- .zinit-any-to-user-plugin
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   `-- zinit-autoload.zsh/.zinit-unload |   `-- zinit-autoload.zsh/.zinit-unload
@ -1512,15 +1511,15 @@ Has 15 line(s). Calls functions:
pmodload pmodload
`-- .zinit-load-snippet `-- .zinit-load-snippet
|-- +zi-log
|-- +zinit-deploy-message |-- +zinit-deploy-message
|-- +zinit-message
|-- .zinit-add-report |-- .zinit-add-report
|-- .zinit-find-other-matches |-- .zinit-find-other-matches
|-- .zinit-get-object-path |-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-pack-ice |-- .zinit-pack-ice
|-- .zinit-set-m-func |-- .zinit-set-m-func
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-setup-params |-- .zinit-setup-params
`-- zinit-install.zsh/.zinit-download-snippet `-- zinit-install.zsh/.zinit-download-snippet
@ -1541,7 +1540,7 @@ Has 1 line(s). Calls functions:
zicdclear zicdclear
`-- .zinit-compdef-clear `-- .zinit-compdef-clear
`-- +zinit-message `-- +zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -1558,7 +1557,7 @@ Has 1 line(s). Calls functions:
zicdreplay zicdreplay
`-- .zinit-compdef-replay `-- .zinit-compdef-replay
`-- +zinit-message `-- +zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -1606,15 +1605,15 @@ ____
Has 553 line(s). Calls functions: Has 553 line(s). Calls functions:
zinit zinit
|-- +zinit-message |-- +zi-log
|-- +zinit-prehelp-usage-message |-- +zinit-prehelp-usage-message
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-add-fpath |-- .zinit-add-fpath
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-compdef-clear |-- .zinit-compdef-clear
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-compdef-replay |-- .zinit-compdef-replay
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-get-object-path |-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-ice |-- .zinit-ice
@ -1637,45 +1636,45 @@ Has 553 line(s). Calls functions:
|   |   |   |-- .zinit-tmp-subst-off |   |   |   |-- .zinit-tmp-subst-off
|   |   |   |-- .zinit-tmp-subst-on |   |   |   |-- .zinit-tmp-subst-on
|   |   |   `-- :zinit-tmp-subst-autoload |   |   |   `-- :zinit-tmp-subst-autoload
|   |   |   |-- +zinit-message |   |   |   |-- +zi-log
|   |   |   |-- .zinit-add-report |   |   |   |-- .zinit-add-report
|   |   |   |-- .zinit-any-to-user-plugin |   |   |   |-- .zinit-any-to-user-plugin
|   |   |   `-- is-at-least |   |   |   `-- is-at-least
|   |   |-- .zinit-load-snippet |   |   |-- .zinit-load-snippet
|   |   |   |-- +zi-log
|   |   |   |-- +zinit-deploy-message |   |   |   |-- +zinit-deploy-message
|   |   |   |-- +zinit-message
|   |   |   |-- .zinit-add-report |   |   |   |-- .zinit-add-report
|   |   |   |-- .zinit-find-other-matches |   |   |   |-- .zinit-find-other-matches
|   |   |   |-- .zinit-get-object-path |   |   |   |-- .zinit-get-object-path
|   |   |   |   `-- .zinit-any-to-user-plugin |   |   |   |   `-- .zinit-any-to-user-plugin
|   |   |   |-- .zinit-pack-ice |   |   |   |-- .zinit-pack-ice
|   |   |   |-- .zinit-set-m-func |   |   |   |-- .zinit-set-m-func
|   |   |   |   `-- +zinit-message |   |   |   |   `-- +zi-log
|   |   |   |-- .zinit-setup-params |   |   |   |-- .zinit-setup-params
|   |   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-register-plugin |   |   |-- .zinit-register-plugin
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   |-- zinit-install.zsh/.zinit-get-package |   |   |-- zinit-install.zsh/.zinit-get-package
|   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir |   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir
|   `-- .zinit-load-snippet |   `-- .zinit-load-snippet
|   |-- +zi-log
|   |-- +zinit-deploy-message |   |-- +zinit-deploy-message
|   |-- +zinit-message
|   |-- .zinit-add-report |   |-- .zinit-add-report
|   |-- .zinit-find-other-matches |   |-- .zinit-find-other-matches
|   |-- .zinit-get-object-path |   |-- .zinit-get-object-path
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
|   |-- .zinit-pack-ice |   |-- .zinit-pack-ice
|   |-- .zinit-set-m-func |   |-- .zinit-set-m-func
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-setup-params |   |-- .zinit-setup-params
|   `-- zinit-install.zsh/.zinit-download-snippet |   `-- zinit-install.zsh/.zinit-download-snippet
|-- .zinit-parse-opts |-- .zinit-parse-opts
|-- .zinit-run |-- .zinit-run
|   |-- +zinit-message |   |-- +zi-log
|   |-- .zinit-any-to-user-plugin |   |-- .zinit-any-to-user-plugin
|   `-- .zinit-get-object-path |   `-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
@ -1727,7 +1726,7 @@ Has 1 line(s). Calls functions:
zpcdclear zpcdclear
`-- .zinit-compdef-clear `-- .zinit-compdef-clear
`-- +zinit-message `-- +zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -1737,7 +1736,7 @@ Has 1 line(s). Calls functions:
zpcdreplay zpcdreplay
`-- .zinit-compdef-replay `-- .zinit-compdef-replay
`-- +zinit-message `-- +zi-log
Not called by script or any function (may be e.g. a hook, a Zle widget, etc.). Not called by script or any function (may be e.g. a hook, a Zle widget, etc.).
@ -1764,15 +1763,15 @@ Has 1 line(s). Calls functions:
zplugin zplugin
`-- zinit `-- zinit
|-- +zinit-message |-- +zi-log
|-- +zinit-prehelp-usage-message |-- +zinit-prehelp-usage-message
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-add-fpath |-- .zinit-add-fpath
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-compdef-clear |-- .zinit-compdef-clear
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-compdef-replay |-- .zinit-compdef-replay
|   `-- +zinit-message |   `-- +zi-log
|-- .zinit-get-object-path |-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin
|-- .zinit-ice |-- .zinit-ice
@ -1795,45 +1794,45 @@ Has 1 line(s). Calls functions:
|   |   |   |-- .zinit-tmp-subst-off |   |   |   |-- .zinit-tmp-subst-off
|   |   |   |-- .zinit-tmp-subst-on |   |   |   |-- .zinit-tmp-subst-on
|   |   |   `-- :zinit-tmp-subst-autoload |   |   |   `-- :zinit-tmp-subst-autoload
|   |   |   |-- +zinit-message |   |   |   |-- +zi-log
|   |   |   |-- .zinit-add-report |   |   |   |-- .zinit-add-report
|   |   |   |-- .zinit-any-to-user-plugin |   |   |   |-- .zinit-any-to-user-plugin
|   |   |   `-- is-at-least |   |   |   `-- is-at-least
|   |   |-- .zinit-load-snippet |   |   |-- .zinit-load-snippet
|   |   |   |-- +zi-log
|   |   |   |-- +zinit-deploy-message |   |   |   |-- +zinit-deploy-message
|   |   |   |-- +zinit-message
|   |   |   |-- .zinit-add-report |   |   |   |-- .zinit-add-report
|   |   |   |-- .zinit-find-other-matches |   |   |   |-- .zinit-find-other-matches
|   |   |   |-- .zinit-get-object-path |   |   |   |-- .zinit-get-object-path
|   |   |   |   `-- .zinit-any-to-user-plugin |   |   |   |   `-- .zinit-any-to-user-plugin
|   |   |   |-- .zinit-pack-ice |   |   |   |-- .zinit-pack-ice
|   |   |   |-- .zinit-set-m-func |   |   |   |-- .zinit-set-m-func
|   |   |   |   `-- +zinit-message |   |   |   |   `-- +zi-log
|   |   |   |-- .zinit-setup-params |   |   |   |-- .zinit-setup-params
|   |   |   `-- zinit-install.zsh/.zinit-download-snippet |   |   |   `-- zinit-install.zsh/.zinit-download-snippet
|   |   |-- .zinit-pack-ice |   |   |-- .zinit-pack-ice
|   |   |-- .zinit-register-plugin |   |   |-- .zinit-register-plugin
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-set-m-func |   |   |-- .zinit-set-m-func
|   |   |   `-- +zinit-message |   |   |   `-- +zi-log
|   |   |-- .zinit-setup-params |   |   |-- .zinit-setup-params
|   |   |-- zinit-install.zsh/.zinit-get-package |   |   |-- zinit-install.zsh/.zinit-get-package
|   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir |   |   `-- zinit-install.zsh/.zinit-setup-plugin-dir
|   `-- .zinit-load-snippet |   `-- .zinit-load-snippet
|   |-- +zi-log
|   |-- +zinit-deploy-message |   |-- +zinit-deploy-message
|   |-- +zinit-message
|   |-- .zinit-add-report |   |-- .zinit-add-report
|   |-- .zinit-find-other-matches |   |-- .zinit-find-other-matches
|   |-- .zinit-get-object-path |   |-- .zinit-get-object-path
|   |   `-- .zinit-any-to-user-plugin |   |   `-- .zinit-any-to-user-plugin
|   |-- .zinit-pack-ice |   |-- .zinit-pack-ice
|   |-- .zinit-set-m-func |   |-- .zinit-set-m-func
|   |   `-- +zinit-message |   |   `-- +zi-log
|   |-- .zinit-setup-params |   |-- .zinit-setup-params
|   `-- zinit-install.zsh/.zinit-download-snippet |   `-- zinit-install.zsh/.zinit-download-snippet
|-- .zinit-parse-opts |-- .zinit-parse-opts
|-- .zinit-run |-- .zinit-run
|   |-- +zinit-message |   |-- +zi-log
|   |-- .zinit-any-to-user-plugin |   |-- .zinit-any-to-user-plugin
|   `-- .zinit-get-object-path |   `-- .zinit-get-object-path
|   `-- .zinit-any-to-user-plugin |   `-- .zinit-any-to-user-plugin

View file

@ -668,17 +668,17 @@ ZINIT[EXTENDED_GLOB]=""
fi fi
if (( action )); then if (( action )); then
+zinit-message "{info}Uninstalling completion \`{file}$cfile{info}'{…}{rst}" +zi-log "{info}Uninstalling completion \`{file}$cfile{info}'{…}{rst}"
# Make compinit notice the change # Make compinit notice the change
.zinit-forget-completion "$cfile" .zinit-forget-completion "$cfile"
(( global_action ++ )) (( global_action ++ ))
else else
+zinit-message "{info}Completion \`{file}$cfile{info}' not installed.{rst}" +zi-log "{info}Completion \`{file}$cfile{info}' not installed.{rst}"
fi fi
done done
if (( global_action > 0 )); then if (( global_action > 0 )); then
+zinit-message "{info}Uninstalled {num}$global_action{info} completions.{rst}" +zi-log "{info}Uninstalled {num}$global_action{info} completions.{rst}"
fi fi
.zinit-compinit >/dev/null .zinit-compinit >/dev/null
@ -725,27 +725,27 @@ ZINIT[EXTENDED_GLOB]=""
} }
fi fi
( builtin cd -q "${ZINIT[MODULE_DIR]}" ( builtin cd -q "${ZINIT[MODULE_DIR]}"
+zinit-message "{pname}== Building module zdharma-continuum/zinit-module, running: make clean, then ./configure and then make =={rst}" +zi-log "{pname}== Building module zdharma-continuum/zinit-module, running: make clean, then ./configure and then make =={rst}"
+zinit-message "{pname}== The module sources are located at: "${ZINIT[MODULE_DIR]}" =={rst}" +zi-log "{pname}== The module sources are located at: "${ZINIT[MODULE_DIR]}" =={rst}"
if [[ -f Makefile ]] { if [[ -f Makefile ]] {
if [[ "$1" = "--clean" ]] { if [[ "$1" = "--clean" ]] {
noglob +zinit-message {p}-- make distclean --{rst} noglob +zi-log {p}-- make distclean --{rst}
make distclean make distclean
((1)) ((1))
} else { } else {
noglob +zinit-message {p}-- make clean --{rst} noglob +zi-log {p}-- make clean --{rst}
make clean make clean
} }
} }
noglob +zinit-message {p}-- ./configure --{rst} noglob +zi-log {p}-- ./configure --{rst}
CPPFLAGS=-I/usr/local/include CFLAGS="-g -Wall -O3" LDFLAGS=-L/usr/local/lib ./configure --disable-gdbm --without-tcsetpgrp && { CPPFLAGS=-I/usr/local/include CFLAGS="-g -Wall -O3" LDFLAGS=-L/usr/local/lib ./configure --disable-gdbm --without-tcsetpgrp && {
noglob +zinit-message {p}-- make --{rst} noglob +zi-log {p}-- make --{rst}
if { make } { if { make } {
[[ -f Src/zdharma_continuum/zinit.so ]] && cp -vf Src/zdharma_continuum/zinit.{so,bundle} [[ -f Src/zdharma_continuum/zinit.so ]] && cp -vf Src/zdharma_continuum/zinit.{so,bundle}
noglob +zinit-message "{info}Module has been built correctly.{rst}" noglob +zi-log "{info}Module has been built correctly.{rst}"
.zinit-module info .zinit-module info
} else { } else {
noglob +zinit-message "{error}Module didn't build.{rst} " noglob +zi-log "{error}Module didn't build.{rst} "
.zinit-module info --link .zinit-module info --link
} }
} }
@ -798,12 +798,12 @@ ZINIT[EXTENDED_GLOB]=""
if [[ -e $REPLY ]]; then if [[ -e $REPLY ]]; then
builtin pushd $REPLY builtin pushd $REPLY
else else
+zinit-message "No such plugin or snippet" +zi-log "No such plugin or snippet"
return 1 return 1
fi fi
builtin print builtin print
} || { } || {
+zinit-message "No such plugin or snippet" +zi-log "No such plugin or snippet"
return 1 return 1
} }
} # ]]] } # ]]]
@ -1047,17 +1047,17 @@ ZINIT[EXTENDED_GLOB]=""
integer retval integer retval
if (( OPTS[opt_-y,--yes] )); then if (( OPTS[opt_-y,--yes] )); then
builtin eval "${2}"; retval=$? builtin eval "${2}"; retval=$?
(( OPTS[opt_-q,--quiet] )) || +zinit-message -lrP "{m} Action executed (exit code: {num}${retval}{rst})" (( OPTS[opt_-q,--quiet] )) || +zi-log -lrP "{m} Action executed (exit code: {num}${retval}{rst})"
else else
local choice prompt local choice prompt
builtin print -D -v prompt "$(+zinit-message '{i} Press [{opt}Y{rst}/{opt}y{rst}] to continue: {nl}')" builtin print -D -v prompt "$(+zi-log '{i} Press [{opt}Y{rst}/{opt}y{rst}] to continue: {nl}')"
+zinit-message "${1}" +zi-log "${1}"
if builtin read -qs "choice?${prompt}"; then if builtin read -qs "choice?${prompt}"; then
builtin eval "${2}"; retval=$? builtin eval "${2}"; retval=$?
+zinit-message "{m} Action executed (exit code: {num}${retval}{rst})" +zi-log "{m} Action executed (exit code: {num}${retval}{rst})"
return 0 return 0
else else
+zinit-message "{m} No action executed ('{opt}${choice}{rst}' not 'Y' or 'y')" +zi-log "{m} No action executed ('{opt}${choice}{rst}' not 'Y' or 'y')"
return 1 return 1
fi fi
fi fi
@ -1225,7 +1225,7 @@ EOF
return 0 return 0
} }
(( $#o_clean && $#o_all )) && { (( $#o_clean && $#o_all )) && {
+zinit-message "{e} Invalid usage: Options --all and --clean are mutually exclusive" +zi-log "{e} Invalid usage: Options --all and --clean are mutually exclusive"
return 1 return 1
} }
(( $#o_clean )) && { (( $#o_clean )) && {
@ -1245,8 +1245,8 @@ EOF
unld_plgns=(${(@)${unld_plgns[@]##$ZINIT[PLUGINS_DIR]/#}//---//}) unld_plgns=(${(@)${unld_plgns[@]##$ZINIT[PLUGINS_DIR]/#}//---//})
# delete unloaded snippets & plugins # delete unloaded snippets & plugins
(( $#del_list || $#unld_plgns )) && { (( $#del_list || $#unld_plgns )) && {
+zinit-message "{m} Deleting {num}${#unld_snips}{rst} unloaded snippets:" $unld_snips +zi-log "{m} Deleting {num}${#unld_snips}{rst} unloaded snippets:" $unld_snips
+zinit-message "{m} Deleting {num}${#unld_plgns}{rst} unloaded plugins:" $unld_plgns +zi-log "{m} Deleting {num}${#unld_plgns}{rst} unloaded plugins:" $unld_plgns
if (( $#o_yes )) || ( .zinit-prompt "delete ${#unld_snips} snippets and ${#unld_plgns} plugins?"); then if (( $#o_yes )) || ( .zinit-prompt "delete ${#unld_snips} snippets and ${#unld_plgns} plugins?"); then
for snip in $del_list $unld_plgns ; do for snip in $del_list $unld_plgns ; do
zinit delete --yes "$snip" zinit delete --yes "$snip"
@ -1255,7 +1255,7 @@ EOF
return _retval return _retval
fi fi
} || { } || {
+zinit-message "{m} No unloaded plugins or snippets to delete" +zi-log "{m} No unloaded plugins or snippets to delete"
return 0 return 0
} }
} }
@ -1268,13 +1268,13 @@ EOF
builtin unset "ZINIT[$f]" builtin unset "ZINIT[$f]"
done done
local rc=$? local rc=$?
+zinit-message "{m} Deleted all completed with return code {num}${rc}{rst}" +zi-log "{m} Deleted all completed with return code {num}${rc}{rst}"
return $rc return $rc
fi fi
return 1 return 1
fi fi
(( !$# )) && { (( !$# )) && {
+zinit-message "{e} Invalid usage: This command requires at least 1 plugin or snippet argument." +zi-log "{e} Invalid usage: This command requires at least 1 plugin or snippet argument."
return 0 return 0
} }
local i local i
@ -1284,7 +1284,7 @@ EOF
local the_id="${${i:#(%|/)*}}" filename is_snippet local_dir local the_id="${${i:#(%|/)*}}" filename is_snippet local_dir
.zinit-compute-ice "$the_id" "pack" ICE2 local_dir filename is_snippet || return 1 .zinit-compute-ice "$the_id" "pack" ICE2 local_dir filename is_snippet || return 1
if [[ "$local_dir" != /* ]]; then if [[ "$local_dir" != /* ]]; then
+zinit-message "{w} No available plugin or snippet with the name '$i'" +zi-log "{w} No available plugin or snippet with the name '$i'"
return 1 return 1
fi fi
ICE2[teleid]="${ICE2[teleid]:-${ICE2[id-as]}}" ICE2[teleid]="${ICE2[teleid]:-${ICE2[id-as]}}"
@ -1303,9 +1303,9 @@ EOF
command rm -rf -- ${(q)${${local_dir:#[/[:space:]]##}:-${TMPDIR:-${TMPDIR:-/tmp}}/abcYZX321}}(N) # delete files command rm -rf -- ${(q)${${local_dir:#[/[:space:]]##}:-${TMPDIR:-${TMPDIR:-/tmp}}/abcYZX321}}(N) # delete files
command rm -f -- $ZINIT[HOME_DIR]/**/*(-@N) # delete broken symlins command rm -f -- $ZINIT[HOME_DIR]/**/*(-@N) # delete broken symlins
builtin unset "ZINIT[STATES__${ICE2[id-as]}]" || builtin unset "ZINIT[STATES__${ICE2[teleid]}]" builtin unset "ZINIT[STATES__${ICE2[id-as]}]" || builtin unset "ZINIT[STATES__${ICE2[teleid]}]"
+zinit-message "{m} Uninstalled $i" +zi-log "{m} Uninstalled $i"
else else
+zinit-message "{w} No available plugin or snippet with the name '$i'" +zi-log "{w} No available plugin or snippet with the name '$i'"
return 1 return 1
fi fi
done done
@ -1374,7 +1374,7 @@ EOF
.zinit-exists-physically-message "$user" "$plugin" || return 1 .zinit-exists-physically-message "$user" "$plugin" || return 1
.zinit-first "$1" "$2" || { .zinit-first "$1" "$2" || {
+zinit-message '{log-err} No source file found, cannot glance' +zi-log '{log-err} No source file found, cannot glance'
return 1 return 1
} }
@ -1385,17 +1385,17 @@ EOF
{ {
if (( ${+commands[pygmentize]} )); then if (( ${+commands[pygmentize]} )); then
+zinit-message "{log-info} Inspecting via {cmd}pygmentize{rst}" +zi-log "{log-info} Inspecting via {cmd}pygmentize{rst}"
pygmentize -l 'bash' "$fname" pygmentize -l 'bash' "$fname"
elif (( ${+commands[highlight]} )); then elif (( ${+commands[highlight]} )); then
+zinit-message "{log-info} Inspecting via {cmd}highlight{rst}" +zi-log "{log-info} Inspecting via {cmd}highlight{rst}"
if (( has_256_colors )); then if (( has_256_colors )); then
highlight --force --output-format xterm256 --quiet --syntax sh "$fname" highlight --force --output-format xterm256 --quiet --syntax sh "$fname"
else else
highlight --force --output-format ansi --quiet --syntax sh "$fname" highlight --force --output-format ansi --quiet --syntax sh "$fname"
fi fi
elif (( ${+commands[source-highlight]} )); then elif (( ${+commands[source-highlight]} )); then
+zinit-message "{log-info} Inspecting via {cmd}source-highlight{rst}" +zi-log "{log-info} Inspecting via {cmd}source-highlight{rst}"
source-highlight -fesc --failsafe -s zsh -o STDOUT -i "$fname" source-highlight -fesc --failsafe -s zsh -o STDOUT -i "$fname"
else else
cat "$fname" cat "$fname"
@ -1786,7 +1786,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
builtin emulate -LR zsh ${=${options[xtrace]:#off}:+-o xtrace} builtin emulate -LR zsh ${=${options[xtrace]:#off}:+-o xtrace}
setopt extendedglob typesetsilent warncreateglobal setopt extendedglob typesetsilent warncreateglobal
[[ $1 = -q ]] && +zinit-message "{pre}[self-update]{info} updating zinit repository{msg2}" \ [[ $1 = -q ]] && +zi-log "{pre}[self-update]{info} updating zinit repository{msg2}" \
local nl=$'\n' escape=$'\x1b[' local nl=$'\n' escape=$'\x1b['
local current_branch=$(git -C $ZINIT[BIN_DIR] rev-parse --abbrev-ref HEAD) local current_branch=$(git -C $ZINIT[BIN_DIR] rev-parse --abbrev-ref HEAD)
@ -1794,7 +1794,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
local -a lines local -a lines
( (
builtin cd -q "$ZINIT[BIN_DIR]" \ builtin cd -q "$ZINIT[BIN_DIR]" \
&& +zinit-message -n "{pre}[self-update]{info} fetching latest changes from {obj}$current_branch{info} branch$nl{rst}" \ && +zi-log -n "{pre}[self-update]{info} fetching latest changes from {obj}$current_branch{info} branch$nl{rst}" \
&& command git fetch --quiet \ && command git fetch --quiet \
&& lines=( ${(f)"$(command git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset || %b' ..origin/HEAD)"} ) && lines=( ${(f)"$(command git log --color --date=short --pretty=format:'%Cgreen%cd %h %Creset%s %Cred%d%Creset || %b' ..origin/HEAD)"} )
if (( ${#lines} > 0 )); then if (( ${#lines} > 0 )); then
@ -1819,16 +1819,16 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
} }
) )
if [[ $1 != -q ]] { if [[ $1 != -q ]] {
+zinit-message "{pre}[self-update]{info} compiling zinit via {obj}zcompile{rst}" +zi-log "{pre}[self-update]{info} compiling zinit via {obj}zcompile{rst}"
} }
command rm -f $ZINIT[BIN_DIR]/*.zwc(DN) command rm -f $ZINIT[BIN_DIR]/*.zwc(DN)
zcompile -U $ZINIT[BIN_DIR]/zinit.zsh zcompile -U $ZINIT[BIN_DIR]/zinit.zsh
zcompile -U $ZINIT[BIN_DIR]/zinit-{'side','install','autoload','additional'}.zsh zcompile -U $ZINIT[BIN_DIR]/zinit-{'side','install','autoload','additional'}.zsh
zcompile -U $ZINIT[BIN_DIR]/share/git-process-output.zsh zcompile -U $ZINIT[BIN_DIR]/share/git-process-output.zsh
# Load for the current session # Load for the current session
[[ $1 != -q ]] && +zinit-message "{pre}[self-update]{info} reloading zinit for the current session{rst}" [[ $1 != -q ]] && +zi-log "{pre}[self-update]{info} reloading zinit for the current session{rst}"
# +zinit-message "{pre}[self-update]{info} resetting zinit repository via{rst}: {cmd}${ICE[reset]:-git reset --hard HEAD}{rst}" # +zi-log "{pre}[self-update]{info} resetting zinit repository via{rst}: {cmd}${ICE[reset]:-git reset --hard HEAD}{rst}"
source $ZINIT[BIN_DIR]/zinit.zsh source $ZINIT[BIN_DIR]/zinit.zsh
zcompile -U $ZINIT[BIN_DIR]/zinit-{'side','install','autoload'}.zsh zcompile -U $ZINIT[BIN_DIR]/zinit-{'side','install','autoload'}.zsh
# Read and remember the new modification timestamps # Read and remember the new modification timestamps
@ -2125,13 +2125,13 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
local infoc="${ZINIT[col-info2]}" local infoc="${ZINIT[col-info2]}"
+zinit-message "Zinit's main directory: {file}${ZINIT[HOME_DIR]}{rst}" +zi-log "Zinit's main directory: {file}${ZINIT[HOME_DIR]}{rst}"
+zinit-message "Zinit's binary directory: {file}${ZINIT[BIN_DIR]}{rst}" +zi-log "Zinit's binary directory: {file}${ZINIT[BIN_DIR]}{rst}"
+zinit-message "Plugin directory: {file}${ZINIT[PLUGINS_DIR]}{rst}" +zi-log "Plugin directory: {file}${ZINIT[PLUGINS_DIR]}{rst}"
+zinit-message "Completions directory: {file}${ZINIT[COMPLETIONS_DIR]}{rst}" +zi-log "Completions directory: {file}${ZINIT[COMPLETIONS_DIR]}{rst}"
# Without _zlocal/zinit # Without _zlocal/zinit
+zinit-message "Loaded plugins: {num}$(( ${#ZINIT_REGISTERED_PLUGINS[@]} - 1 )){rst}" +zi-log "Loaded plugins: {num}$(( ${#ZINIT_REGISTERED_PLUGINS[@]} - 1 )){rst}"
# Count light-loaded plugins # Count light-loaded plugins
integer light=0 integer light=0
@ -2140,32 +2140,32 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
[[ "$s" = 1 ]] && (( light ++ )) [[ "$s" = 1 ]] && (( light ++ ))
done done
# Without _zlocal/zinit # Without _zlocal/zinit
+zinit-message "Light loaded: {num}$(( light - 1 )){rst}" +zi-log "Light loaded: {num}$(( light - 1 )){rst}"
# Downloaded plugins, without _zlocal/zinit, custom # Downloaded plugins, without _zlocal/zinit, custom
typeset -a plugins typeset -a plugins
plugins=( "${ZINIT[PLUGINS_DIR]}"/*(DN) ) plugins=( "${ZINIT[PLUGINS_DIR]}"/*(DN) )
+zinit-message "Downloaded plugins: {num}$(( ${#plugins} - 1 )){rst}" +zi-log "Downloaded plugins: {num}$(( ${#plugins} - 1 )){rst}"
# Number of enabled completions, with _zlocal/zinit # Number of enabled completions, with _zlocal/zinit
typeset -a completions typeset -a completions
completions=( "${ZINIT[COMPLETIONS_DIR]}"/_[^_.]*~*.zwc(DN) ) completions=( "${ZINIT[COMPLETIONS_DIR]}"/_[^_.]*~*.zwc(DN) )
+zinit-message "Enabled completions: {num}${#completions[@]}{rst}" +zi-log "Enabled completions: {num}${#completions[@]}{rst}"
# Number of disabled completions, with _zlocal/zinit # Number of disabled completions, with _zlocal/zinit
completions=( "${ZINIT[COMPLETIONS_DIR]}"/[^_.]*~*.zwc(DN) ) completions=( "${ZINIT[COMPLETIONS_DIR]}"/[^_.]*~*.zwc(DN) )
+zinit-message "Disabled completions: {num}${#completions[@]}{rst}" +zi-log "Disabled completions: {num}${#completions[@]}{rst}"
# Number of completions existing in all plugins # Number of completions existing in all plugins
completions=( "${ZINIT[PLUGINS_DIR]}"/*/**/_[^_.]*~*(*.zwc|*.html|*.txt|*.png|*.jpg|*.jpeg|*.js|*.md|*.yml|*.ri|_zsh_highlight*|/zsdoc/*|*.ps1)(DN) ) completions=( "${ZINIT[PLUGINS_DIR]}"/*/**/_[^_.]*~*(*.zwc|*.html|*.txt|*.png|*.jpg|*.jpeg|*.js|*.md|*.yml|*.ri|_zsh_highlight*|/zsdoc/*|*.ps1)(DN) )
+zinit-message "Completions available overall: {num}${#completions[@]}{rst}" +zi-log "Completions available overall: {num}${#completions[@]}{rst}"
# Enumerate snippets loaded # Enumerate snippets loaded
# }, ${infoc}{rst}", j:, :, {msg}"$'\e[0m, +zinit-message h # }, ${infoc}{rst}", j:, :, {msg}"$'\e[0m, +zi-log h
+zinit-message -n "Snippets loaded: " +zi-log -n "Snippets loaded: "
local sni local sni
for sni in ${(onv)ZINIT_SNIPPETS[@]}; do for sni in ${(onv)ZINIT_SNIPPETS[@]}; do
+zinit-message -n "{url}${sni% <[^>]#>}{rst} ${(M)sni%<[^>]##>}, " +zi-log -n "{url}${sni% <[^>]#>}{rst} ${(M)sni%<[^>]##>}, "
done done
[[ -z $sni ]] && builtin print -n " " [[ -z $sni ]] && builtin print -n " "
builtin print '\b\b ' builtin print '\b\b '
@ -2185,7 +2185,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
fi fi
done done
+zinit-message "Compiled plugins: {num}$count{rst}" +zi-log "Compiled plugins: {num}$count{rst}"
} # ]]] } # ]]]
# FUNCTION: .zinit-stress [[[ # FUNCTION: .zinit-stress [[[
@ -2824,7 +2824,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
local PUFILE=$PUDIR/${counter}_$PUFILEMAIN.out local PUFILE=$PUDIR/${counter}_$PUFILEMAIN.out
.zinit-any-colorify-as-uspl2 "$uspl" .zinit-any-colorify-as-uspl2 "$uspl"
+zinit-message "Updating $REPLY{…}" >! $PUFILE +zi-log "Updating $REPLY{…}" >! $PUFILE
.zinit-any-to-user-plugin "$uspl" .zinit-any-to-user-plugin "$uspl"
local user=${reply[-2]} plugin=${reply[-1]} local user=${reply[-2]} plugin=${reply[-1]}
@ -2879,7 +2879,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
.zinit-exists-physically "$user" "$plugin" || return $retval .zinit-exists-physically "$user" "$plugin" || return $retval
.zinit-any-colorify-as-uspl2 "$2" "$3" .zinit-any-colorify-as-uspl2 "$2" "$3"
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message "{msg2}Updating also \`$REPLY{rst}{msg2}'" \ +zi-log "{msg2}Updating also \`$REPLY{rst}{msg2}'" \
"plugin (already updated a snippet of the same name){…}{rst}" "plugin (already updated a snippet of the same name){…}{rst}"
} else { } else {
.zinit-exists-physically-message "$user" "$plugin" || return 1 .zinit-exists-physically-message "$user" "$plugin" || return 1
@ -2976,7 +2976,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
} }
} }
if (( ZINIT[annex-multi-flag:pull-active] <= 1 && !OPTS[opt_-q,--quiet] )) { if (( ZINIT[annex-multi-flag:pull-active] <= 1 && !OPTS[opt_-q,--quiet] )) {
+zinit-message "{info}[{pre}${ice[from]}{info}]{rst} latest version ({version}${version}{rst}) already installed" +zi-log "{info}[{pre}${ice[from]}{info}]{rst} latest version ({version}${version}{rst}) already installed"
} }
} }
@ -3117,10 +3117,10 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
fi fi
if [[ -n ${(v)ice[(I)(mv|cp|atpull|ps-on-update|cargo)]} || $+ice[sbin]$+ice[make]$+ice[extract]$+ice[configure] -ne 0 ]] { if [[ -n ${(v)ice[(I)(mv|cp|atpull|ps-on-update|cargo)]} || $+ice[sbin]$+ice[make]$+ice[extract]$+ice[configure] -ne 0 ]] {
if (( !OPTS[opt_-q,--quiet] && ZINIT[annex-multi-flag:pull-active] == 1 )) { if (( !OPTS[opt_-q,--quiet] && ZINIT[annex-multi-flag:pull-active] == 1 )) {
+zinit-message -n "{pre}[update]{msg3} Continuing with the update because " +zi-log -n "{pre}[update]{msg3} Continuing with the update because "
(( ${+ice[run-atpull]} )) && \ (( ${+ice[run-atpull]} )) && \
+zinit-message "{ice}run-atpull{apo}''{msg3} ice given.{rst}" || \ +zi-log "{ice}run-atpull{apo}''{msg3} ice given.{rst}" || \
+zinit-message "{opt}-u{msg3}/{opt}--urge{msg3} given.{rst}" +zi-log "{opt}-u{msg3}/{opt}--urge{msg3} given.{rst}"
} }
} }
@ -3224,7 +3224,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
.zinit-self-update -q .zinit-self-update -q
[[ $2 = restart ]] && \ [[ $2 = restart ]] && \
+zinit-message "{msg2}Restarting the update with the new codebase loaded.{rst}"$'\n' +zi-log "{msg2}Restarting the update with the new codebase loaded.{rst}"$'\n'
local file local file
integer sum el update_rc integer sum el update_rc
@ -3236,7 +3236,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
if [[ $2 != restart ]] && (( ZINIT[mtime] + ZINIT[mtime-side] + if [[ $2 != restart ]] && (( ZINIT[mtime] + ZINIT[mtime-side] +
ZINIT[mtime-install] + ZINIT[mtime-autoload] != sum ZINIT[mtime-install] + ZINIT[mtime-autoload] != sum
)) { )) {
+zinit-message "{msg2}Detected Zinit update in another session -" \ +zi-log "{msg2}Detected Zinit update in another session -" \
"{pre}reloading Zinit{msg2}{…}{rst}" "{pre}reloading Zinit{msg2}{…}{rst}"
source $ZINIT[BIN_DIR]/zinit.zsh source $ZINIT[BIN_DIR]/zinit.zsh
source $ZINIT[BIN_DIR]/zinit-side.zsh source $ZINIT[BIN_DIR]/zinit-side.zsh
@ -3245,7 +3245,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
for file ( "" -side -install -autoload ) { for file ( "" -side -install -autoload ) {
.zinit-get-mtime-into "${ZINIT[BIN_DIR]}/zinit$file.zsh" "ZINIT[mtime$file]" .zinit-get-mtime-into "${ZINIT[BIN_DIR]}/zinit$file.zsh" "ZINIT[mtime$file]"
} }
+zinit-message "%B{pname}Done.{rst}"$'\n' +zi-log "%B{pname}Done.{rst}"$'\n'
.zinit-update-or-status-all "$1" restart .zinit-update-or-status-all "$1" restart
return $? return $?
} }
@ -3254,13 +3254,13 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
if (( OPTS[opt_-p,--parallel] )) && [[ $1 = update ]] { if (( OPTS[opt_-p,--parallel] )) && [[ $1 = update ]] {
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message '{info2}Parallel Update Starts Now{…}{rst}' +zi-log '{info2}Parallel Update Starts Now{…}{rst}'
.zinit-update-all-parallel .zinit-update-all-parallel
retval=$? retval=$?
.zinit-compinit 1 1 &>/dev/null .zinit-compinit 1 1 &>/dev/null
rehash rehash
if (( !OPTS[opt_-q,--quiet] )) { if (( !OPTS[opt_-q,--quiet] )) {
+zinit-message "{msg2}The update took {obj}${SECONDS}{msg2} seconds{rst}" +zi-log "{msg2}The update took {obj}${SECONDS}{msg2} seconds{rst}"
} }
return $retval return $retval
} }
@ -3276,7 +3276,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
snipps=( ${ZINIT[SNIPPETS_DIR]}/**/(._zinit|._zplugin)(ND) ) snipps=( ${ZINIT[SNIPPETS_DIR]}/**/(._zinit|._zplugin)(ND) )
[[ $st != status && ${OPTS[opt_-q,--quiet]} != 1 && -n $snipps ]] && \ [[ $st != status && ${OPTS[opt_-q,--quiet]} != 1 && -n $snipps ]] && \
+zinit-message "{info}Note:{rst} updating also unloaded snippets" +zi-log "{info}Note:{rst} updating also unloaded snippets"
for snip ( ${ZINIT[SNIPPETS_DIR]}/**/(._zinit|._zplugin)/mode(D) ) { for snip ( ${ZINIT[SNIPPETS_DIR]}/**/(._zinit|._zplugin)/mode(D) ) {
[[ ! -f ${snip:h}/url ]] && continue [[ ! -f ${snip:h}/url ]] && continue
@ -3297,10 +3297,10 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
if [[ $st = status ]]; then if [[ $st = status ]]; then
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message "{info}Note:{rst} status done also for unloaded plugins" +zi-log "{info}Note:{rst} status done also for unloaded plugins"
else else
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message "{info}Note:{rst} updating also unloaded plugins" +zi-log "{info}Note:{rst} updating also unloaded plugins"
fi fi
ZINIT[first-plugin-mark]=init ZINIT[first-plugin-mark]=init
@ -3345,7 +3345,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
.zinit-update-or-status update "$user" "$plugin" .zinit-update-or-status update "$user" "$plugin"
update_rc=$? update_rc=$?
[[ $update_rc -ne 0 ]] && { [[ $update_rc -ne 0 ]] && {
+zinit-message "🚧{warn}Warning: {pid}${user}/${plugin} {warn}update returned {obj}$update_rc" +zi-log "🚧{warn}Warning: {pid}${user}/${plugin} {warn}update returned {obj}$update_rc"
retval=$? retval=$?
} }
fi fi
@ -3353,7 +3353,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
.zinit-compinit 1 1 &>/dev/null .zinit-compinit 1 1 &>/dev/null
if (( !OPTS[opt_-q,--quiet] )) { if (( !OPTS[opt_-q,--quiet] )) {
+zinit-message "{msg2}The update took {obj}${SECONDS}{msg2} seconds{rst}" +zi-log "{msg2}The update took {obj}${SECONDS}{msg2} seconds{rst}"
} }
return "$retval" return "$retval"
@ -3416,7 +3416,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
counter=0 counter=0
PUAssocArray=() PUAssocArray=()
} elif (( counter == 1 && !OPTS[opt_-q,--quiet] )) { } elif (( counter == 1 && !OPTS[opt_-q,--quiet] )) {
+zinit-message "{obj}Spawning the next{num}" \ +zi-log "{obj}Spawning the next{num}" \
"${OPTS[value]}{obj} concurrent update jobs" \ "${OPTS[value]}{obj} concurrent update jobs" \
"({msg2}${tpe}{obj}){…}{rst}" "({msg2}${tpe}{obj}){…}{rst}"
} }
@ -3427,7 +3427,7 @@ print -- "\nAvailable ice-modifiers:\n\n${ice_order[*]}"
# #
# User-action entry point. # User-action entry point.
zi::version() { zi::version() {
+zinit-message "zinit{cmd} $(git --git-dir=$(realpath ${ZINIT[BIN_DIR]}/.git) describe --tags) {rst}(${OSTYPE}_${CPUTYPE})" +zi-log "zinit{cmd} $(git --git-dir=$(realpath ${ZINIT[BIN_DIR]}/.git) describe --tags) {rst}(${OSTYPE}_${CPUTYPE})"
return $? return $?
} # ]]] } # ]]]

View file

@ -13,7 +13,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
.zinit-jq-check() { .zinit-jq-check() {
command -v jq >/dev/null && return 0 command -v jq >/dev/null && return 0
+zinit-message "{error}❌ ERROR: jq binary not found" \ +zi-log "{error}❌ ERROR: jq binary not found" \
"{nl}{u-warn}Please install jq:{rst}" \ "{nl}{u-warn}Please install jq:{rst}" \
"https://github.com/jqlang/jq" \ "https://github.com/jqlang/jq" \
"{nl}{u-warn}To do so with zinit, please refer to:{rst}" \ "{nl}{u-warn}To do so with zinit, please refer to:{rst}" \
@ -102,7 +102,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
[[ -n "$localpkg" ]] && pkgname="{pid}$pkgname{rst} {note}[$tmpfile]{rst}" [[ -n "$localpkg" ]] && pkgname="{pid}$pkgname{rst} {note}[$tmpfile]{rst}"
if [[ -z $pkgjson ]] { if [[ -z $pkgjson ]] {
+zinit-message "{error}❌ Error: the package {hi}${pkgname}" \ +zi-log "{error}❌ Error: the package {hi}${pkgname}" \
"{error}couldn't be found.{rst}" "{error}couldn't be found.{rst}"
return 1 return 1
} }
@ -119,7 +119,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
# Check if user requested an unknown profile # Check if user requested an unknown profile
if ! (( ${profiles[(I)${profile}]} )) { if ! (( ${profiles[(I)${profile}]} )) {
# Assumption: the default profile is the first in the table (-> different color). # Assumption: the default profile is the first in the table (-> different color).
+zinit-message "{u-warn}Error{b-warn}:{error} the profile {apo}\`{hi}$profile{apo}\`" \ +zi-log "{u-warn}Error{b-warn}:{error} the profile {apo}\`{hi}$profile{apo}\`" \
"{error}couldn't be found, aborting. Available profiles are:" \ "{error}couldn't be found, aborting. Available profiles are:" \
"{lhi}${(pj:$epro_sep:)profiles[@]}{error}.{rst}" "{lhi}${(pj:$epro_sep:)profiles[@]}{error}.{rst}"
return 1 return 1
@ -129,7 +129,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
local -A metadata local -A metadata
.zinit-json-to-array "$pkgjson" "$json_meta" metadata .zinit-json-to-array "$pkgjson" "$json_meta" metadata
if [[ "$?" -ne 0 || -z "$metadata" ]] { if [[ "$?" -ne 0 || -z "$metadata" ]] {
+zinit-message '{error}❌ ERROR: Failed to retrieve metadata from package.json' +zi-log '{error}❌ ERROR: Failed to retrieve metadata from package.json'
return 1 return 1
} }
@ -159,13 +159,13 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
eval "ICE[id-as]=\"${ICE[id-as]//(#m)[\"\\]/${map[$MATCH]}}\"" eval "ICE[id-as]=\"${ICE[id-as]//(#m)[\"\\]/${map[$MATCH]}}\""
} }
+zinit-message "{info3}Package{ehi}:{rst} ${pkgname}. Selected" \ +zi-log "{info3}Package{ehi}:{rst} ${pkgname}. Selected" \
"profile{ehi}:{rst} {hi}$profile{rst}. Available" \ "profile{ehi}:{rst} {hi}$profile{rst}. Available" \
"profiles:${${${(M)profile:#default}:+$lhi_hl}:-$profile_hl}" \ "profiles:${${${(M)profile:#default}:+$lhi_hl}:-$profile_hl}" \
"${(pj:$pro_sep:)profiles[@]}{rst}." "${(pj:$pro_sep:)profiles[@]}{rst}."
if [[ $profile != *bgn* && -n ${(M)profiles[@]:#*bgn*} ]] { if [[ $profile != *bgn* && -n ${(M)profiles[@]:#*bgn*} ]] {
+zinit-message "{note}Note:{rst} The {apo}\`{profile}bgn{glob}*{apo}\`{rst}" \ +zi-log "{note}Note:{rst} The {apo}\`{profile}bgn{glob}*{apo}\`{rst}" \
"profiles (if any are available) are the recommended ones (the reason" \ "profiles (if any are available) are the recommended ones (the reason" \
"is that they expose the binaries provided by the package without" \ "is that they expose the binaries provided by the package without" \
"altering (i.e.: {slight}cluttering{rst}{…}) the {var}\$PATH{rst}" \ "altering (i.e.: {slight}cluttering{rst}{…}) the {var}\$PATH{rst}" \
@ -181,37 +181,37 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
]]; then ]]; then
local -A namemap local -A namemap
namemap=( bgn bin-gem-node dl patch-dl monitor readurl ) namemap=( bgn bin-gem-node dl patch-dl monitor readurl )
+zinit-message -n "{u-warn}ERROR{b-warn}: {error}the " +zi-log -n "{u-warn}ERROR{b-warn}: {error}the "
if [[ -z ${(MS)ICE[requires]##(\;|(#s))$required(\;|(#e))} ]]; then if [[ -z ${(MS)ICE[requires]##(\;|(#s))$required(\;|(#e))} ]]; then
+zinit-message -n "{error}requested profile {apo}\`{hi}$profile{apo}\`{error} " +zi-log -n "{error}requested profile {apo}\`{hi}$profile{apo}\`{error} "
else else
+zinit-message -n "{error}package {pid}$pkg{error} " +zi-log -n "{error}package {pid}$pkg{error} "
fi fi
+zinit-message '{error}requires the {apo}`{annex}'${namemap[$required]}'{apo}`' \ +zi-log '{error}requires the {apo}`{annex}'${namemap[$required]}'{apo}`' \
"{error}annex, which is currently not installed." \ "{error}annex, which is currently not installed." \
"{nl}{nl}If you'd like to install it, you can visit its homepage:" \ "{nl}{nl}If you'd like to install it, you can visit its homepage:" \
"{nl} {url}https://github.com/zdharma-continuum/zinit-annex-${(L)namemap[$required]}{rst}" \ "{nl} {url}https://github.com/zdharma-continuum/zinit-annex-${(L)namemap[$required]}{rst}" \
"{nl}for instructions." "{nl}for instructions."
(( ${#profiles[@]:#$profile} > 0 )) && \ (( ${#profiles[@]:#$profile} > 0 )) && \
+zinit-message "{nl}Other available profiles are:" \ +zi-log "{nl}Other available profiles are:" \
"{profile}${(pj:$pro_sep:)${profiles[@]:#$profile}}{rst}." "{profile}${(pj:$pro_sep:)${profiles[@]:#$profile}}{rst}."
return 1 return 1
fi fi
else else
if ! command -v $required &>/dev/null; then if ! command -v $required &>/dev/null; then
+zinit-message -n "{u-warn}ERROR{b-warn}: {error}the " +zi-log -n "{u-warn}ERROR{b-warn}: {error}the "
if [[ -n ${(MS)ICE[requires]##(\;|(#s))$required(\;|(#e))} ]]; then if [[ -n ${(MS)ICE[requires]##(\;|(#s))$required(\;|(#e))} ]]; then
+zinit-message -n "{error}requested profile {apo}\`{hi}$profile{apo}\`{error} " +zi-log -n "{error}requested profile {apo}\`{hi}$profile{apo}\`{error} "
else else
+zinit-message -n "{error}package {pid}$pkg{error} " +zi-log -n "{error}package {pid}$pkg{error} "
fi fi
+zinit-message '{error}requires a {apo}`{cmd}'$required'{apo}`{error}' \ +zi-log '{error}requires a {apo}`{cmd}'$required'{apo}`{error}' \
"command to be available in {var}\$PATH{error}.{rst}" \ "command to be available in {var}\$PATH{error}.{rst}" \
"{nl}{error}The package cannot be installed unless the" \ "{nl}{error}The package cannot be installed unless the" \
"command will be available." "command will be available."
(( ${#profiles[@]:#$profile} > 0 )) && \ (( ${#profiles[@]:#$profile} > 0 )) && \
+zinit-message "{nl}Other available profiles are:" \ +zi-log "{nl}Other available profiles are:" \
"{profile}${(pj:$pro_sep:)${profiles[@]:#$profile}}{rst}." "{profile}${(pj:$pro_sep:)${profiles[@]:#$profile}}{rst}."
return 1 return 1
fi fi
@ -219,18 +219,18 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
} }
if [[ -n ${ICE[dl]} && -z ${(k)ZINIT_EXTS[(r)<-> z-annex-data: zinit-annex-patch-dl *]} ]] { if [[ -n ${ICE[dl]} && -z ${(k)ZINIT_EXTS[(r)<-> z-annex-data: zinit-annex-patch-dl *]} ]] {
+zinit-message "{nl}{u-warn}WARNING{b-warn}:{rst} the profile uses" \ +zi-log "{nl}{u-warn}WARNING{b-warn}:{rst} the profile uses" \
"{ice}dl''{rst} ice however there's currently no {annex}zinit-annex-patch-dl{rst}" \ "{ice}dl''{rst} ice however there's currently no {annex}zinit-annex-patch-dl{rst}" \
"annex loaded, which provides it." "annex loaded, which provides it."
+zinit-message "The ice will be inactive, i.e.: no additional" \ +zi-log "The ice will be inactive, i.e.: no additional" \
"files will become downloaded (the ice downloads the given URLs)." \ "files will become downloaded (the ice downloads the given URLs)." \
"The package should still work, as it doesn't indicate to" \ "The package should still work, as it doesn't indicate to" \
"{u}{slight}require{rst} the annex." "{u}{slight}require{rst} the annex."
+zinit-message "{nl}You can download the" \ +zi-log "{nl}You can download the" \
"annex from its homepage at {url}https://github.com/zdharma-continuum/zinit-annex-patch-dl{rst}." "annex from its homepage at {url}https://github.com/zdharma-continuum/zinit-annex-patch-dl{rst}."
} }
[[ -n ${message} ]] && +zinit-message "{info}${message}{rst}" [[ -n ${message} ]] && +zi-log "{info}${message}{rst}"
if (( ${+ICE[is-snippet]} )) { if (( ${+ICE[is-snippet]} )) {
reply=( "" "$url" ) reply=( "" "$url" )
@ -248,18 +248,18 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
local fname="${${URL%%\?*}:t}" local fname="${${URL%%\?*}:t}"
command mkdir -p $dir || { command mkdir -p $dir || {
+zinit-message "{u-warn}Error{b-warn}:{error} Couldn't create directory:" \ +zi-log "{u-warn}Error{b-warn}:{error} Couldn't create directory:" \
"{dir}$dir{error}, aborting.{rst}" "{dir}$dir{error}, aborting.{rst}"
return 1 return 1
} }
builtin cd -q $dir || return 1 builtin cd -q $dir || return 1
+zinit-message "Downloading tarball for {pid}$plugin{rst}{…}" +zi-log "Downloading tarball for {pid}$plugin{rst}{…}"
if { ! .zinit-download-file-stdout "$URL" 0 1 >! "$fname" } { if { ! .zinit-download-file-stdout "$URL" 0 1 >! "$fname" } {
if { ! .zinit-download-file-stdout "$URL" 1 1 >! "$fname" } { if { ! .zinit-download-file-stdout "$URL" 1 1 >! "$fname" } {
command rm -f "$fname" command rm -f "$fname"
+zinit-message "Download of the file {apo}\`{file}$fname{apo}\`{rst}" \ +zi-log "Download of the file {apo}\`{file}$fname{apo}\`{rst}" \
"failed. No available download tool? One of:" \ "failed. No available download tool? One of:" \
"{cmd}${(pj:$tool_sep:)${=:-curl wget lftp lynx}}{rst}." "{cmd}${(pj:$tool_sep:)${=:-curl wget lftp lynx}}{rst}."
@ -301,7 +301,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
local_path tpe=$4 update=$5 version=$6 local_path tpe=$4 update=$5 version=$6
if .zinit-get-object-path plugin "$id_as" && [[ -z $update ]] { if .zinit-get-object-path plugin "$id_as" && [[ -z $update ]] {
+zinit-message "{u-warn}ERROR{b-warn}:{error} A plugin named {pid}$id_as{error}" \ +zi-log "{u-warn}ERROR{b-warn}:{error} A plugin named {pid}$id_as{error}" \
"already exists, aborting." "already exists, aborting."
return 1 return 1
} }
@ -343,7 +343,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
.zinit-any-colorify-as-uspl2 "$user" "$plugin" .zinit-any-colorify-as-uspl2 "$user" "$plugin"
local pid_hl='{pid}' id_msg_part=" (at label{ehi}:{rst} {id-as}$id_as{rst}{…})" local pid_hl='{pid}' id_msg_part=" (at label{ehi}:{rst} {id-as}$id_as{rst}{…})"
(( $+ICE[pack] )) && local infix_m="({b}{ice}pack{apo}''{rst}) " (( $+ICE[pack] )) && local infix_m="({b}{ice}pack{apo}''{rst}) "
+zinit-message "{nl}Downloading $infix_m{pid}$user${user:+/}$plugin{…}${${${id_as:#$user/$plugin}}:+$id_msg_part}" +zi-log "{nl}Downloading $infix_m{pid}$user${user:+/}$plugin{…}${${${id_as:#$user/$plugin}}:+$id_msg_part}"
} }
local site local site
@ -378,11 +378,11 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
{ local old_version="$(<$local_path/._zinit/is_release${count:#1})"; } 2>/dev/null { local old_version="$(<$local_path/._zinit/is_release${count:#1})"; } 2>/dev/null
old_version=${old_version/(#b)(\/[^\/]##)(#c4,4)\/([^\/]##)*/${match[2]}} old_version=${old_version/(#b)(\/[^\/]##)(#c4,4)\/([^\/]##)*/${match[2]}}
} }
+zinit-message "(Requesting \`${REPLY:t}'${version:+, version $version}{…}${old_version:+ Current version: $old_version.})" +zi-log "(Requesting \`${REPLY:t}'${version:+, version $version}{…}${old_version:+ Current version: $old_version.})"
if { ! .zinit-download-file-stdout "$url" 0 1 >! "${REPLY:t}" } { if { ! .zinit-download-file-stdout "$url" 0 1 >! "${REPLY:t}" } {
if { ! .zinit-download-file-stdout "$url" 1 1 >! "${REPLY:t}" } { if { ! .zinit-download-file-stdout "$url" 1 1 >! "${REPLY:t}" } {
command rm -f "${REPLY:t}" command rm -f "${REPLY:t}"
+zinit-message "Download of release for \`$remote_url_path' " \ +zi-log "Download of release for \`$remote_url_path' " \
"failed.{nl}Tried url: $url." "failed.{nl}Tried url: $url."
return 1 return 1
} }
@ -589,9 +589,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
for comps msg in ${(kv)comp_types}; do for comps msg in ${(kv)comp_types}; do
local comps_num=${#${(e)comps}} local comps_num=${#${(e)comps}}
if (( comps_num > 0 )); then if (( comps_num > 0 )); then
+zinit-message "{m} ${msg} {num}$comps_num{rst} completion${=${comps_num:#1}:+s}" +zi-log "{m} ${msg} {num}$comps_num{rst} completion${=${comps_num:#1}:+s}"
if (( quiet == 0 )); then if (( quiet == 0 )); then
+zinit-message "{m} Added $comps_num completion${=${comps_num:#1}:+s} to {var}$comps{rst} array" +zi-log "{m} Added $comps_num completion${=${comps_num:#1}:+s} to {var}$comps{rst} array"
fi fi
fi fi
done done
@ -637,7 +637,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
.zinit-forget-completion "$cfile" .zinit-forget-completion "$cfile"
done done
+zinit-message "Initializing completion ({func}compinit{rst}){…}" +zi-log "Initializing completion ({func}compinit{rst}){…}"
command rm -f ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} command rm -f ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump}
# Workaround for a nasty trick in _vim # Workaround for a nasty trick in _vim
@ -682,7 +682,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
elif (( ${+commands[lynx]} )); then elif (( ${+commands[lynx]} )); then
command lynx -source "$url" || return 1 command lynx -source "$url" || return 1
else else
+zinit-message "{u-warn}ERROR{b-warn}:{rst}No download tool detected" \ +zi-log "{u-warn}ERROR{b-warn}:{rst}No download tool detected" \
"(one of: {cmd}curl{rst}, {cmd}wget{rst}, {cmd}lftp{rst}," \ "(one of: {cmd}curl{rst}, {cmd}wget{rst}, {cmd}lftp{rst}," \
"{cmd}lynx{rst})." "{cmd}lynx{rst})."
return 2 return 2
@ -848,12 +848,12 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
if [[ -f $plugin_dir/$filename ]] { if [[ -f $plugin_dir/$filename ]] {
reply=( "$plugin_dir" $plugin_dir/$filename ) reply=( "$plugin_dir" $plugin_dir/$filename )
} elif { ! .zinit-first % "$plugin_dir" } { } elif { ! .zinit-first % "$plugin_dir" } {
+zinit-message "{m} No files for compilation found" +zi-log "{m} No files for compilation found"
return 1 return 1
} }
} else { } else {
.zinit-first "$1" "$2" || { .zinit-first "$1" "$2" || {
+zinit-message "{m} No files for compilation found" +zi-log "{m} No files for compilation found"
return 1 return 1
} }
} }
@ -862,15 +862,15 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
first=${reply[-1]} first=${reply[-1]}
local fname=${first#$pdir_path/} local fname=${first#$pdir_path/}
+zinit-message -n "{m} Compiling {file}$fname{rst}" +zi-log -n "{m} Compiling {file}$fname{rst}"
if [[ -z ${ICE[(i)(\!|)(sh|bash|ksh|csh)]} ]] { if [[ -z ${ICE[(i)(\!|)(sh|bash|ksh|csh)]} ]] {
() { () {
builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace} builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace}
if { ! zcompile -U "$first" } { if { ! zcompile -U "$first" } {
+zinit-message "{msg2}Warning:{rst} Compilation failed. Don't worry, the plugin will work also without compilation." +zi-log "{msg2}Warning:{rst} Compilation failed. Don't worry, the plugin will work also without compilation."
+zinit-message "{msg2}Warning:{rst} Consider submitting an error report to Zinit or to the plugin's author." +zi-log "{msg2}Warning:{rst} Consider submitting an error report to Zinit or to the plugin's author."
} else { } else {
+zinit-message " [{happy}OK{rst}]" +zi-log " [{happy}OK{rst}]"
} }
# Try to catch possible additional file # Try to catch possible additional file
zcompile -U "${${first%.plugin.zsh}%.zsh-theme}.zsh" 2>/dev/null zcompile -U "${${first%.plugin.zsh}%.zsh-theme}.zsh" 2>/dev/null
@ -887,7 +887,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
eval "list+=( \$plugin_dir/$~pat(N) )" eval "list+=( \$plugin_dir/$~pat(N) )"
} }
if [[ ${#list} -eq 0 ]] { if [[ ${#list} -eq 0 ]] {
+zinit-message "{w} ice {ice}compile{apo}''{rst} didn't match any files." +zi-log "{w} ice {ice}compile{apo}''{rst} didn't match any files."
} else { } else {
integer retval integer retval
for first in $list; do for first in $list; do
@ -897,9 +897,9 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
} }
done done
builtin print -rl -- ${list[@]#$plugin_dir/} >! ${TMPDIR:-/tmp}/zinit.compiled.$$.lst builtin print -rl -- ${list[@]#$plugin_dir/} >! ${TMPDIR:-/tmp}/zinit.compiled.$$.lst
+zinit-message -n "{m} {num}${#list}{rst} compiled file${=${list:#1}:+s} added to {var}\$ADD_COMPILED{rst} array" +zi-log -n "{m} {num}${#list}{rst} compiled file${=${list:#1}:+s} added to {var}\$ADD_COMPILED{rst} array"
if (( retval )) { if (( retval )) {
+zinit-message " (exit code: {ehi}$retval{rst})" +zi-log " (exit code: {ehi}$retval{rst})"
} }
} }
fi fi
@ -960,14 +960,14 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
if [[ ! -d $local_dir/$dirname ]]; then if [[ ! -d $local_dir/$dirname ]]; then
local id_msg_part="{…} (at label{ehi}:{rst} {id-as}$id_as{rst})" local id_msg_part="{…} (at label{ehi}:{rst} {id-as}$id_as{rst})"
[[ $update != -u ]] && +zinit-message "{nl}{info}Setting up snippet:" \ [[ $update != -u ]] && +zi-log "{nl}{info}Setting up snippet:" \
"{url}$sname{rst}${ICE[id-as]:+$id_msg_part}" "{url}$sname{rst}${ICE[id-as]:+$id_msg_part}"
command mkdir -p "$local_dir" command mkdir -p "$local_dir"
fi fi
if [[ $update = -u && ${OPTS[opt_-q,--quiet]} != 1 ]]; then if [[ $update = -u && ${OPTS[opt_-q,--quiet]} != 1 ]]; then
local id_msg_part="{…} (identified as{ehi}:{rst} {id-as}$id_as{rst})" local id_msg_part="{…} (identified as{ehi}:{rst} {id-as}$id_as{rst})"
+zinit-message "{nl}{info2}Updating snippet: {url}$sname{rst}${ICE[id-as]:+$id_msg_part}" +zi-log "{nl}{info2}Updating snippet: {url}$sname{rst}${ICE[id-as]:+$id_msg_part}"
fi fi
# A flag for the annexes. 0 no new commits, 1 - run-atpull mode, # A flag for the annexes. 0 no new commits, 1 - run-atpull mode,
@ -985,7 +985,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
( (
() { setopt localoptions noautopushd; builtin cd -q "$local_dir"; } || return 4 () { setopt localoptions noautopushd; builtin cd -q "$local_dir"; } || return 4
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "Downloading {apo}\`{url}$sname{apo}\`{rst}${${ICE[svn]+" (with Subversion)"}:-" (with curl, wget, lftp)"}{…}" (( !OPTS[opt_-q,--quiet] )) && +zi-log "Downloading {apo}\`{url}$sname{apo}\`{rst}${${ICE[svn]+" (with Subversion)"}:-" (with curl, wget, lftp)"}{…}"
if (( ${+ICE[svn]} )) { if (( ${+ICE[svn]} )) {
if [[ $update = -u ]] { if [[ $update = -u ]] {
@ -1024,8 +1024,8 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
# the messages on an actual update # the messages on an actual update
if (( OPTS[opt_-q,--quiet] )); then if (( OPTS[opt_-q,--quiet] )); then
local id_msg_part="{…} (identified as{ehi}: {id-as}$id_as{rst})" local id_msg_part="{…} (identified as{ehi}: {id-as}$id_as{rst})"
+zinit-message "{nl}{info2}Updating snippet {url}${sname}{rst}${ICE[id-as]:+$id_msg_part}" +zi-log "{nl}{info2}Updating snippet {url}${sname}{rst}${ICE[id-as]:+$id_msg_part}"
+zinit-message "Downloading {apo}\`{rst}$sname{apo}\`{rst} (with Subversion){…}" +zi-log "Downloading {apo}\`{rst}$sname{apo}\`{rst} (with Subversion){…}"
fi fi
.zinit-mirror-using-svn "$url" "-u" "$dirname" || return 4 .zinit-mirror-using-svn "$url" "-u" "$dirname" || return 4
} }
@ -1051,7 +1051,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
() { () {
builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace} builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace}
zcompile -U "${list[1]}" &>/dev/null || \ zcompile -U "${list[1]}" &>/dev/null || \
+zinit-message "{u-warn}Warning{b-warn}:{rst} couldn't compile {apo}\`{file}${list[1]}{apo}\`{rst}." +zi-log "{u-warn}Warning{b-warn}:{rst} couldn't compile {apo}\`{file}${list[1]}{apo}\`{rst}."
} }
} }
fi fi
@ -1079,7 +1079,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
local -a matched local -a matched
matched=( $local_dir/$dirname/$filename(DNms-$secs) ) matched=( $local_dir/$dirname/$filename(DNms-$secs) )
if (( ${#matched} )) { if (( ${#matched} )) {
+zinit-message "{info}Already up to date.{rst}" +zi-log "{info}Already up to date.{rst}"
# Empty-update return-short path it also decides the # Empty-update return-short path it also decides the
# pull-active flag after the return from this sub-shell # pull-active flag after the return from this sub-shell
(( ${+ICE[run-atpull]} || OPTS[opt_-u,--urge] )) && skip_dl=1 || return 0 (( ${+ICE[run-atpull]} || OPTS[opt_-u,--urge] )) && skip_dl=1 || return 0
@ -1117,7 +1117,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
if { ! .zinit-download-file-stdout "$url" 0 1 >! "$dirname/$filename" } { if { ! .zinit-download-file-stdout "$url" 0 1 >! "$dirname/$filename" } {
if { ! .zinit-download-file-stdout "$url" 1 1 >! "$dirname/$filename" } { if { ! .zinit-download-file-stdout "$url" 1 1 >! "$dirname/$filename" } {
command rm -f "$dirname/$filename" command rm -f "$dirname/$filename"
+zinit-message "{u-warn}ERROR{b-warn}:{rst} Download failed." +zi-log "{u-warn}ERROR{b-warn}:{rst} Download failed."
return 4 return 4
} }
} }
@ -1175,26 +1175,26 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
command mkdir -p "$local_dir/$dirname" command mkdir -p "$local_dir/$dirname"
if [[ ! -e $url ]] { if [[ ! -e $url ]] {
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "{ehi}ERROR:{error} The source file {file}$url{error} doesn't exist.{rst}" (( !OPTS[opt_-q,--quiet] )) && +zi-log "{ehi}ERROR:{error} The source file {file}$url{error} doesn't exist.{rst}"
retval=4 retval=4
} }
if [[ -e $url && ! -f $url && $url != /dev/null ]] { if [[ -e $url && ! -f $url && $url != /dev/null ]] {
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "{ehi}ERROR:{error} The source {file}$url{error} isn't a regular file.{rst}" (( !OPTS[opt_-q,--quiet] )) && +zi-log "{ehi}ERROR:{error} The source {file}$url{error} isn't a regular file.{rst}"
retval=4 retval=4
} }
if [[ -e $url && ! -r $url && $url != /dev/null ]] { if [[ -e $url && ! -r $url && $url != /dev/null ]] {
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "{ehi}ERROR:{error} The source {file}$url{error} isn't" \ (( !OPTS[opt_-q,--quiet] )) && +zi-log "{ehi}ERROR:{error} The source {file}$url{error} isn't" \
"accessible (wrong permissions).{rst}" "accessible (wrong permissions).{rst}"
retval=4 retval=4
} }
if ! (( ${+ICE[link] )) { if ! (( ${+ICE[link] )) {
if (( !OPTS[opt_-q,--quiet] )) && [[ $url != /dev/null ]] { if (( !OPTS[opt_-q,--quiet] )) && [[ $url != /dev/null ]] {
+zinit-message "{msg}Copying {file}$filename{msg}{…}{rst}" +zi-log "{msg}Copying {file}$filename{msg}{…}{rst}"
command cp -vf "$url" "$local_dir/$dirname/$filename" || \ command cp -vf "$url" "$local_dir/$dirname/$filename" || \
{ +zinit-message "{ehi}ERROR:{error} The file copying has been unsuccessful.{rst}"; retval=4; } { +zi-log "{ehi}ERROR:{error} The file copying has been unsuccessful.{rst}"; retval=4; }
} else { } else {
command cp -f "$url" "$local_dir/$dirname/$filename" &>/dev/null || \ command cp -f "$url" "$local_dir/$dirname/$filename" &>/dev/null || \
{ +zinit-message "{ehi}ERROR:{error} The copying of {file}$filename{error} has been unsuccessful"\ { +zi-log "{ehi}ERROR:{error} The copying of {file}$filename{error} has been unsuccessful"\
"${${(M)OPTS[opt_-q,--quiet]:#1}:+, skip the -q/--quiet option for more information}.{rst}"; retval=4; } "${${(M)OPTS[opt_-q,--quiet]:#1}:+, skip the -q/--quiet option for more information}.{rst}"; retval=4; }
} }
} else { } else {
@ -1206,12 +1206,12 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
fi fi
} }
if (( !OPTS[opt_-q,--quiet] )) && [[ $url != /dev/null ]] { if (( !OPTS[opt_-q,--quiet] )) && [[ $url != /dev/null ]] {
+zinit-message "{msg}Linking {file}$filename{msg}{…}{rst}" +zi-log "{msg}Linking {file}$filename{msg}{…}{rst}"
command ln -svf "$url" "$local_dir/$dirname/$filename" || \ command ln -svf "$url" "$local_dir/$dirname/$filename" || \
{ +zinit-message "{ehi}ERROR:{error} The file linking has been unsuccessful.{rst}"; retval=4; } { +zi-log "{ehi}ERROR:{error} The file linking has been unsuccessful.{rst}"; retval=4; }
} else { } else {
command ln -sf "$url" "$local_dir/$dirname/$filename" &>/dev/null || \ command ln -sf "$url" "$local_dir/$dirname/$filename" &>/dev/null || \
{ +zinit-message "{ehi}ERROR:{error} The link of {file}$filename{error} has been unsuccessful"\ { +zi-log "{ehi}ERROR:{error} The link of {file}$filename{error} has been unsuccessful"\
"${${(M)OPTS[opt_-q,--quiet]:#1}:+, skip the -q/--quiet option for more information}.{rst}"; retval=4; } "${${(M)OPTS[opt_-q,--quiet]:#1}:+, skip the -q/--quiet option for more information}.{rst}"; retval=4; }
} }
} }
@ -1224,7 +1224,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
local pfx=$local_dir/$dirname/._zinit local pfx=$local_dir/$dirname/._zinit
.zinit-store-ices "$pfx" ICE url_rsvd "" "$save_url" "${+ICE[svn]}" .zinit-store-ices "$pfx" ICE url_rsvd "" "$save_url" "${+ICE[svn]}"
} elif [[ -n $id_as ]] { } elif [[ -n $id_as ]] {
+zinit-message "{u-warn}Warning{b-warn}:{rst} the snippet {url}$id_as{rst} isn't" \ +zi-log "{u-warn}Warning{b-warn}:{rst} the snippet {url}$id_as{rst} isn't" \
"fully downloaded you should remove it with {apo}\`{cmd}zinit delete $id_as{apo}\`{rst}." "fully downloaded you should remove it with {apo}\`{cmd}zinit delete $id_as{apo}\`{rst}."
} }
@ -1397,7 +1397,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
if (( ${#tmp} > 1 && ${#tmp} % 2 == 0 )) { if (( ${#tmp} > 1 && ${#tmp} % 2 == 0 )) {
ICE=( "${(kv)ICE[@]}" "${tmp[@]}" ) ICE=( "${(kv)ICE[@]}" "${tmp[@]}" )
} elif [[ -n ${ZINIT_SICE[$id_as]} ]] { } elif [[ -n ${ZINIT_SICE[$id_as]} ]] {
+zinit-message "{error}WARNING:{msg2} Inconsistency #3" \ +zi-log "{error}WARNING:{msg2} Inconsistency #3" \
"occurred, please report the string: \`{obj}${ZINIT_SICE[$id_as]}{msg2}' to the" \ "occurred, please report the string: \`{obj}${ZINIT_SICE[$id_as]}{msg2}' to the" \
"GitHub issues page: {obj}https://github.com/zdharma-continuum/zinit/issues/{msg2}.{rst}" "GitHub issues page: {obj}https://github.com/zdharma-continuum/zinit/issues/{msg2}.{rst}"
} }
@ -1425,7 +1425,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
} }
if { ! .zinit-get-object-path snippet "$id_as" } { if { ! .zinit-get-object-path snippet "$id_as" } {
+zinit-message "{msg2}Error: the snippet \`{obj}$id_as{msg2}'" \ +zi-log "{msg2}Error: the snippet \`{obj}$id_as{msg2}'" \
"doesn't exist, aborting the update.{rst}" "doesn't exist, aborting the update.{rst}"
return 1 return 1
} }
@ -1500,7 +1500,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
_sys='pc-windows-gnu' _sys='pc-windows-gnu'
;; ;;
(*) (*)
+zinit-message "{info}[{pre}gh-r{info}]{error} Unsupported OS: {obj}${_os}{rst}" +zi-log "{info}[{pre}gh-r{info}]{error} Unsupported OS: {obj}${_os}{rst}"
;; ;;
esac esac
case "$_cpu" in case "$_cpu" in
@ -1517,7 +1517,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
_os=${_os}eabihf _os=${_os}eabihf
;; ;;
(*) (*)
+zinit-message "{info}[{pre}ziextract{info}]{error} Unsupported CPU: {obj}$_cpu{rst}" +zi-log "{info}[{pre}ziextract{info}]{error} Unsupported CPU: {obj}$_cpu{rst}"
;; ;;
esac esac
echo "${_sys};${_cpu};${_os}" echo "${_sys};${_cpu};${_os}"
@ -1532,7 +1532,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
local plugin="$2" urlpart="$3" user="$1" local plugin="$2" urlpart="$3" user="$1"
local -a bpicks filtered init_list list parts local -a bpicks filtered init_list list parts
parts=(${(@s:;:)$(.zi::get-architecture)}) parts=(${(@s:;:)$(.zi::get-architecture)})
# +zinit-message "{info}[{pre}gh-r{info}]{rst} filters -> {glob}${(@)parts}{rst}" # +zi-log "{info}[{pre}gh-r{info}]{rst} filters -> {glob}${(@)parts}{rst}"
if [[ -z $urlpart ]]; then if [[ -z $urlpart ]]; then
local tag_version=${ICE[ver]} local tag_version=${ICE[ver]}
if [[ -z $tag_version ]]; then if [[ -z $tag_version ]]; then
@ -1555,7 +1555,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
if [[ -n $bpick ]]; then if [[ -n $bpick ]]; then
list=( ${(M)list[@]:#(#i)*/$~bpick} ) list=( ${(M)list[@]:#(#i)*/$~bpick} )
if (( !$#list )); then if (( !$#list )); then
+zinit-message "{info}[{pre}gh-r{info}] {error}Error{rst}: {ice}bpick{rst} ice found no release assets{rst}. To fix, modify the {ice}bpick{rst} glob pattern {glob}${bpick}{rst}" +zi-log "{info}[{pre}gh-r{info}] {error}Error{rst}: {ice}bpick{rst} ice found no release assets{rst}. To fix, modify the {ice}bpick{rst} glob pattern {glob}${bpick}{rst}"
fi fi
fi fi
@ -1565,7 +1565,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
for part in "${parts[@]}"; do for part in "${parts[@]}"; do
if (( $#list > 1 )); then if (( $#list > 1 )); then
filtered=( ${(M)list[@]:#(#i)*${~part}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ) filtered=( ${(M)list[@]:#(#i)*${~part}*} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} )
# +zinit-message "{info}[{pre}gh-r{info}]{rst} filter -> {glob}${part}{rst}{nl} - ${(@pj:\n - :)list[1,2]}{nl}" # +zi-log "{info}[{pre}gh-r{info}]{rst} filter -> {glob}${part}{rst}{nl} - ${(@pj:\n - :)list[1,2]}{nl}"
else else
break break
fi fi
@ -1574,7 +1574,7 @@ builtin source "${ZINIT[BIN_DIR]}/zinit-side.zsh" || {
if (( $#list > 1 )) { filtered=( ${list[@]:#(#i)*.(sha[[:digit:]]#|asc)} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ); } if (( $#list > 1 )) { filtered=( ${list[@]:#(#i)*.(sha[[:digit:]]#|asc)} ) && (( $#filtered > 0 )) && list=( ${filtered[@]} ); }
if (( !$#list )); then if (( !$#list )); then
+zinit-message "{nl}{info}[{pre}gh-r{info}] {error}Error{rst}: No GitHub release assets found for {glob}${tag_version}{rst}" +zi-log "{nl}{info}[{pre}gh-r{info}] {error}Error{rst}: No GitHub release assets found for {glob}${tag_version}{rst}"
return 1 return 1
fi fi
reply+=( "${list[1]}" ) reply+=( "${list[1]}" )
@ -1596,7 +1596,7 @@ ziextract() {
local -a opt_move opt_move2 opt_norm opt_auto opt_nobkp local -a opt_move opt_move2 opt_norm opt_auto opt_nobkp
zparseopts -D -E -move=opt_move -move2=opt_move2 -norm=opt_norm \ zparseopts -D -E -move=opt_move -move2=opt_move2 -norm=opt_norm \
-auto=opt_auto -nobkp=opt_nobkp || \ -auto=opt_auto -nobkp=opt_nobkp || \
{ +zinit-message "{info}[{pre}ziextract{info}]{error} Incorrect options given to" \ { +zi-log "{info}[{pre}ziextract{info}]{error} Incorrect options given to" \
"\`{pre}ziextract{msg2}' (available are: {meta}--auto{msg2}," \ "\`{pre}ziextract{msg2}' (available are: {meta}--auto{msg2}," \
"{meta}--move{msg2}, {meta}--move2{msg2}, {meta}--norm{msg2}," \ "{meta}--move{msg2}, {meta}--move2{msg2}, {meta}--norm{msg2}," \
"{meta}--nobkp{msg2}).{rst}"; return 1; } "{meta}--nobkp{msg2}).{rst}"; return 1; }
@ -1630,7 +1630,7 @@ ziextract() {
type=${(L)desc/(#b)(#i)(* |(#s))(zip|rar|xz|7-zip|gzip|bzip2|tar|exe|PE32) */$match[2]} type=${(L)desc/(#b)(#i)(* |(#s))(zip|rar|xz|7-zip|gzip|bzip2|tar|exe|PE32) */$match[2]}
if [[ $type = (zip|rar|xz|7-zip|gzip|bzip2|tar|exe|pe32) ]] { if [[ $type = (zip|rar|xz|7-zip|gzip|bzip2|tar|exe|pe32) ]] {
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message "{info}[{pre}ziextract{info}]{msg2} detected a {meta}$type{rst} archive in the file {file}$fname{rst}." +zi-log "{info}[{pre}ziextract{info}]{msg2} detected a {meta}$type{rst} archive in the file {file}$fname{rst}."
ziextract "$fname" "$type" $opt_move $opt_move2 $opt_norm --norm ${${${#archives}:#1}:+--nobkp} ziextract "$fname" "$type" $opt_move $opt_move2 $opt_norm --norm ${${${#archives}:#1}:+--nobkp}
integer iret_val=$? integer iret_val=$?
ret_val+=iret_val ret_val+=iret_val
@ -1656,7 +1656,7 @@ ziextract() {
# this might delete too soon… However, it's unusual case. # this might delete too soon… However, it's unusual case.
[[ $fname != $infname && $norm -eq 0 ]] && command rm -f "$infname" [[ $fname != $infname && $norm -eq 0 ]] && command rm -f "$infname"
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message "{info}[{pre}ziextract{info}]{msg2} detected a {obj}${type2}{rst} archive in the file {file}${fname}{rst}." +zi-log "{info}[{pre}ziextract{info}]{msg2} detected a {obj}${type2}{rst} archive in the file {file}${fname}{rst}."
ziextract "$fname" "$type2" $opt_move $opt_move2 $opt_norm ${${${#archives}:#1}:+--nobkp} ziextract "$fname" "$type2" $opt_move $opt_move2 $opt_norm ${${${#archives}:#1}:+--nobkp}
ret_val+=$? ret_val+=$?
stage2_processed+=( $fname ) stage2_processed+=( $fname )
@ -1674,11 +1674,11 @@ ziextract() {
} }
if [[ -z $file ]] { if [[ -z $file ]] {
+zinit-message "{info}[{pre}ziextract{info}]{error} argument needed (the file to extract) or the {meta}--auto{msg} option." +zi-log "{info}[{pre}ziextract{info}]{error} argument needed (the file to extract) or the {meta}--auto{msg} option."
return 1 return 1
} }
if [[ ! -e $file ]] { if [[ ! -e $file ]] {
+zinit-message "{info}[{pre}ziextract{info}]{error} ERROR:{msg} the file \`{meta}${file}{msg}' doesn't exist.{rst}" +zi-log "{info}[{pre}ziextract{info}]{error} ERROR:{msg} the file \`{meta}${file}{msg}' doesn't exist.{rst}"
return 1 return 1
} }
if (( !nobkp )) { if (( !nobkp )) {
@ -1690,7 +1690,7 @@ ziextract() {
.zinit-extract-wrapper() { .zinit-extract-wrapper() {
local file="$1" fun="$2" retval local file="$1" fun="$2" retval
(( !OPTS[opt_-q,--quiet] )) && \ (( !OPTS[opt_-q,--quiet] )) && \
+zinit-message "{info}[{pre}ziextract{info}]{rst} Unpacking the files from: \`{obj}$file{msg}'{…}{rst}" +zi-log "{info}[{pre}ziextract{info}]{rst} Unpacking the files from: \`{obj}$file{msg}'{…}{rst}"
$fun; retval=$? $fun; retval=$?
if (( retval == 0 )) { if (( retval == 0 )) {
local -a files local -a files
@ -1701,7 +1701,7 @@ ziextract() {
} }
→zinit-check() { (( ${+commands[$1]} )) || \ →zinit-check() { (( ${+commands[$1]} )) || \
+zinit-message "{info}[{pre}ziextract{info}]{error} Error:{msg} No command {data}$1{msg}, it is required to unpack {file}$2{rst}." +zi-log "{info}[{pre}ziextract{info}]{error} Error:{msg} No command {data}$1{msg}, it is required to unpack {file}$2{rst}."
} }
case "${${ext:+.$ext}:-$file}" in case "${${ext:+.$ext}:-$file}" in
@ -1787,7 +1787,7 @@ ziextract() {
command hdiutil detach $attached_vol command hdiutil detach $attached_vol
if (( retval )) { if (( retval )) {
+zinit-message "{info}[{pre}ziextract{info}]{error} Error:{msg} problem occurred when attempted to copy the files" \ +zi-log "{info}[{pre}ziextract{info}]{error} Error:{msg} problem occurred when attempted to copy the files" \
"from the mounted image: \`{obj}${file}{msg}'.{rst}" "from the mounted image: \`{obj}${file}{msg}'.{rst}"
} }
return $retval return $retval
@ -1809,14 +1809,14 @@ ziextract() {
if [[ $(typeset -f + →zinit-extract) == "→zinit-extract" ]] { if [[ $(typeset -f + →zinit-extract) == "→zinit-extract" ]] {
.zinit-extract-wrapper "$file" →zinit-extract || { .zinit-extract-wrapper "$file" →zinit-extract || {
+zinit-message -n "{info}[{pre}ziextract{info}]{error} Error:{msg} extraction of the archive \`{file}${file}{msg}' had problems" +zi-log -n "{info}[{pre}ziextract{info}]{error} Error:{msg} extraction of the archive \`{file}${file}{msg}' had problems"
local -a bfiles local -a bfiles
bfiles=( ._backup/*(DN) ) bfiles=( ._backup/*(DN) )
if (( ${#bfiles} && !nobkp )) { if (( ${#bfiles} && !nobkp )) {
+zinit-message -n ", restoring the previous version of the plugin/snippet" +zi-log -n ", restoring the previous version of the plugin/snippet"
command mv ._backup/*(DN) . 2>/dev/null command mv ._backup/*(DN) . 2>/dev/null
} }
+zinit-message ".{rst}" +zi-log ".{rst}"
unfunction -- →zinit-extract →zinit-check 2>/dev/null unfunction -- →zinit-extract →zinit-check 2>/dev/null
return 1 return 1
} }
@ -1839,11 +1839,11 @@ ziextract() {
command chmod a+x "${execs[@]}" command chmod a+x "${execs[@]}"
if (( !OPTS[opt_-q,--quiet] )) { if (( !OPTS[opt_-q,--quiet] )) {
if (( ${#execs} == 1 )); then if (( ${#execs} == 1 )); then
+zinit-message "{info}[{pre}ziextract{info}]{rst} Successfully extracted and assigned +x chmod to the file: {obj}${execs[1]}{rst}." +zi-log "{info}[{pre}ziextract{info}]{rst} Successfully extracted and assigned +x chmod to the file: {obj}${execs[1]}{rst}."
else else
local sep="$ZINIT[col-rst],$ZINIT[col-obj] " local sep="$ZINIT[col-rst],$ZINIT[col-obj] "
if (( ${#execs} > 7 )) { if (( ${#execs} > 7 )) {
+zinit-message "{info}[{pre}ziextract{info}]{rst} Successfully" \ +zi-log "{info}[{pre}ziextract{info}]{rst} Successfully" \
"extracted and marked executable the appropriate files" \ "extracted and marked executable the appropriate files" \
"({obj}${(pj:$sep:)${(@)execs[1,5]:t}},…{rst}) contained" \ "({obj}${(pj:$sep:)${(@)execs[1,5]:t}},…{rst}) contained" \
"in \`{file}$file{rst}'. All the extracted" \ "in \`{file}$file{rst}'. All the extracted" \
@ -1851,7 +1851,7 @@ ziextract() {
"available in the {msg2}INSTALLED_EXECS{rst}" \ "available in the {msg2}INSTALLED_EXECS{rst}" \
"array." "array."
} else { } else {
+zinit-message "{info}[{pre}ziextract{info}]{rst} Successfully" \ +zi-log "{info}[{pre}ziextract{info}]{rst} Successfully" \
"extracted and marked {obj}${#execs}{rst} executable the appropriate files" \ "extracted and marked {obj}${#execs}{rst} executable the appropriate files" \
"({obj}${(pj:$sep:)${execs[@]:t}}{rst}) contained" \ "({obj}${(pj:$sep:)${execs[@]:t}}{rst}) contained" \
"in \`{file}$file{rst}'." "in \`{file}$file{rst}'."
@ -1859,7 +1859,7 @@ ziextract() {
fi fi
} }
} elif (( warning )) { } elif (( warning )) {
+zinit-message "{info}[{pre}ziextract{info}]{error} Error:{msg} didn't recognize archive type of {obj}${file}{msg} ${ext:+/ {obj2}${ext}{msg} } (no extraction has been done).{rst}" +zi-log "{info}[{pre}ziextract{info}]{error} Error:{msg} didn't recognize archive type of {obj}${file}{msg} ${ext:+/ {obj2}${ext}{msg} } (no extraction has been done).{rst}"
} }
if (( move | move2 )) { if (( move | move2 )) {
@ -1890,14 +1890,14 @@ ziextract() {
local tpe=$1 extract=$2 local_dir=$3 local tpe=$1 extract=$2 local_dir=$3
( (
builtin cd -q "$local_dir" || \ builtin cd -q "$local_dir" || \
{ +zinit-message "{error}ERROR:{msg2} The path of the $tpe" \ { +zi-log "{error}ERROR:{msg2} The path of the $tpe" \
"(\`{file}$local_dir{msg2}') isn't accessible.{rst}" "(\`{file}$local_dir{msg2}') isn't accessible.{rst}"
return 1 return 1
} }
local -a files local -a files
files=( ${(@)${(@s: :)${extract##(\!-|-\!|\!|-)}}//(#b)(((#s)|([^\\])[\\]([\\][\\])#)|((#s)|([^\\])([\\][\\])#)) /${match[2]:+$match[3]$match[4] }${match[5]:+$match[6]${(l:${#match[7]}/2::\\:):-} }} ) files=( ${(@)${(@s: :)${extract##(\!-|-\!|\!|-)}}//(#b)(((#s)|([^\\])[\\]([\\][\\])#)|((#s)|([^\\])([\\][\\])#)) /${match[2]:+$match[3]$match[4] }${match[5]:+$match[6]${(l:${#match[7]}/2::\\:):-} }} )
if [[ ${#files} -eq 0 && -n ${extract##(\!-|-\!|\!|-)} ]] { if [[ ${#files} -eq 0 && -n ${extract##(\!-|-\!|\!|-)} ]] {
+zinit-message "{error}ERROR:{msg2} The files" \ +zi-log "{error}ERROR:{msg2} The files" \
"(\`{file}${extract##(\!-|-\!|\!|-)}{msg2}')" \ "(\`{file}${extract##(\!-|-\!|\!|-)}{msg2}')" \
"not found, cannot extract.{rst}" "not found, cannot extract.{rst}"
return 1 return 1
@ -1946,7 +1946,7 @@ zpextract() {
# Download mirrors.lst # Download mirrors.lst
# #
+zinit-message "{info}Downloading{ehi}: {obj}mirrors.lst{info}{…}{rst}" +zi-log "{info}Downloading{ehi}: {obj}mirrors.lst{info}{…}{rst}"
local mlst="$(mktemp)" local mlst="$(mktemp)"
while (( retry -- )) { while (( retry -- )) {
if ! .zinit-download-file-stdout https://cygwin.com/mirrors.lst 0 > $mlst; then if ! .zinit-download-file-stdout https://cygwin.com/mirrors.lst 0 > $mlst; then
@ -1961,7 +1961,7 @@ zpextract() {
} }
if [[ -z $mirror ]] { if [[ -z $mirror ]] {
+zinit-message "{error}Couldn't download{error}: {obj}mirrors.lst {error}." +zi-log "{error}Couldn't download{error}: {obj}mirrors.lst {error}."
return 1 return 1
} }
@ -1971,8 +1971,8 @@ zpextract() {
# Download setup.ini.bz2 # Download setup.ini.bz2
# #
+zinit-message "{info2}Selected mirror is{error}: {url}${mirror}{rst}" +zi-log "{info2}Selected mirror is{error}: {url}${mirror}{rst}"
+zinit-message "{info}Downloading{ehi}: {file}setup.ini.bz2{info}{…}{rst}" +zi-log "{info}Downloading{ehi}: {file}setup.ini.bz2{info}{…}{rst}"
local setup="$(mktemp -u)" local setup="$(mktemp -u)"
retry=3 retry=3
while (( retry -- )) { while (( retry -- )) {
@ -1983,12 +1983,12 @@ zpextract() {
command bunzip2 "$setup.bz2" 2>/dev/null command bunzip2 "$setup.bz2" 2>/dev/null
[[ -s $setup ]] && break [[ -s $setup ]] && break
mirror=${${mlist[ RANDOM % (${#mlist} + 1) ]}%%;*} mirror=${${mlist[ RANDOM % (${#mlist} + 1) ]}%%;*}
+zinit-message "{pre}Retrying{error}: {meta}#{obj}$(( 3 - $retry ))/3, {pre}with mirror{error}: {url}${mirror}{rst}" +zi-log "{pre}Retrying{error}: {meta}#{obj}$(( 3 - $retry ))/3, {pre}with mirror{error}: {url}${mirror}{rst}"
} }
local setup_contents="$(command grep -A 26 "@ $pkg\$" "$setup")" local setup_contents="$(command grep -A 26 "@ $pkg\$" "$setup")"
local urlpart=${${(S)setup_contents/(#b)*@ $pkg${nl}*install: (*)$nl*/$match[1]}%% *} local urlpart=${${(S)setup_contents/(#b)*@ $pkg${nl}*install: (*)$nl*/$match[1]}%% *}
if [[ -z $urlpart ]] { if [[ -z $urlpart ]] {
+zinit-message "{error}Couldn't find package{error}: {data2}\`{data}${pkg}{data2}'{error}.{rst}" +zi-log "{error}Couldn't find package{error}: {data2}\`{data}${pkg}{data2}'{error}.{rst}"
return 2 return 2
} }
local url=$mirror/$urlpart outfile=${TMPDIR:-${TMPDIR:-/tmp}}/${urlpart:t} local url=$mirror/$urlpart outfile=${TMPDIR:-${TMPDIR:-/tmp}}/${urlpart:t}
@ -1997,18 +1997,18 @@ zpextract() {
# Download the package # Download the package
# #
+zinit-message "{info}Downloading{ehi}: {file}${url:t}{info}{…}{rst}" +zi-log "{info}Downloading{ehi}: {file}${url:t}{info}{…}{rst}"
retry=2 retry=2
while (( retry -- )) { while (( retry -- )) {
integer retval=0 integer retval=0
if ! .zinit-download-file-stdout $url 0 1 > $outfile; then if ! .zinit-download-file-stdout $url 0 1 > $outfile; then
if ! .zinit-download-file-stdout $url 1 1 > $outfile; then if ! .zinit-download-file-stdout $url 1 1 > $outfile; then
+zinit-message "{error}Couldn't download{error}: {url}${url}{error}." +zi-log "{error}Couldn't download{error}: {url}${url}{error}."
retval=1 retval=1
mirror=${${mlist[ RANDOM % (${#mlist} + 1) ]}%%;*} mirror=${${mlist[ RANDOM % (${#mlist} + 1) ]}%%;*}
url=$mirror/$urlpart outfile=${TMPDIR:-${TMPDIR:-/tmp}}/${urlpart:t} url=$mirror/$urlpart outfile=${TMPDIR:-${TMPDIR:-/tmp}}/${urlpart:t}
if (( retry )) { if (( retry )) {
+zinit-message "{info2}Retrying, with mirror{error}: {url}${mirror}{info2}{…}{rst}" +zi-log "{info2}Retrying, with mirror{error}: {url}${mirror}{info2}{…}{rst}"
continue continue
} }
fi fi
@ -2150,7 +2150,7 @@ ${${${(M)flags:#*\#*}:+$msg}:-$msg_}
if [[ $type == snippet ]] { if [[ $type == snippet ]] {
if (( $+ICE[svn] )) { if (( $+ICE[svn] )) {
if [[ $skip_pull -eq 0 && -d $filename/.svn ]] { if [[ $skip_pull -eq 0 && -d $filename/.svn ]] {
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "{pre}reset ($msg_bit): {msg2}Resetting the repository ($msg_bit) with command: {rst}svn revert --recursive {…}/{file}$filename/.{rst} {…}" (( !OPTS[opt_-q,--quiet] )) && +zi-log "{pre}reset ($msg_bit): {msg2}Resetting the repository ($msg_bit) with command: {rst}svn revert --recursive {…}/{file}$filename/.{rst} {…}"
command svn revert --recursive $filename/. command svn revert --recursive $filename/.
} }
} else { } else {
@ -2158,9 +2158,9 @@ ${${${(M)flags:#*\#*}:+$msg}:-$msg_}
if (( !OPTS[opt_-q,--quiet] )) { if (( !OPTS[opt_-q,--quiet] )) {
if [[ -f $local_dir/$dirname/$filename ]] { if [[ -f $local_dir/$dirname/$filename ]] {
if [[ -n $option || -z $ICE[reset] ]] { if [[ -n $option || -z $ICE[reset] ]] {
+zinit-message "{pre}reset ($msg_bit):{msg2} Removing the snippet-file: {file}$filename{msg2} {…}{rst}" +zi-log "{pre}reset ($msg_bit):{msg2} Removing the snippet-file: {file}$filename{msg2} {…}{rst}"
} else { } else {
+zinit-message "{pre}reset ($msg_bit):{msg2} Removing the snippet-file: {file}$filename{msg2}," \ +zi-log "{pre}reset ($msg_bit):{msg2} Removing the snippet-file: {file}$filename{msg2}," \
"with the supplied code: {data2}$ICE[reset]{msg2} {…}{rst}" "with the supplied code: {data2}$ICE[reset]{msg2} {…}{rst}"
} }
if (( option )) { if (( option )) {
@ -2169,36 +2169,36 @@ ${${${(M)flags:#*\#*}:+$msg}:-$msg_}
eval "${ICE[reset]:-rm -f \"$local_dir/$dirname/$filename\"}" eval "${ICE[reset]:-rm -f \"$local_dir/$dirname/$filename\"}"
} }
} else { } else {
+zinit-message "{pre}reset ($msg_bit):{msg2} The file {file}$filename{msg2} is already deleted {…}{rst}" +zi-log "{pre}reset ($msg_bit):{msg2} The file {file}$filename{msg2} is already deleted {…}{rst}"
if [[ -n $ICE[reset] && ! -n $option ]] { if [[ -n $ICE[reset] && ! -n $option ]] {
+zinit-message "{pre}reset ($msg_bit):{msg2} (skipped running the provided reset-code:" \ +zi-log "{pre}reset ($msg_bit):{msg2} (skipped running the provided reset-code:" \
"{data2}$ICE[reset]{msg2}){rst}" "{data2}$ICE[reset]{msg2}){rst}"
} }
} }
} }
} else { } else {
[[ -f $local_dir/$dirname/$filename ]] && \ [[ -f $local_dir/$dirname/$filename ]] && \
+zinit-message "{pre}reset ($msg_bit): {msg2}Skipping the removal of {file}$filename{msg2}" \ +zi-log "{pre}reset ($msg_bit): {msg2}Skipping the removal of {file}$filename{msg2}" \
"as there is no new copy scheduled for download.{rst}" || \ "as there is no new copy scheduled for download.{rst}" || \
+zinit-message "{pre}reset ($msg_bit): {msg2}The file {file}$filename{msg2} is already deleted" \ +zi-log "{pre}reset ($msg_bit): {msg2}The file {file}$filename{msg2} is already deleted" \
"and {ehi}no new download is being scheduled.{rst}" "and {ehi}no new download is being scheduled.{rst}"
} }
} }
} elif [[ $type == plugin ]] { } elif [[ $type == plugin ]] {
if (( is_release && !skip_pull )) { if (( is_release && !skip_pull )) {
if (( option )) { if (( option )) {
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "{pre}reset ($msg_bit): {msg2}running: {rst}rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}/*" (( !OPTS[opt_-q,--quiet] )) && +zi-log "{pre}reset ($msg_bit): {msg2}running: {rst}rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}/*"
builtin eval command rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/"${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}"/*(ND) builtin eval command rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/"${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}"/*(ND)
} else { } else {
(( !OPTS[opt_-q,--quiet] )) && +zinit-message "{pre}reset ($msg_bit): {msg2}running: {rst}${ICE[reset]:-rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}/*}" (( !OPTS[opt_-q,--quiet] )) && +zi-log "{pre}reset ($msg_bit): {msg2}running: {rst}${ICE[reset]:-rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}/*}"
builtin eval ${ICE[reset]:-command rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/"${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}"/*(ND)} builtin eval ${ICE[reset]:-command rm -rf ${${ZINIT[PLUGINS_DIR]:#[/[:space:]]##}:-${TMPDIR:-/tmp}/xyzabc312}/"${${(M)${local_dir##${ZINIT[PLUGINS_DIR]}[/[:space:]]#}:#[^/]*}:-${TMPDIR:-/tmp}/xyzabc312-zinit-protection-triggered}"/*(ND)}
} }
} elif (( !skip_pull )) { } elif (( !skip_pull )) {
if (( option )) { if (( option )) {
+zinit-message "{pre}reset ($msg_bit): {msg2}Resetting the repository with command:{rst} git reset --hard HEAD {…}" +zi-log "{pre}reset ($msg_bit): {msg2}Resetting the repository with command:{rst} git reset --hard HEAD {…}"
command git reset --hard HEAD command git reset --hard HEAD
} else { } else {
+zinit-message "{pre}reset ($msg_bit): {msg2}Resetting the repository with command:{rst} ${ICE[reset]:-git reset --hard HEAD} {…}" +zi-log "{pre}reset ($msg_bit): {msg2}Resetting the repository with command:{rst} ${ICE[reset]:-git reset --hard HEAD} {…}"
builtin eval "${ICE[reset]:-git reset --hard HEAD}" builtin eval "${ICE[reset]:-git reset --hard HEAD}"
} }
} }
@ -2436,7 +2436,7 @@ for its found {file}meson.build{pre} input file}:-because {flag}m{pre} \
afr=( ${~from}(DN) ) afr=( ${~from}(DN) )
if (( ! ${#afr} )) { if (( ! ${#afr} )) {
+zinit-message "{warn}Warning: mv ice didn't match any file. [{error}$ICE[mv]{warn}]" \ +zi-log "{warn}Warning: mv ice didn't match any file. [{error}$ICE[mv]{warn}]" \
"{nl}{warn}Available files:{nl}{obj}$(ls -1)" "{nl}{warn}Available files:{nl}{obj}$(ls -1)"
return 1 return 1
} }
@ -2570,7 +2570,7 @@ for its found {file}meson.build{pre} input file}:-because {flag}m{pre} \
local tpe="$1" dir="${4#%}" hook="$5" subtype="$6" local tpe="$1" dir="${4#%}" hook="$5" subtype="$6"
if (( !OPTS[opt_-q,--quiet] )) { if (( !OPTS[opt_-q,--quiet] )) {
+zinit-message "Running $tpe's provided update code: {info}${ICE[ps-on-update][1,50]}${ICE[ps-on-update][51]:+…}{rst}" +zi-log "Running $tpe's provided update code: {info}${ICE[ps-on-update][1,50]}${ICE[ps-on-update][51]:+…}{rst}"
( (
builtin cd -q "$dir" || return 1 builtin cd -q "$dir" || return 1
eval "$ICE[ps-on-update]" eval "$ICE[ps-on-update]"

View file

@ -199,7 +199,7 @@
(( !${+ICE[countdown]} )) && return 0 (( !${+ICE[countdown]} )) && return 0
builtin emulate -L zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace} builtin emulate -L zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace}
trap "+zinit-message \"{ehi}ABORTING, the ice {ice}$ice{ehi} not ran{rst}\"; return 1" INT trap "+zi-log \"{ehi}ABORTING, the ice {ice}$ice{ehi} not ran{rst}\"; return 1" INT
local count=5 ice tpe="$1" local count=5 ice tpe="$1"
@ -207,14 +207,14 @@
[[ $tpe = "atpull" && $ice = "%atclone" ]] && ice="${ICE[atclone]}" [[ $tpe = "atpull" && $ice = "%atclone" ]] && ice="${ICE[atclone]}"
ice="{b}{ice}$tpe{ehi}:{rst}${ice//(#b)(\{[a-z0-9…_-]##\})/\\$match[1]}" ice="{b}{ice}$tpe{ehi}:{rst}${ice//(#b)(\{[a-z0-9…_-]##\})/\\$match[1]}"
+zinit-message -n "{hi}Running $ice{rst}{hi} ice in...{rst} " +zi-log -n "{hi}Running $ice{rst}{hi} ice in...{rst} "
while (( -- count + 1 )) { while (( -- count + 1 )) {
+zinit-message -n -- "{b}{error}"$(( count + 1 ))"{rst}{…}" +zi-log -n -- "{b}{error}"$(( count + 1 ))"{rst}{…}"
sleep 1 sleep 1
} }
+zinit-message -r -- "{b}{error}0 <running now>{rst}{…}" +zi-log -r -- "{b}{error}0 <running now>{rst}{…}"
return 0 return 0
} # ]]] } # ]]]
# FUNCTION: .zinit-exists-physically [[[ # FUNCTION: .zinit-exists-physically [[[
@ -256,10 +256,10 @@
fi fi
.zinit-any-colorify-as-uspl2 "$1" "$2" .zinit-any-colorify-as-uspl2 "$1" "$2"
+zinit-message "{error}No such (plugin or snippet){rst}: $REPLY." +zi-log "{error}No such (plugin or snippet){rst}: $REPLY."
[[ $nospec -eq 0 && $spec1 != $spec2 ]] \ [[ $nospec -eq 0 && $spec1 != $spec2 ]] \
&& +zinit-message "(expands to: {file}${spec2#%}{rst})." && +zi-log "(expands to: {file}${spec2#%}{rst})."
return 1 return 1
fi fi

View file

@ -317,7 +317,7 @@ builtin setopt noaliases
if (( ${+opts[(r)-X]} )); then if (( ${+opts[(r)-X]} )); then
.zinit-add-report "${ZINIT[CUR_USPL2]}" "Warning: Failed autoload ${(j: :)opts[@]} $*" .zinit-add-report "${ZINIT[CUR_USPL2]}" "Warning: Failed autoload ${(j: :)opts[@]} $*"
+zinit-message -u2 "{error}builtin autoload required for {obj}${(j: :)opts[@]}{error} option(s)" +zi-log -u2 "{error}builtin autoload required for {obj}${(j: :)opts[@]}{error} option(s)"
return 1 return 1
fi fi
if (( ${+opts[(r)-w]} )); then if (( ${+opts[(r)-w]} )); then
@ -351,7 +351,7 @@ builtin setopt noaliases
elif [[ $func == /* ]]; then elif [[ $func == /* ]]; then
if [[ $ZINIT[MUTE_WARNINGS] != (1|true|on|yes) && \ if [[ $ZINIT[MUTE_WARNINGS] != (1|true|on|yes) && \
-z $ZINIT[WARN_SHOWN_FOR_$ZINIT[CUR_USPL2]] ]]; then -z $ZINIT[WARN_SHOWN_FOR_$ZINIT[CUR_USPL2]] ]]; then
+zinit-message "{u-warn}Warning{b-warn}: {rst}the plugin {pid}$ZINIT[CUR_USPL2]" \ +zi-log "{u-warn}Warning{b-warn}: {rst}the plugin {pid}$ZINIT[CUR_USPL2]" \
"{rst}is using autoload functions specified by their absolute path," \ "{rst}is using autoload functions specified by their absolute path," \
"which is not supported by this Zsh version ({↔} {version}$ZSH_VERSION{rst}," \ "which is not supported by this Zsh version ({↔} {version}$ZSH_VERSION{rst}," \
"required is Zsh >= {version}5.4{rst})." \ "required is Zsh >= {version}5.4{rst})." \
@ -375,7 +375,7 @@ builtin setopt noaliases
[[ -f $pth/$func ]] && { sel=$pth; break; } [[ -f $pth/$func ]] && { sel=$pth; break; }
} }
if [[ -z $sel ]] { if [[ -z $sel ]] {
+zinit-message '{u-warn}zinit{b-warn}:{error} Couldn''t find autoload function{ehi}:' \ +zi-log '{u-warn}zinit{b-warn}:{error} Couldn''t find autoload function{ehi}:' \
"{apo}\`{file}${func}{apo}\`{error} anywhere in {var}\$fpath{error}." "{apo}\`{file}${func}{apo}\`{error} anywhere in {var}\$fpath{error}."
retval=1 retval=1
} else { } else {
@ -1101,7 +1101,7 @@ builtin setopt noaliases
ZINIT_REGISTERED_PLUGINS+=( "$uspl2" ) ZINIT_REGISTERED_PLUGINS+=( "$uspl2" )
else else
# Allow overwrite-load, however warn about it. # Allow overwrite-load, however warn about it.
[[ -z ${ZINIT[TEST]}${${+ICE[wait]}:#0}${ICE[load]}${ICE[subscribe]} && ${ZINIT[MUTE_WARNINGS]} != (1|true|on|yes) ]] && +zinit-message "{u-warn}Warning{b-warn}:{rst} plugin {apo}\`{pid}${uspl2}{apo}\`{rst} already registered, will overwrite-load." [[ -z ${ZINIT[TEST]}${${+ICE[wait]}:#0}${ICE[load]}${ICE[subscribe]} && ${ZINIT[MUTE_WARNINGS]} != (1|true|on|yes) ]] && +zi-log "{u-warn}Warning{b-warn}:{rst} plugin {apo}\`{pid}${uspl2}{apo}\`{rst} already registered, will overwrite-load."
ret=1 ret=1
fi fi
@ -1339,7 +1339,7 @@ builtin setopt noaliases
if [[ $1 == set ]]; then if [[ $1 == set ]]; then
ZINIT[___m_bkp]="${functions[m]}" ZINIT[___m_bkp]="${functions[m]}"
setopt noaliases setopt noaliases
functions[m]="${functions[+zinit-message]}" functions[m]="${functions[+zi-log]}"
setopt aliases setopt aliases
elif [[ $1 == unset ]]; then elif [[ $1 == unset ]]; then
if [[ -n ${ZINIT[___m_bkp]} ]]; then if [[ -n ${ZINIT[___m_bkp]} ]]; then
@ -1350,7 +1350,7 @@ builtin setopt noaliases
noglob unset functions[m] noglob unset functions[m]
fi fi
else else
+zinit-message "{error}ERROR #1" +zi-log "{error}ERROR #1"
return 1 return 1
fi fi
} # ]]] } # ]]]
@ -1362,7 +1362,7 @@ builtin setopt noaliases
.zinit-load-snippet() { .zinit-load-snippet() {
typeset -F 3 SECONDS=0 typeset -F 3 SECONDS=0
local -a opts local -a opts
zparseopts -E -D -a opts f -command || { +zinit-message "{u-warn}Error{b-warn}:{rst} Incorrect options (accepted ones: {opt}-f{rst}, {opt}--command{rst})."; return 1; } zparseopts -E -D -a opts f -command || { +zi-log "{u-warn}Error{b-warn}:{rst} Incorrect options (accepted ones: {opt}-f{rst}, {opt}--command{rst})."; return 1; }
local url="$1" limit="$3" local url="$1" limit="$3"
[[ -n ${ICE[teleid]} ]] && url="${ICE[teleid]}" [[ -n ${ICE[teleid]} ]] && url="${ICE[teleid]}"
# Hide arguments from sourced scripts. Without this calls our "$@" are visible as "$@" # Hide arguments from sourced scripts. Without this calls our "$@" are visible as "$@"
@ -1495,7 +1495,7 @@ builtin setopt noaliases
ZERO="${list[1-correct]}" ZERO="${list[1-correct]}"
(( ${+ICE[silent]} )) && { { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; } 2>/dev/null 1>&2; (( retval += $? )); ((1)); } || { ((1)); { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; }; (( retval += $? )); } (( ${+ICE[silent]} )) && { { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; } 2>/dev/null 1>&2; (( retval += $? )); ((1)); } || { ((1)); { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; }; (( retval += $? )); }
(( 0 == retval )) && [[ $url = PZT::* || $url = https://github.com/sorin-ionescu/prezto/* ]] && zstyle ":prezto:module:${${id_as%/init.zsh}:t}" loaded 'yes' (( 0 == retval )) && [[ $url = PZT::* || $url = https://github.com/sorin-ionescu/prezto/* ]] && zstyle ":prezto:module:${${id_as%/init.zsh}:t}" loaded 'yes'
} else { [[ ${+ICE[silent]} -eq 1 || ${+ICE[pick]} -eq 1 && -z ${ICE[pick]} || ${ICE[pick]} = /dev/null ]] || { +zinit-message "Snippet not loaded ({url}${id_as}{rst})"; retval=1; } } } else { [[ ${+ICE[silent]} -eq 1 || ${+ICE[pick]} -eq 1 && -z ${ICE[pick]} || ${ICE[pick]} = /dev/null ]] || { +zi-log "Snippet not loaded ({url}${id_as}{rst})"; retval=1; } }
[[ -n ${ICE[src]} ]] && { ZERO="${${(M)ICE[src]##/*}:-$local_dir/$dirname/${ICE[src]}}"; (( ${+ICE[silent]} )) && { { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; } 2>/dev/null 1>&2; (( retval += $? )); ((1)); } || { ((1)); { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; }; (( retval += $? )); }; } [[ -n ${ICE[src]} ]] && { ZERO="${${(M)ICE[src]##/*}:-$local_dir/$dirname/${ICE[src]}}"; (( ${+ICE[silent]} )) && { { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; } 2>/dev/null 1>&2; (( retval += $? )); ((1)); } || { ((1)); { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; }; (( retval += $? )); }; }
[[ -n ${ICE[multisrc]} ]] && { local ___oldcd="$PWD"; () { setopt localoptions noautopushd; builtin cd -q "$local_dir/$dirname"; }; eval "reply=(${ICE[multisrc]})"; () { setopt localoptions noautopushd; builtin cd -q "$___oldcd"; }; local fname; for fname in "${reply[@]}"; do ZERO="${${(M)fname:#/*}:-$local_dir/$dirname/$fname}"; (( ${+ICE[silent]} )) && { { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; } 2>/dev/null 1>&2; (( retval += $? )); ((1)); } || { ((1)); { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; }; (( retval += $? )); }; done; } [[ -n ${ICE[multisrc]} ]] && { local ___oldcd="$PWD"; () { setopt localoptions noautopushd; builtin cd -q "$local_dir/$dirname"; }; eval "reply=(${ICE[multisrc]})"; () { setopt localoptions noautopushd; builtin cd -q "$___oldcd"; }; local fname; for fname in "${reply[@]}"; do ZERO="${${(M)fname:#/*}:-$local_dir/$dirname/$fname}"; (( ${+ICE[silent]} )) && { { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; } 2>/dev/null 1>&2; (( retval += $? )); ((1)); } || { ((1)); { [[ -n $precm ]] && { builtin ${precm[@]} 'source "$ZERO"'; ((1)); } || { ((1)); builtin source "$ZERO"; }; }; (( retval += $? )); }; done; }
@ -1868,7 +1868,7 @@ builtin setopt noaliases
# Check if compinit was loaded. # Check if compinit was loaded.
if [[ ${+functions[compdef]} = 0 ]]; then if [[ ${+functions[compdef]} = 0 ]]; then
+zinit-message "{u-warn}Error{b-warn}:{rst} The {func}compinit{rst}" \ +zi-log "{u-warn}Error{b-warn}:{rst} The {func}compinit{rst}" \
"function hasn't been loaded, cannot do {it}{cmd}compdef replay{rst}." "function hasn't been loaded, cannot do {it}{cmd}compdef replay{rst}."
return 1 return 1
fi fi
@ -1880,7 +1880,7 @@ builtin setopt noaliases
# When ZINIT_COMPDEF_REPLAY empty (also when only white spaces). # When ZINIT_COMPDEF_REPLAY empty (also when only white spaces).
[[ ${#pos[@]} = 1 && -z ${pos[-1]} ]] && continue [[ ${#pos[@]} = 1 && -z ${pos[-1]} ]] && continue
pos=( "${(Q)pos[@]}" ) pos=( "${(Q)pos[@]}" )
[[ $quiet = -q ]] || +zinit-message "Running compdef: {cmd}${pos[*]}{rst}" [[ $quiet = -q ]] || +zi-log "Running compdef: {cmd}${pos[*]}{rst}"
compdef "${pos[@]}" compdef "${pos[@]}"
done done
@ -1892,7 +1892,7 @@ builtin setopt noaliases
.zinit-compdef-clear() { .zinit-compdef-clear() {
local quiet="$1" count="${#ZINIT_COMPDEF_REPLAY}" local quiet="$1" count="${#ZINIT_COMPDEF_REPLAY}"
ZINIT_COMPDEF_REPLAY=( ) ZINIT_COMPDEF_REPLAY=( )
[[ $quiet = -q ]] || +zinit-message "Compdef-replay cleared (it had {num}${count}{rst} entries)." [[ $quiet = -q ]] || +zi-log "Compdef-replay cleared (it had {num}${count}{rst} entries)."
} # ]]] } # ]]]
# FUNCTION: .zinit-add-report [[[ # FUNCTION: .zinit-add-report [[[
@ -1927,7 +1927,7 @@ builtin setopt noaliases
.zinit-run() { .zinit-run() {
if [[ $1 = (-l|--last) ]]; then if [[ $1 = (-l|--last) ]]; then
{ set -- "${ZINIT[last-run-plugin]:-$(<${ZINIT[BIN_DIR]}/last-run-object.txt)}" "${@[2-correct,-1]}"; } &>/dev/null { set -- "${ZINIT[last-run-plugin]:-$(<${ZINIT[BIN_DIR]}/last-run-object.txt)}" "${@[2-correct,-1]}"; } &>/dev/null
[[ -z $1 ]] && { +zinit-message "{u-warn}Error{b-warn}:{rst} No recent plugin-ID saved on the disk yet, please specify" \ [[ -z $1 ]] && { +zi-log "{u-warn}Error{b-warn}:{rst} No recent plugin-ID saved on the disk yet, please specify" \
"it as the first argument, i.e.{ehi}: {cmd}zi run {pid}usr/plg{slight} {…}the code to run{…} "; return 1; } "it as the first argument, i.e.{ehi}: {cmd}zi run {pid}usr/plg{slight} {…}the code to run{…} "; return 1; }
else else
integer ___nolast=1 integer ___nolast=1
@ -1947,7 +1947,7 @@ builtin setopt noaliases
eval "${@[2-correct,-1]}" eval "${@[2-correct,-1]}"
() { setopt localoptions noautopushd; builtin cd -q "$___oldpwd"; } () { setopt localoptions noautopushd; builtin cd -q "$___oldpwd"; }
else else
+zinit-message "{u-warn}Error{b-warn}:{rst} no such plugin or snippet." +zi-log "{u-warn}Error{b-warn}:{rst} no such plugin or snippet."
fi fi
} # ]]] } # ]]]
@ -2156,9 +2156,9 @@ builtin setopt noaliases
# REPLY+="x(${3}…)" # REPLY+="x(${3}…)"
} # ]]] } # ]]]
# FUNCTION: +zinit-message [[[ # FUNCTION: +zi-log [[[
# Logging function # Logging function
+zinit-message() { +zi-log() {
builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace} builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace}
local opt msg local opt msg
[[ $1 = -* ]] && { local opt=$1; shift; } [[ $1 = -* ]] && { local opt=$1; shift; }
@ -2189,10 +2189,10 @@ $match[7]}:-${ZINIT[__last-formatter-code]}}}:+}}}//←→}
print -n $'\015' print -n $'\015'
fi fi
} # ]]] } # ]]]
# FUNCTION: +zi-log [[[ # FUNCTION: +zinit-message [[[
# Wrapper function for +zinit-message until migrated to +zi-log # Wrapper function to maintain backward compatibility
+zi-log(){ +zinit-message(){
+zinit-message $@ +zi-log $@
} # ]]] } # ]]]
# FUNCTION: +zinit-prehelp-usage-message [[[ # FUNCTION: +zinit-prehelp-usage-message [[[
@ -2204,7 +2204,7 @@ $match[7]}:-${ZINIT[__last-formatter-code]}}}:+}}}//←→}
# -h/--help given? # -h/--help given?
if (( OPTS[opt_-h,--help] )) { if (( OPTS[opt_-h,--help] )) {
# Yes a help message: # Yes a help message:
+zinit-message "{lhi}HELP FOR {apo}\`{cmd}$cmd{apo}\`{lhi} subcommand {mdsh}" \ +zi-log "{lhi}HELP FOR {apo}\`{cmd}$cmd{apo}\`{lhi} subcommand {mdsh}" \
"the available {b-lhi}options{ehi}:{rst}" "the available {b-lhi}options{ehi}:{rst}"
local opt local opt
for opt ( ${(kos:|:)allowed} ) { for opt ( ${(kos:|:)allowed} ) {
@ -2214,13 +2214,13 @@ $match[7]}:-${ZINIT[__last-formatter-code]}}}:+}}}//←→}
msg=${${(MS)msg##$cmd:\[[^]]##}:-${(MS)msg##\*:\[[^]]##}} msg=${${(MS)msg##$cmd:\[[^]]##}:-${(MS)msg##\*:\[[^]]##}}
msg=${msg#($cmd|\*):\[} msg=${msg#($cmd|\*):\[}
} }
local pre_msg=`+zinit-message -n {opt}${(r:14:)${txt#opt_}}` local pre_msg=`+zi-log -n {opt}${(r:14:)${txt#opt_}}`
+zinit-message ${(r:35:: :)pre_msg}{rst}{ehi}{rst}"  $msg" +zi-log ${(r:35:: :)pre_msg}{rst}{ehi}{rst}"  $msg"
} }
} elif [[ -n $allowed ]] { } elif [[ -n $allowed ]] {
shift 2 shift 2
# No an error message: # No an error message:
+zinit-message "{b}{u-warn}ERROR{b-warn}:{rst}{msg2} Incorrect options given{ehi}:" \ +zi-log "{b}{u-warn}ERROR{b-warn}:{rst}{msg2} Incorrect options given{ehi}:" \
"${(Mpj:$sep:)@:#-*}{rst}{msg2}. Allowed for the subcommand{ehi}:{rst}" \ "${(Mpj:$sep:)@:#-*}{rst}{msg2}. Allowed for the subcommand{ehi}:{rst}" \
"{apo}\`{cmd}$cmd{apo}\`{msg2} are{ehi}:{rst}" \ "{apo}\`{cmd}$cmd{apo}\`{msg2} are{ehi}:{rst}" \
"{nl}{mmdsh} {opt}${allowed//\|/$sep2}{msg2}." \ "{nl}{mmdsh} {opt}${allowed//\|/$sep2}{msg2}." \
@ -2229,7 +2229,7 @@ $match[7]}:-${ZINIT[__last-formatter-code]}}}:+}}}//←→}
local -a cmds local -a cmds
cmds=( load snippet update delete ) cmds=( load snippet update delete )
local bcol="{$cmd}" sep="${ZINIT[col-rst]}${ZINIT[col-$cmd]}\`, \`${ZINIT[col-cmd]}" local bcol="{$cmd}" sep="${ZINIT[col-rst]}${ZINIT[col-$cmd]}\`, \`${ZINIT[col-cmd]}"
+zinit-message "$bcol(it should be one of, e.g.{ehi}:" \ +zi-log "$bcol(it should be one of, e.g.{ehi}:" \
"{nb}$bcol\`{cmd}${(pj:$sep:)cmds}$bcol\`," \ "{nb}$bcol\`{cmd}${(pj:$sep:)cmds}$bcol\`," \
"{cmd}{…}$bcol, e.g.{ehi}: {nb}$bcol\`{lhi}zinit {b}{cmd}load" \ "{cmd}{…}$bcol, e.g.{ehi}: {nb}$bcol\`{lhi}zinit {b}{cmd}load" \
"{pid}username/reponame$bcol\`) or a {b}{hi}for{nb}$bcol-based" \ "{pid}username/reponame$bcol\`) or a {b}{hi}for{nb}$bcol-based" \
@ -2634,7 +2634,7 @@ cdclear) ]]; then
1="${1:+@}${1#@}${2:+/$2}" 1="${1:+@}${1#@}${2:+/$2}"
(( $# > 1 )) && { shift -p $(( $# - 1 )); } (( $# > 1 )) && { shift -p $(( $# - 1 )); }
[[ -z $1 ]] && { [[ -z $1 ]] && {
+zinit-message "Argument needed, try: {cmd}help." +zi-log "Argument needed, try: {cmd}help."
return 1 return 1
} }
} else { } else {
@ -2643,7 +2643,7 @@ cdclear) ]]; then
local ___last_ice=${@[___retval2]} local ___last_ice=${@[___retval2]}
shift ___retval2 shift ___retval2
if [[ $# -gt 0 && $1 != for ]] { if [[ $# -gt 0 && $1 != for ]] {
+zinit-message -n "{b}{u-warn}ERROR{b-warn}:{rst} Unknown subcommand{ehi}:" \ +zi-log -n "{b}{u-warn}ERROR{b-warn}:{rst} Unknown subcommand{ehi}:" \
"{apo}\`{cmd}$1{apo}\`{rst} " "{apo}\`{cmd}$1{apo}\`{rst} "
+zinit-prehelp-usage-message rst +zinit-prehelp-usage-message rst
return 1 return 1
@ -2670,7 +2670,7 @@ cdclear) ]]; then
ICE=( "${___ices[@]}" "${(kv)ZINIT_ICES[@]}" ) ICE=( "${___ices[@]}" "${(kv)ZINIT_ICES[@]}" )
ZINIT_ICE=( "${(kv)ICE[@]}" ) ZINIT_ICES=() ZINIT_ICE=( "${(kv)ICE[@]}" ) ZINIT_ICES=()
integer ___msgs=${+ICE[debug]} integer ___msgs=${+ICE[debug]}
(( ___msgs )) && +zinit-message "{pre}zinit-main:{faint} Processing {pname}$1{faint}{…}{rst}" (( ___msgs )) && +zi-log "{pre}zinit-main:{faint} Processing {pname}$1{faint}{…}{rst}"
# Delete up to the final space to get the previously-processed ID. # Delete up to the final space to get the previously-processed ID.
ZINIT[annex-exposed-processed-IDs]+="${___id:+ $___id}" ZINIT[annex-exposed-processed-IDs]+="${___id:+ $___id}"
@ -2738,7 +2738,7 @@ cdclear) ]]; then
(( 0 == ${#___new_ices} % 2 )) && \ (( 0 == ${#___new_ices} % 2 )) && \
___ices=( "${___new_ices[@]}" ) || \ ___ices=( "${___new_ices[@]}" ) || \
{ [[ ${ZINIT[MUTE_WARNINGS]} != (1|true|on|yes) ]] && \ { [[ ${ZINIT[MUTE_WARNINGS]} != (1|true|on|yes) ]] && \
+zinit-message "{u-warn}Warning{b-warn}:{msg} Bad new-ices returned" \ +zi-log "{u-warn}Warning{b-warn}:{msg} Bad new-ices returned" \
"from the annex{ehi}:{rst} {annex}${___arr[3]}{msg}," \ "from the annex{ehi}:{rst} {annex}${___arr[3]}{msg}," \
"please file an issue report at:{url}" \ "please file an issue report at:{url}" \
"https://github.com/zdharma-continuum/${___arr[3]}/issues/new{msg}.{rst}" "https://github.com/zdharma-continuum/${___arr[3]}/issues/new{msg}.{rst}"
@ -2852,14 +2852,14 @@ cdclear) ]]; then
if (( ___error )) { if (( ___error )) {
() { () {
builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace} builtin emulate -LR zsh -o extendedglob ${=${options[xtrace]:#off}:+-o xtrace}
+zinit-message -n "{u-warn}Error{b-warn}:{rst} No plugin or snippet ID given" +zi-log -n "{u-warn}Error{b-warn}:{rst} No plugin or snippet ID given"
if [[ -n $___last_ice ]] { if [[ -n $___last_ice ]] {
+zinit-message -n " (the last recognized ice was: {ice}"\ +zi-log -n " (the last recognized ice was: {ice}"\
"${___last_ice/(#m)(${~ZINIT[ice-list]})/"{data}$MATCH"}{apo}''{rst}).{error} "${___last_ice/(#m)(${~ZINIT[ice-list]})/"{data}$MATCH"}{apo}''{rst}).{error}
You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice is in fact a plugin.{rst} You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice is in fact a plugin.{rst}
{note}Note:{rst} The {apo}\`{ice}ice{apo}\`{rst} subcommand is now again required if not using the for-syntax" {note}Note:{rst} The {apo}\`{ice}ice{apo}\`{rst} subcommand is now again required if not using the for-syntax"
} }
+zinit-message "." +zi-log "."
} }
return 2 return 2
} elif (( ! $# )) { } elif (( ! $# )) {
@ -2895,11 +2895,11 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
if (( $# == 0 )) { if (( $# == 0 )) {
ZINIT[ENV-WHITELIST]= ZINIT[ENV-WHITELIST]=
(( OPTS[opt_-v,--verbose] )) && +zinit-message "{msg2}Cleared the parameter whitelist.{rst}" (( OPTS[opt_-v,--verbose] )) && +zi-log "{msg2}Cleared the parameter whitelist.{rst}"
} else { } else {
ZINIT[ENV-WHITELIST]+="${(j: :)${(q-kv)@}} " ZINIT[ENV-WHITELIST]+="${(j: :)${(q-kv)@}} "
local ___sep="$ZINIT[col-msg2], $ZINIT[col-data2]" local ___sep="$ZINIT[col-msg2], $ZINIT[col-data2]"
(( OPTS[opt_-v,--verbose] )) && +zinit-message "{msg2}Extended the parameter whitelist with: {data2}${(pj:$___sep:)@}{msg2}.{rst}" (( OPTS[opt_-v,--verbose] )) && +zi-log "{msg2}Extended the parameter whitelist with: {data2}${(pj:$___sep:)@}{msg2}.{rst}"
} }
;; ;;
(*) (*)
@ -2909,7 +2909,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
reply=( "${(Q)${(z@)reply[1]}[@]}" ) reply=( "${(Q)${(z@)reply[1]}[@]}" )
(( ${+functions[${reply[5]}]} )) && \ (( ${+functions[${reply[5]}]} )) && \
{ "${reply[5]}" "$@"; return $?; } || \ { "${reply[5]}" "$@"; return $?; } || \
{ +zinit-message "({error}Couldn't find the subcommand-handler \`{obj}${reply[5]}{error}' of the z-annex \`{file}${reply[3]}{error}')"; return 1; } { +zi-log "({error}Couldn't find the subcommand-handler \`{obj}${reply[5]}{error}' of the z-annex \`{file}${reply[3]}{error}')"; return 1; }
} }
(( ${+functions[.zinit-confirm]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-autoload.zsh" || return 1 (( ${+functions[.zinit-confirm]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-autoload.zsh" || return 1
case "$1" in case "$1" in
@ -2998,7 +2998,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
if .zinit-cdisable "$___f"; then if .zinit-cdisable "$___f"; then
(( ${+functions[.zinit-forget-completion]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1 (( ${+functions[.zinit-forget-completion]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1
.zinit-forget-completion "$___f" .zinit-forget-completion "$___f"
+zinit-message "Initializing completion system ({func}compinit{rst}){…}" +zi-log "Initializing completion system ({func}compinit{rst}){…}"
builtin autoload -Uz compinit builtin autoload -Uz compinit
compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}" compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}"
else else
@ -3016,7 +3016,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
if .zinit-cenable "$___f"; then if .zinit-cenable "$___f"; then
(( ${+functions[.zinit-forget-completion]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1 (( ${+functions[.zinit-forget-completion]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1
.zinit-forget-completion "$___f" .zinit-forget-completion "$___f"
+zinit-message "Initializing completion system ({func}compinit{rst}){…}" +zi-log "Initializing completion system ({func}compinit{rst}){…}"
builtin autoload -Uz compinit builtin autoload -Uz compinit
compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}" compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}"
else else
@ -3029,7 +3029,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
# Installs completions for plugin. Enables them all. It is a reinstallation, thus every obstacle gets overwritten or removed. # Installs completions for plugin. Enables them all. It is a reinstallation, thus every obstacle gets overwritten or removed.
[[ $2 = -[qQ] ]] && { 5=$2; shift; } [[ $2 = -[qQ] ]] && { 5=$2; shift; }
.zinit-install-completions "${2%%(///|//|/)}" "${3%%(///|//|/)}" 1 "${(M)4:#-[qQ]}"; ___retval=$? .zinit-install-completions "${2%%(///|//|/)}" "${3%%(///|//|/)}" 1 "${(M)4:#-[qQ]}"; ___retval=$?
[[ -z ${(M)4:#-[qQ]} ]] && +zinit-message "Initializing completion ({func}compinit{rst}){…}" [[ -z ${(M)4:#-[qQ]} ]] && +zi-log "Initializing completion ({func}compinit{rst}){…}"
builtin autoload -Uz compinit builtin autoload -Uz compinit
compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}" compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}"
;; ;;
@ -3040,7 +3040,7 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
(( ${+functions[.zinit-forget-completion]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1 (( ${+functions[.zinit-forget-completion]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-install.zsh" || return 1
# Uninstalls completions for plugin. # Uninstalls completions for plugin.
.zinit-uninstall-completions "${2%%(///|//|/)}" "${3%%(///|//|/)}"; ___retval=$? .zinit-uninstall-completions "${2%%(///|//|/)}" "${3%%(///|//|/)}"; ___retval=$?
+zinit-message "Initializing completion ({func}compinit{rst}){…}" +zi-log "Initializing completion ({func}compinit{rst}){…}"
builtin autoload -Uz compinit builtin autoload -Uz compinit
compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}" compinit -d ${ZINIT[ZCOMPDUMP_PATH]:-${ZDOTDIR:-$HOME}/.zcompdump} "${(Q@)${(z@)ZINIT[COMPINIT_OPTS]}}"
fi fi
@ -3109,10 +3109,10 @@ You can try to prepend {apo}${___q}{lhi}@{apo}'{error} to the ID if the last ice
;; ;;
(*) (*)
if [[ -z $1 ]] { if [[ -z $1 ]] {
+zinit-message -n "{b}{u-warn}ERROR{b-warn}:{rst} Missing a {cmd}subcommand " +zi-log -n "{b}{u-warn}ERROR{b-warn}:{rst} Missing a {cmd}subcommand "
+zinit-prehelp-usage-message rst +zinit-prehelp-usage-message rst
} else { } else {
+zinit-message -n "{b}{u-warn}ERROR{b-warn}:{rst} Unknown subcommand{ehi}:{rst}" \ +zi-log -n "{b}{u-warn}ERROR{b-warn}:{rst} Unknown subcommand{ehi}:{rst}" \
"{apo}\`{error}$1{apo}\`{rst} " "{apo}\`{error}$1{apo}\`{rst} "
+zinit-prehelp-usage-message rst +zinit-prehelp-usage-message rst
} }
@ -3236,13 +3236,13 @@ if [[ -e ${${ZINIT[BIN_DIR]}}/zmodules/Src/zdharma/zplugin.so ]] {
[[ -e ${${ZINIT[BIN_DIR]}}/module/RECOMPILE_REQUEST ]] && local recompile_request_ts="$(<${${ZINIT[BIN_DIR]}}/module/RECOMPILE_REQUEST)" [[ -e ${${ZINIT[BIN_DIR]}}/module/RECOMPILE_REQUEST ]] && local recompile_request_ts="$(<${${ZINIT[BIN_DIR]}}/module/RECOMPILE_REQUEST)"
if [[ ${recompile_request_ts:-1} -gt ${compiled_at_ts:-0} ]] { if [[ ${recompile_request_ts:-1} -gt ${compiled_at_ts:-0} ]] {
+zinit-message "{u-warn}WARNING{b-warn}:{rst}{msg} A {lhi}recompilation{rst}" \ +zi-log "{u-warn}WARNING{b-warn}:{rst}{msg} A {lhi}recompilation{rst}" \
"of the Zinit module has been requested… {hi}Building{rst}…" "of the Zinit module has been requested… {hi}Building{rst}…"
(( ${+functions[.zinit-confirm]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-autoload.zsh" || return 1 (( ${+functions[.zinit-confirm]} )) || builtin source "${ZINIT[BIN_DIR]}/zinit-autoload.zsh" || return 1
command make -C "${ZINIT[BIN_DIR]}/zmodules" distclean &>/dev/null command make -C "${ZINIT[BIN_DIR]}/zmodules" distclean &>/dev/null
.zinit-module build &>/dev/null .zinit-module build &>/dev/null
if command make -C "${ZINIT[BIN_DIR]}/zmodules" &>/dev/null; then if command make -C "${ZINIT[BIN_DIR]}/zmodules" &>/dev/null; then
+zinit-message "{ok}Build successful!{rst}" +zi-log "{ok}Build successful!{rst}"
else else
builtin print -r -- "${ZINIT[col-error]}Compilation failed.${ZINIT[col-rst]}" \ builtin print -r -- "${ZINIT[col-error]}Compilation failed.${ZINIT[col-rst]}" \
"${ZINIT[col-pre]}You can enter the following command:${ZINIT[col-rst]}" \ "${ZINIT[col-pre]}You can enter the following command:${ZINIT[col-rst]}" \