From c6f0720abc17277c53c81aba90bc2112294c16bc Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Sat, 7 Nov 2020 14:39:30 -0500 Subject: [PATCH] Fail when no parameter is provided to `-c|--cmd` Forgot to add this check when the new option was introduced. --- CHANGELOG.md | 5 ++++- src/stage2/30_zmodule.zsh.erb | 2 +- src/zimfw.zsh.erb | 2 +- zimfw.zsh | 6 +++--- 4 files changed, 9 insertions(+), 6 deletions(-) diff --git a/CHANGELOG.md b/CHANGELOG.md index 526e890..7782664 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -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 diff --git a/src/stage2/30_zmodule.zsh.erb b/src/stage2/30_zmodule.zsh.erb index 8309183..acff52e 100644 --- a/src/stage2/30_zmodule.zsh.erb +++ b/src/stage2/30_zmodule.zsh.erb @@ -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 diff --git a/src/zimfw.zsh.erb b/src/zimfw.zsh.erb index ff8394d..18f2914 100644 --- a/src/zimfw.zsh.erb +++ b/src/zimfw.zsh.erb @@ -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 = "! " diff --git a/zimfw.zsh b/zimfw.zsh index 06174da..231a6d4 100644 --- a/zimfw.zsh +++ b/zimfw.zsh @@ -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 [%B-q%b|%B-v%b] Actions: