Show a more informative error when running zmodule
from the shell. This means getting zmodule: Must be called from ${ZDOTDIR:-${HOME}}/.zimrc and the full zmodule usage, instead of getting zsh: command not found: zmodule Fixes #430
This commit is contained in:
parent
b3b282f0f6
commit
7deda9c7f4
4 changed files with 15 additions and 3 deletions
|
@ -15,6 +15,8 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
- Error in `zimfw update` with the `git` tool when module directory is under a
|
- Error in `zimfw update` with the `git` tool when module directory is under a
|
||||||
symlinked directory.
|
symlinked directory.
|
||||||
- Warning when `WARN_CREATE_GLOBAL` is set and `ZIM_HOME` is not.
|
- Warning when `WARN_CREATE_GLOBAL` is set and `ZIM_HOME` is not.
|
||||||
|
- "zsh: command not found: zmodule" when trying to run `zmodule` from the shell.
|
||||||
|
Show a more informative error instead.
|
||||||
- Don't try to install or update external modules.
|
- Don't try to install or update external modules.
|
||||||
|
|
||||||
## [1.5.0] - 2021-08-10
|
## [1.5.0] - 2021-08-10
|
||||||
|
|
|
@ -6,6 +6,7 @@ _zimfw_build_init() {
|
||||||
fi
|
fi
|
||||||
_zimfw_mv =(
|
_zimfw_mv =(
|
||||||
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
||||||
|
print -R "zmodule() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
||||||
local -r zpre=$'*\0'
|
local -r zpre=$'*\0'
|
||||||
if (( ${#_zfpaths} )) print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
|
if (( ${#_zfpaths} )) print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
|
||||||
if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
|
if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
|
||||||
|
|
|
@ -49,4 +49,8 @@ zim = Zim.new
|
||||||
|
|
||||||
<%= zim.render_commented("LICENSE") %>
|
<%= zim.render_commented("LICENSE") %>
|
||||||
<%= zim.render_all("src/stage2/*.erb") %>
|
<%= zim.render_all("src/stage2/*.erb") %>
|
||||||
zimfw "${@}"
|
if [[ ${functrace[1]} == zmodule:* ]]; then
|
||||||
|
zmodule "${@}"
|
||||||
|
else
|
||||||
|
zimfw "${@}"
|
||||||
|
fi
|
||||||
|
|
|
@ -59,6 +59,7 @@ _zimfw_build_init() {
|
||||||
fi
|
fi
|
||||||
_zimfw_mv =(
|
_zimfw_mv =(
|
||||||
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
print -R "zimfw() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
||||||
|
print -R "zmodule() { source ${ZIM_HOME}/zimfw.zsh \"\${@}\" }"
|
||||||
local -r zpre=$'*\0'
|
local -r zpre=$'*\0'
|
||||||
if (( ${#_zfpaths} )) print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
|
if (( ${#_zfpaths} )) print -R 'fpath=('${${_zfpaths#${~zpre}}:A}' ${fpath})'
|
||||||
if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
|
if (( ${#_zfunctions} )) print -R 'autoload -Uz '${_zfunctions#${~zpre}}
|
||||||
|
@ -367,7 +368,7 @@ _zimfw_compile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print -R 'zimfw version: '${_zversion}' (built at 2021-09-19 18:30:02 UTC, previous commit is 3e1a89a)'
|
print -R 'zimfw version: '${_zversion}' (built at 2021-09-21 01:00:09 UTC, previous commit is b3b282f)'
|
||||||
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)
|
||||||
|
@ -781,4 +782,8 @@ Options:
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
zimfw "${@}"
|
if [[ ${functrace[1]} == zmodule:* ]]; then
|
||||||
|
zmodule "${@}"
|
||||||
|
else
|
||||||
|
zimfw "${@}"
|
||||||
|
fi
|
||||||
|
|
Loading…
Reference in a new issue