v1.11.0
This commit is contained in:
parent
e54958b91c
commit
281cde57f7
5 changed files with 39 additions and 8 deletions
10
CHANGELOG.md
10
CHANGELOG.md
|
@ -9,6 +9,16 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
_No unreleased changes._
|
||||
|
||||
## [1.11.0] - 2022-12-18
|
||||
|
||||
### Added
|
||||
|
||||
- `--if` option to `zmodule` that will only initialize the module root if the
|
||||
specified test returns a zero exit status. The test is evaluated at every new
|
||||
terminal startup.
|
||||
- Ability to customize the .zimrc file name and path with the `ZIM_CONFIG_FILE`
|
||||
environment variable.
|
||||
|
||||
## [1.10.0] - 2022-09-27
|
||||
|
||||
### Added
|
||||
|
|
27
README.md
27
README.md
|
@ -222,15 +222,16 @@ Below are some usage examples:
|
|||
<pre>Usage: <b>zmodule</b> <url> [<b>-n</b>|<b>--name</b> <module_name>] [<b>-r</b>|<b>--root</b> <path>] [options]
|
||||
|
||||
Add <b>zmodule</b> calls to your <b>~/.zimrc</b> file to define the modules to be initialized. The initiali-
|
||||
zation will be done in the same order it's defined.
|
||||
zation will be done in the same order it's defined.
|
||||
|
||||
<url> Module absolute path or repository URL. The following URL formats
|
||||
are equivalent: <b>foo</b>, <b>zimfw/foo</b>, <b>https://github.com/zimfw/foo.git</b>.
|
||||
If an absolute path is given, the module is considered externally
|
||||
installed, and won't be installed or updated by zimfw.
|
||||
<b>-n</b>|<b>--name</b> <module_name> Set a custom module name. Use slashes inside the name to organize
|
||||
the module into subdirectories. The module will be installed at
|
||||
<b>${ZIM_HOME}/</b><module_name>. Default: the last component in <url>.
|
||||
<b>-n</b>|<b>--name</b> <module_name> Set a custom module name. Default: the last component in <url>.
|
||||
Slashes can be used inside the name to organize the module into
|
||||
subdirectories. The module will be installed at
|
||||
<b>${ZIM_HOME}/</b><module_name>.
|
||||
<b>-r</b>|<b>--root</b> <path> Relative path to the module root.
|
||||
|
||||
Per-module options:
|
||||
|
@ -252,6 +253,8 @@ Per-module options:
|
|||
Modules are uniquely identified by their name.
|
||||
|
||||
Per-module-root options:
|
||||
<b>--if</b> <test> Will only initialize module root if specified test returns a zero
|
||||
exit status. The test is evaluated at every new terminal startup.
|
||||
<b>--on-pull</b> <command> Execute command after installing or updating the module. The com-
|
||||
mand is executed in the module root directory.
|
||||
<b>-d</b>|<b>--disabled</b> Don't initialize the module root or uninstall the module.
|
||||
|
@ -268,7 +271,9 @@ Per-call initialization options:
|
|||
<b>-s</b>|<b>--source</b> <file_path> Will source specified file. The path is relative to the module
|
||||
root directory. Default: <b>init.zsh</b>, if a non-empty <b>functions</b> sub-
|
||||
directory exists, else the largest of the files matching the glob
|
||||
<b>(init.zsh|</b><root_tail><b>.(zsh|plugin.zsh|zsh-theme|sh))</b>, if any.
|
||||
<b>(init.zsh|</b><name><b>.(zsh|plugin.zsh|zsh-theme|sh))</b>, if any.
|
||||
<name> in the glob is resolved to the last component of the mod-
|
||||
ule name, or the last component of the path to the module root.
|
||||
<b>-c</b>|<b>--cmd</b> <command> Will execute specified command. Occurrences of the <b>{}</b> placeholder
|
||||
in the command are substituted by the module root directory path.
|
||||
I.e., <b>-s 'foo.zsh'</b> and <b>-c 'source {}/foo.zsh'</b> are equivalent.
|
||||
|
@ -293,6 +298,18 @@ The Zim plugin manager:
|
|||
|
||||
Settings
|
||||
--------
|
||||
Customize path of the directory used by Zim with the `ZIM_HOME` environment
|
||||
variable:
|
||||
|
||||
ZIM_HOME=~/.zim
|
||||
|
||||
By default, the `zimfw` plugin manager configuration file must be at `~/.zimrc`,
|
||||
if the `ZDOTDIR` environment variable is not defined. Otherwise, it must be at
|
||||
`${ZDOTDIR}/.zimrc`. You can customize its full path and name with the
|
||||
`ZIM_CONFIG_FILE` environment variable:
|
||||
|
||||
ZIM_CONFIG_FILE=~/.config/zsh/zimrc
|
||||
|
||||
Modules are installed using `git` by default. If you don't have `git`
|
||||
installed, or if you want to take advantage of our degit tool for faster and
|
||||
lighter module installations, you can set degit as the default tool with:
|
||||
|
|
|
@ -34,6 +34,8 @@ Per-module options:
|
|||
Modules are uniquely identified by their name.
|
||||
|
||||
Per-module-root options:
|
||||
%B--if%b <test> Will only initialize module root if specified test returns a zero
|
||||
exit status. The test is evaluated at every new terminal startup.
|
||||
%B--on-pull%b <command> Execute command after installing or updating the module. The com-
|
||||
mand is executed in the module root directory.
|
||||
%B-d%b|%B--disabled%b Don't initialize the module root or uninstall the module.
|
||||
|
|
|
@ -4,7 +4,7 @@ class Zim
|
|||
:clear_line, :ellipsis, :okay, :warn, :error, :done, :failed
|
||||
|
||||
def initialize
|
||||
@version = "1.11.0-SNAPSHOT"
|
||||
@version = "1.11.0"
|
||||
@home = "${ZDOTDIR:-${HOME}}"
|
||||
@min_zsh_version = "5.2"
|
||||
# Matches {ssh,http,https,git}://{user@,}host/org/repo and {user@,}host:org/repo
|
||||
|
|
|
@ -148,6 +148,8 @@ Per-module options:
|
|||
Modules are uniquely identified by their name.
|
||||
|
||||
Per-module-root options:
|
||||
%B--if%b <test> Will only initialize module root if specified test returns a zero
|
||||
exit status. The test is evaluated at every new terminal startup.
|
||||
%B--on-pull%b <command> Execute command after installing or updating the module. The com-
|
||||
mand is executed in the module root directory.
|
||||
%B-d%b|%B--disabled%b Don't initialize the module root or uninstall the module.
|
||||
|
@ -455,7 +457,7 @@ _zimfw_compile() {
|
|||
}
|
||||
|
||||
_zimfw_info() {
|
||||
print -R 'zimfw version: '${_zversion}' (built at 2022-10-24 00:21:20 UTC, previous commit is 3959a7f)'
|
||||
print -R 'zimfw version: '${_zversion}' (built at 2022-12-18 21:05:25 UTC, previous commit is e54958b)'
|
||||
print -R 'OSTYPE: '${OSTYPE}
|
||||
print -R 'TERM: '${TERM}
|
||||
print -R 'TERM_PROGRAM: '${TERM_PROGRAM}
|
||||
|
@ -842,7 +844,7 @@ esac
|
|||
|
||||
zimfw() {
|
||||
builtin emulate -L zsh -o EXTENDED_GLOB
|
||||
local -r _zversion='1.11.0-SNAPSHOT' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
|
||||
local -r _zversion='1.11.0' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
|
||||
|
||||
Actions:
|
||||
%Bbuild%b Build %B${ZIM_HOME}/init.zsh%b and %B${ZIM_HOME}/login_init.zsh%b.
|
||||
|
|
Loading…
Reference in a new issue