diff --git a/CHANGELOG.md b/CHANGELOG.md index 8386aae..ec3608b 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -7,12 +7,20 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0 ## [Unreleased] +_No unreleased changes._ + +## [1.6.0] - 2021-11-06 + ### Added - `list` action. Using it with `-v` also shows the current details for all modules. ### Changed - 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 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. @@ -206,7 +214,8 @@ Take your time to review the updated [README.md] and the changes listed below. [termtitle]: https://github.com/zimfw/termtitle [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.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 diff --git a/README.md b/README.md index c47706f..e981f9f 100644 --- a/README.md +++ b/README.md @@ -33,7 +33,7 @@ To preview some of the available themes, check the [themes page][themes]. ### Degit 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 ------------ @@ -78,8 +78,41 @@ you can add to your `~/.zimrc`. Usage ----- +Add `zmodule` calls to your `~/.zimrc` file to define the modules to be +initialized, then run `zimfw install` to install them. + ### 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` + + +
+Want help with the complete zmodule usage? +
Usage: zmodule <url> [-n|--name <module_name>] [options]
 
 Add zmodule calls to your ~/.zimrc 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.
                              I.e., -s 'script.zsh' and -c 'source {}/script.zsh' are equivalent.
   -d|--disabled              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.
 
+
+ ### zimfw 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 [modules]: https://zimfw.sh/docs/modules/ [themes]: https://zimfw.sh/docs/themes/ +[zimfw]: https://github.com/zimfw diff --git a/src/stage2/80_zimfw.zsh.erb b/src/stage2/80_zimfw.zsh.erb index f4784b0..541112a 100644 --- a/src/stage2/80_zimfw.zsh.erb +++ b/src/stage2/80_zimfw.zsh.erb @@ -11,9 +11,11 @@ Actions: %Bhelp%b Print this help. %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. - %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. - %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. %Bversion%b Print zimfw version. diff --git a/src/tools/degit.zsh.erb b/src/tools/degit.zsh.erb index b832124..cfe75ca 100644 --- a/src/tools/degit.zsh.erb +++ b/src/tools/degit.zsh.erb @@ -110,7 +110,6 @@ case ${ACTION} in } ;; update) - if [[ -r ${DIR}/.zim_degit_info ]] command mv -f ${DIR}/.zim_degit_info ${INFO_TARGET} if [[ ! -r ${INFO_TARGET} ]]; 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" diff --git a/src/zimfw.zsh.erb b/src/zimfw.zsh.erb index a63aab7..4cc4fa4 100644 --- a/src/zimfw.zsh.erb +++ b/src/zimfw.zsh.erb @@ -4,7 +4,7 @@ class Zim :clear_line, :ellipsis, :okay, :warn, :error, :done, :failed def initialize - @version = "1.6.0-SNAPSHOT" + @version = "1.6.0" @home = "${ZDOTDIR:-${HOME}}" @min_zsh_version = "5.2" @startup_files_glob = ".z(shenv|profile|shrc|login|logout)" diff --git a/zimfw.zsh b/zimfw.zsh index 78939ec..b646b22 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -373,7 +373,7 @@ _zimfw_compile() { } _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 'Zsh version: '${ZSH_VERSION} print -R 'System info: '$(command uname -a) @@ -594,7 +594,6 @@ case \${ACTION} in } ;; update) - if [[ -r \${DIR}/.zim_degit_info ]] command mv -f \${DIR}/.zim_degit_info \${INFO_TARGET} if [[ ! -r \${INFO_TARGET} ]]; 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\" @@ -717,7 +716,7 @@ esac } zimfw() { - local -r _zversion='1.6.0-SNAPSHOT' zusage="Usage: %B${0}%b [%B-q%b|%B-v%b] + local -r _zversion='1.6.0' zusage="Usage: %B${0}%b [%B-q%b|%B-v%b] Actions: %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. %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. - %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. - %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. %Bversion%b Print zimfw version.