v1.6.0
This commit is contained in:
parent
4259e64d22
commit
d7229bb6bc
6 changed files with 62 additions and 11 deletions
11
CHANGELOG.md
11
CHANGELOG.md
|
@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
|
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
|
_No unreleased changes._
|
||||||
|
|
||||||
|
## [1.6.0] - 2021-11-06
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
- `list` action. Using it with `-v` also shows the current details for all
|
- `list` action. Using it with `-v` also shows the current details for all
|
||||||
modules.
|
modules.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
- Be quieter and don't output warnings when `-q` is provided.
|
- Be quieter and don't output warnings when `-q` is provided.
|
||||||
|
- Be more verbose when `-v` is provided: show skipped external and frozen
|
||||||
|
modules with the install and update actions.
|
||||||
|
- Show warning instead of error when module was not installed with the tool
|
||||||
|
currently in use.
|
||||||
- Manually setting any `zmodule` initialization option will disable all the
|
- Manually setting any `zmodule` initialization option will disable all the
|
||||||
default values from the other initialization options, so only user-provided
|
default values from the other initialization options, so only user-provided
|
||||||
values are used in this case. I.e. it's either all automatic, or all manual.
|
values are used in this case. I.e. it's either all automatic, or all manual.
|
||||||
|
@ -206,7 +214,8 @@ Take your time to review the updated [README.md] and the changes listed below.
|
||||||
[termtitle]: https://github.com/zimfw/termtitle
|
[termtitle]: https://github.com/zimfw/termtitle
|
||||||
[s1ck94]: https://github.com/zimfw/s1ck94
|
[s1ck94]: https://github.com/zimfw/s1ck94
|
||||||
|
|
||||||
[Unreleased]: https://github.com/zimfw/zimfw/compare/v1.5.0...HEAD
|
[Unreleased]: https://github.com/zimfw/zimfw/compare/v1.6.0...HEAD
|
||||||
|
[1.6.0]: https://github.com/zimfw/zimfw/compare/v1.5.0...v1.6.0
|
||||||
[1.5.0]: https://github.com/zimfw/zimfw/compare/v1.4.3...v1.5.0
|
[1.5.0]: https://github.com/zimfw/zimfw/compare/v1.4.3...v1.5.0
|
||||||
[1.4.3]: https://github.com/zimfw/zimfw/compare/v1.4.2...v1.4.3
|
[1.4.3]: https://github.com/zimfw/zimfw/compare/v1.4.2...v1.4.3
|
||||||
[1.4.2]: https://github.com/zimfw/zimfw/compare/v1.4.1...v1.4.2
|
[1.4.2]: https://github.com/zimfw/zimfw/compare/v1.4.1...v1.4.2
|
||||||
|
|
42
README.md
42
README.md
|
@ -33,7 +33,7 @@ To preview some of the available themes, check the [themes page][themes].
|
||||||
### Degit
|
### Degit
|
||||||
|
|
||||||
Install modules without requiring `git` using our degit tool. It's faster and
|
Install modules without requiring `git` using our degit tool. It's faster and
|
||||||
lighter. See the [zmodule](#zmodule) usage below.
|
lighter than `git`. See the [zmodule](#zmodule-usage) usage below.
|
||||||
|
|
||||||
Installation
|
Installation
|
||||||
------------
|
------------
|
||||||
|
@ -78,8 +78,41 @@ you can add to your `~/.zimrc`.
|
||||||
Usage
|
Usage
|
||||||
-----
|
-----
|
||||||
|
|
||||||
|
Add `zmodule` calls to your `~/.zimrc` file to define the modules to be
|
||||||
|
initialized, then run `zimfw install` to install them.
|
||||||
|
|
||||||
### zmodule
|
### zmodule
|
||||||
|
|
||||||
|
Below are some usage examples.
|
||||||
|
|
||||||
|
A module from the [zimfw] organization: `zmodule archive`
|
||||||
|
|
||||||
|
A module from another GitHub organization: `zmodule StackExchange/blackbox`
|
||||||
|
|
||||||
|
A module not from GitHub: `zmodule https://gitlab.com/Spriithy/basher.git`
|
||||||
|
|
||||||
|
A module at an absolute path, that is already installed:
|
||||||
|
`zmodule /usr/local/share/zsh-autosuggestions`
|
||||||
|
|
||||||
|
A module with a custom fpath: `zmodule zsh-users/zsh-completions --fpath src`
|
||||||
|
|
||||||
|
A module with a custom initialization file name:
|
||||||
|
`zmodule spaceship-prompt/spaceship-prompt --source spaceship.zsh` or
|
||||||
|
`zmodule spaceship-prompt/spaceship-prompt --name spaceship`
|
||||||
|
|
||||||
|
A module with two custom initialization files:
|
||||||
|
`zmodule sindresorhus/pure --source async.zsh --source pure.zsh`
|
||||||
|
|
||||||
|
A module with custom initialization commands:
|
||||||
|
`zmodule skywind3000/z.lua --cmd 'export _ZL_HYPHEN=1' --cmd 'eval "$(lua {}/z.lua --init zsh enhanced once)"'`
|
||||||
|
|
||||||
|
A module with a big git repository: `zmodule romkatv/powerlevel10k --use degit`
|
||||||
|
<!-- As of 2021-11-06, the complete repo had 83M and took 1m59s to be cloned,
|
||||||
|
and the degit'ed module had 2.9M and took 3s to be installed. -->
|
||||||
|
|
||||||
|
<details id="zmodule-usage">
|
||||||
|
<summary>Want help with the complete <code>zmodule</code> usage?</summary>
|
||||||
|
|
||||||
<pre>Usage: <b>zmodule</b> <url> [<b>-n</b>|<b>--name</b> <module_name>] [options]
|
<pre>Usage: <b>zmodule</b> <url> [<b>-n</b>|<b>--name</b> <module_name>] [options]
|
||||||
|
|
||||||
Add <b>zmodule</b> calls to your <b>~/.zimrc</b> file to define the modules to be initialized. The modules are
|
Add <b>zmodule</b> calls to your <b>~/.zimrc</b> file to define the modules to be initialized. The modules are
|
||||||
|
@ -118,8 +151,14 @@ Initialization options:
|
||||||
command are substituted by the module root directory path.
|
command are substituted by the module root directory path.
|
||||||
I.e., <b>-s 'script.zsh'</b> and <b>-c 'source {}/script.zsh'</b> are equivalent.
|
I.e., <b>-s 'script.zsh'</b> and <b>-c 'source {}/script.zsh'</b> are equivalent.
|
||||||
<b>-d</b>|<b>--disabled</b> Don't initialize or uninstall the module.
|
<b>-d</b>|<b>--disabled</b> Don't initialize or uninstall the module.
|
||||||
|
|
||||||
|
Setting any initialization option above will disable all the default values from the other ini-
|
||||||
|
tialization options, so only your provided values are used. I.e. these values are either all
|
||||||
|
automatic, or all manual.
|
||||||
</pre>
|
</pre>
|
||||||
|
|
||||||
|
</details>
|
||||||
|
|
||||||
### zimfw
|
### zimfw
|
||||||
|
|
||||||
Added new modules to `~/.zimrc`? Run `zimfw install`.
|
Added new modules to `~/.zimrc`? Run `zimfw install`.
|
||||||
|
@ -155,3 +194,4 @@ remove the initialization lines from your `~/.zshenv`, `~/.zshrc` and `~/.zlogin
|
||||||
[blazing speed]: https://github.com/zimfw/zimfw/wiki/Speed
|
[blazing speed]: https://github.com/zimfw/zimfw/wiki/Speed
|
||||||
[modules]: https://zimfw.sh/docs/modules/
|
[modules]: https://zimfw.sh/docs/modules/
|
||||||
[themes]: https://zimfw.sh/docs/themes/
|
[themes]: https://zimfw.sh/docs/themes/
|
||||||
|
[zimfw]: https://github.com/zimfw
|
||||||
|
|
|
@ -11,9 +11,11 @@ Actions:
|
||||||
%Bhelp%b Print this help.
|
%Bhelp%b Print this help.
|
||||||
%Binfo%b Print Zim and system info.
|
%Binfo%b Print Zim and system info.
|
||||||
%Blist%b List all modules. Use %B-v%b to also see the current details for all modules.
|
%Blist%b List all modules. Use %B-v%b to also see the current details for all modules.
|
||||||
%Binstall%b Install new modules. Also does %Bbuild%b, %Bcompile%b. Use %B-v%b to also see their output.
|
%Binstall%b Install new modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to also see their
|
||||||
|
output, and see skipped modules.
|
||||||
%Buninstall%b Delete unused modules. Prompts for confirmation. Use %B-q%b to uninstall quietly.
|
%Buninstall%b Delete unused modules. Prompts for confirmation. Use %B-q%b to uninstall quietly.
|
||||||
%Bupdate%b Update current modules. Also does %Bbuild%b, %Bcompile%b. Use %B-v%b to see their output.
|
%Bupdate%b Update current modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to see their
|
||||||
|
output, and see skipped modules.
|
||||||
%Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output.
|
%Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output.
|
||||||
%Bversion%b Print zimfw version.
|
%Bversion%b Print zimfw version.
|
||||||
|
|
||||||
|
|
|
@ -110,7 +110,6 @@ case ${ACTION} in
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
if [[ -r ${DIR}/.zim_degit_info ]] command mv -f ${DIR}/.zim_degit_info ${INFO_TARGET}
|
|
||||||
if [[ ! -r ${INFO_TARGET} ]]; then
|
if [[ ! -r ${INFO_TARGET} ]]; then
|
||||||
if (( PRINTLEVEL > 0 )); then
|
if (( PRINTLEVEL > 0 )); then
|
||||||
print -u2 -PR <%= clear_line %>"%F{yellow}<%= warn %>%B${MODULE}:%b Module was not installed using Zim's degit. Will not try to update. You can disable this with the zmodule option -z|--frozen.%f"
|
print -u2 -PR <%= clear_line %>"%F{yellow}<%= warn %>%B${MODULE}:%b Module was not installed using Zim's degit. Will not try to update. You can disable this with the zmodule option -z|--frozen.%f"
|
||||||
|
|
|
@ -4,7 +4,7 @@ class Zim
|
||||||
:clear_line, :ellipsis, :okay, :warn, :error, :done, :failed
|
:clear_line, :ellipsis, :okay, :warn, :error, :done, :failed
|
||||||
|
|
||||||
def initialize
|
def initialize
|
||||||
@version = "1.6.0-SNAPSHOT"
|
@version = "1.6.0"
|
||||||
@home = "${ZDOTDIR:-${HOME}}"
|
@home = "${ZDOTDIR:-${HOME}}"
|
||||||
@min_zsh_version = "5.2"
|
@min_zsh_version = "5.2"
|
||||||
@startup_files_glob = ".z(shenv|profile|shrc|login|logout)"
|
@startup_files_glob = ".z(shenv|profile|shrc|login|logout)"
|
||||||
|
|
11
zimfw.zsh
11
zimfw.zsh
|
@ -373,7 +373,7 @@ _zimfw_compile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print -R 'zimfw version: '${_zversion}' (built at 2021-10-26 15:35:30 UTC, previous commit is a86f69a)'
|
print -R 'zimfw version: '${_zversion}' (built at 2021-11-06 21:22:50 UTC, previous commit is 4259e64)'
|
||||||
print -R 'ZIM_HOME: '${ZIM_HOME}
|
print -R 'ZIM_HOME: '${ZIM_HOME}
|
||||||
print -R 'Zsh version: '${ZSH_VERSION}
|
print -R 'Zsh version: '${ZSH_VERSION}
|
||||||
print -R 'System info: '$(command uname -a)
|
print -R 'System info: '$(command uname -a)
|
||||||
|
@ -594,7 +594,6 @@ case \${ACTION} in
|
||||||
}
|
}
|
||||||
;;
|
;;
|
||||||
update)
|
update)
|
||||||
if [[ -r \${DIR}/.zim_degit_info ]] command mv -f \${DIR}/.zim_degit_info \${INFO_TARGET}
|
|
||||||
if [[ ! -r \${INFO_TARGET} ]]; then
|
if [[ ! -r \${INFO_TARGET} ]]; then
|
||||||
if (( PRINTLEVEL > 0 )); then
|
if (( PRINTLEVEL > 0 )); then
|
||||||
print -u2 -PR $'\E[2K\r'\"%F{yellow}! %B\${MODULE}:%b Module was not installed using Zim's degit. Will not try to update. You can disable this with the zmodule option -z|--frozen.%f\"
|
print -u2 -PR $'\E[2K\r'\"%F{yellow}! %B\${MODULE}:%b Module was not installed using Zim's degit. Will not try to update. You can disable this with the zmodule option -z|--frozen.%f\"
|
||||||
|
@ -717,7 +716,7 @@ esac
|
||||||
}
|
}
|
||||||
|
|
||||||
zimfw() {
|
zimfw() {
|
||||||
local -r _zversion='1.6.0-SNAPSHOT' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
|
local -r _zversion='1.6.0' zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
|
||||||
|
|
||||||
Actions:
|
Actions:
|
||||||
%Bbuild%b Build %B${ZIM_HOME}/init.zsh%b and %B${ZIM_HOME}/login_init.zsh%b.
|
%Bbuild%b Build %B${ZIM_HOME}/init.zsh%b and %B${ZIM_HOME}/login_init.zsh%b.
|
||||||
|
@ -729,9 +728,11 @@ Actions:
|
||||||
%Bhelp%b Print this help.
|
%Bhelp%b Print this help.
|
||||||
%Binfo%b Print Zim and system info.
|
%Binfo%b Print Zim and system info.
|
||||||
%Blist%b List all modules. Use %B-v%b to also see the current details for all modules.
|
%Blist%b List all modules. Use %B-v%b to also see the current details for all modules.
|
||||||
%Binstall%b Install new modules. Also does %Bbuild%b, %Bcompile%b. Use %B-v%b to also see their output.
|
%Binstall%b Install new modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to also see their
|
||||||
|
output, and see skipped modules.
|
||||||
%Buninstall%b Delete unused modules. Prompts for confirmation. Use %B-q%b to uninstall quietly.
|
%Buninstall%b Delete unused modules. Prompts for confirmation. Use %B-q%b to uninstall quietly.
|
||||||
%Bupdate%b Update current modules. Also does %Bbuild%b, %Bcompile%b. Use %B-v%b to see their output.
|
%Bupdate%b Update current modules. Also does %Bbuild%b and %Bcompile%b. Use %B-v%b to see their
|
||||||
|
output, and see skipped modules.
|
||||||
%Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output.
|
%Bupgrade%b Upgrade zimfw. Also does %Bcompile%b. Use %B-v%b to also see its output.
|
||||||
%Bversion%b Print zimfw version.
|
%Bversion%b Print zimfw version.
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue