Fail when no parameter is provided to -c|--cmd
Forgot to add this check when the new option was introduced.
This commit is contained in:
parent
78b4711750
commit
c6f0720abc
4 changed files with 9 additions and 6 deletions
|
@ -7,9 +7,12 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
|||
|
||||
## [Unreleased]
|
||||
|
||||
### Fixed
|
||||
### Added
|
||||
- Prompt before uninstalling modules, unless `-q` is set.
|
||||
|
||||
### Fixed
|
||||
- Show error when no parameter is provided to `-c|--cmd`.
|
||||
|
||||
## [1.3.2] - 2020-08-01
|
||||
|
||||
### Fixed
|
||||
|
|
|
@ -70,7 +70,7 @@ Initialization options:
|
|||
fi
|
||||
while (( # > 0 )); do
|
||||
case ${1} in
|
||||
-b|--branch|-t|--tag|-f|--fpath|-a|--autoload|-s|--source)
|
||||
-b|--branch|-t|--tag|-f|--fpath|-a|--autoload|-s|--source|-c|--cmd)
|
||||
if (( # < 2 )); then
|
||||
print -u2 -PR "%F{red}<%= error %>${funcfiletrace[1]}:%B${zmodule}:%b Missing argument for zmodule option ${1}%f"$'\n\n'${zusage}
|
||||
_zfailed=1
|
||||
|
|
|
@ -6,7 +6,7 @@ class Zim
|
|||
@home = "${ZDOTDIR:-${HOME}}"
|
||||
@min_zsh_version = "5.2"
|
||||
@startup_files_glob = ".z(shenv|profile|shrc|login|logout)"
|
||||
@version = "1.3.3-SNAPSHOT"
|
||||
@version = "1.4.0-SNAPSHOT"
|
||||
@ellipsis = " ..."
|
||||
@okay = "%F{green})%f "
|
||||
@warn = "! "
|
||||
|
|
|
@ -173,7 +173,7 @@ Initialization options:
|
|||
fi
|
||||
while (( # > 0 )); do
|
||||
case ${1} in
|
||||
-b|--branch|-t|--tag|-f|--fpath|-a|--autoload|-s|--source)
|
||||
-b|--branch|-t|--tag|-f|--fpath|-a|--autoload|-s|--source|-c|--cmd)
|
||||
if (( # < 2 )); then
|
||||
print -u2 -PR "%F{red}x ${funcfiletrace[1]}:%B${zmodule}:%b Missing argument for zmodule option ${1}%f"$'\n\n'${zusage}
|
||||
_zfailed=1
|
||||
|
@ -315,7 +315,7 @@ _zimfw_compile() {
|
|||
}
|
||||
|
||||
_zimfw_info() {
|
||||
print -R 'zimfw version: '${_zversion}' (previous commit is ef4fe38)'
|
||||
print -R 'zimfw version: '${_zversion}' (previous commit is 78b4711)'
|
||||
print -R 'ZIM_HOME: '${ZIM_HOME}
|
||||
print -R 'Zsh version: '${ZSH_VERSION}
|
||||
print -R 'System info: '$(command uname -a)
|
||||
|
@ -362,7 +362,7 @@ _zimfw_upgrade() {
|
|||
}
|
||||
|
||||
zimfw() {
|
||||
local -r _zversion='1.3.3-SNAPSHOT'
|
||||
local -r _zversion='1.4.0-SNAPSHOT'
|
||||
local -r zusage="Usage: %B${0}%b <action> [%B-q%b|%B-v%b]
|
||||
|
||||
Actions:
|
||||
|
|
Loading…
Reference in a new issue