Add help and version actions
This commit is contained in:
parent
6806bea72e
commit
dab4b87a29
4 changed files with 15 additions and 6 deletions
|
@ -8,6 +8,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
## [Unreleased]
|
## [Unreleased]
|
||||||
|
|
||||||
### Added
|
### Added
|
||||||
|
- `help` and `version` actions.
|
||||||
- `-v` verbose option. Normal mode output is now cleaner and more focused.
|
- `-v` verbose option. Normal mode output is now cleaner and more focused.
|
||||||
|
|
||||||
### Changed
|
### Changed
|
||||||
|
@ -21,7 +22,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
|
||||||
### Fixed
|
### Fixed
|
||||||
- Zsh 5.2 does not recognize the `:P` modifier. Replace it by `:A`.
|
- Zsh 5.2 does not recognize the `:P` modifier. Replace it by `:A`.
|
||||||
- Also compile and clean .zprofile among the startup files.
|
- Also compile and clean .zprofile among the startup files.
|
||||||
- Don't fail on `zimfw clean-dumpfile` when there's nothing to remove.
|
- Don't fail on `clean-dumpfile` when there's nothing to remove.
|
||||||
|
|
||||||
## [1.0.0] - 2020-01-07
|
## [1.0.0] - 2020-01-07
|
||||||
|
|
||||||
|
|
|
@ -1,12 +1,12 @@
|
||||||
Zsh IMproved FrameWork
|
|
||||||
======================
|
|
||||||
|
|
||||||
<div align="center">
|
<div align="center">
|
||||||
<a href="https://github.com/zimfw/zimfw">
|
<a href="https://github.com/zimfw/zimfw">
|
||||||
<img width="650" src="https://zimfw.github.io/images/zim_banner.png">
|
<img width="650" src="https://zimfw.github.io/images/zim_banner.png">
|
||||||
</a>
|
</a>
|
||||||
</div>
|
</div>
|
||||||
|
|
||||||
|
Zsh IMproved FrameWork
|
||||||
|
======================
|
||||||
|
|
||||||
What is Zim?
|
What is Zim?
|
||||||
------------
|
------------
|
||||||
Zim is a Zsh configuration framework with [blazing speed] and modular extensions.
|
Zim is a Zsh configuration framework with [blazing speed] and modular extensions.
|
||||||
|
@ -129,7 +129,7 @@ Want to upgrade `~/.zim/zimfw.zsh` to the latest version? Run:
|
||||||
|
|
||||||
zimfw upgrade
|
zimfw upgrade
|
||||||
|
|
||||||
For more information about the `zimfw` tool, run `zimfw` with no parameters.
|
For more information about the `zimfw` tool, run `zimfw help`.
|
||||||
|
|
||||||
Uninstalling
|
Uninstalling
|
||||||
------------
|
------------
|
||||||
|
|
|
@ -8,11 +8,13 @@ Actions:
|
||||||
%Bclean-compiled%b Clean Zsh compiled files
|
%Bclean-compiled%b Clean Zsh compiled files
|
||||||
%Bclean-dumpfile%b Clean completion dump file
|
%Bclean-dumpfile%b Clean completion dump file
|
||||||
%Bcompile%b Compile Zsh files
|
%Bcompile%b Compile Zsh files
|
||||||
|
%Bhelp%b Print this help
|
||||||
%Binfo%b Print Zim and system info
|
%Binfo%b Print Zim and system info
|
||||||
%Binstall%b Install new modules
|
%Binstall%b Install new modules
|
||||||
%Buninstall%b Delete unused modules
|
%Buninstall%b Delete unused modules
|
||||||
%Bupdate%b Update current modules
|
%Bupdate%b Update current modules
|
||||||
%Bupgrade%b Upgrade zimfw.zsh
|
%Bupgrade%b Upgrade zimfw.zsh
|
||||||
|
%Bversion%b Print Zim version
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
%B-q%b Quiet, only outputs errors
|
%B-q%b Quiet, only outputs errors
|
||||||
|
@ -55,6 +57,7 @@ Options:
|
||||||
clean-compiled) _zimfw_clean_compiled ;;
|
clean-compiled) _zimfw_clean_compiled ;;
|
||||||
clean-dumpfile) _zimfw_clean_dumpfile ;;
|
clean-dumpfile) _zimfw_clean_dumpfile ;;
|
||||||
compile) _zimfw_build_login_init && _zimfw_compile ;;
|
compile) _zimfw_build_login_init && _zimfw_compile ;;
|
||||||
|
help) print -P ${zusage} ;;
|
||||||
info) _zimfw_info ;;
|
info) _zimfw_info ;;
|
||||||
install|update)
|
install|update)
|
||||||
_zimfw_source_zimrc 1 || return 1
|
_zimfw_source_zimrc 1 || return 1
|
||||||
|
@ -69,6 +72,7 @@ Options:
|
||||||
(( _zprintlevel-- ))
|
(( _zprintlevel-- ))
|
||||||
_zimfw_build_login_init && _zimfw_compile
|
_zimfw_build_login_init && _zimfw_compile
|
||||||
;;
|
;;
|
||||||
|
version) print '<%= version %>' ;;
|
||||||
*)
|
*)
|
||||||
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
||||||
return 1
|
return 1
|
||||||
|
|
|
@ -260,7 +260,7 @@ _zimfw_compile() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print 'Zim version: 1.1.0-SNAPSHOT (previous commit is f6f7815)'
|
print 'Zim version: 1.1.0-SNAPSHOT (previous commit is 6806bea)'
|
||||||
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)
|
||||||
|
@ -310,11 +310,13 @@ Actions:
|
||||||
%Bclean-compiled%b Clean Zsh compiled files
|
%Bclean-compiled%b Clean Zsh compiled files
|
||||||
%Bclean-dumpfile%b Clean completion dump file
|
%Bclean-dumpfile%b Clean completion dump file
|
||||||
%Bcompile%b Compile Zsh files
|
%Bcompile%b Compile Zsh files
|
||||||
|
%Bhelp%b Print this help
|
||||||
%Binfo%b Print Zim and system info
|
%Binfo%b Print Zim and system info
|
||||||
%Binstall%b Install new modules
|
%Binstall%b Install new modules
|
||||||
%Buninstall%b Delete unused modules
|
%Buninstall%b Delete unused modules
|
||||||
%Bupdate%b Update current modules
|
%Bupdate%b Update current modules
|
||||||
%Bupgrade%b Upgrade zimfw.zsh
|
%Bupgrade%b Upgrade zimfw.zsh
|
||||||
|
%Bversion%b Print Zim version
|
||||||
|
|
||||||
Options:
|
Options:
|
||||||
%B-q%b Quiet, only outputs errors
|
%B-q%b Quiet, only outputs errors
|
||||||
|
@ -437,6 +439,7 @@ fi
|
||||||
clean-compiled) _zimfw_clean_compiled ;;
|
clean-compiled) _zimfw_clean_compiled ;;
|
||||||
clean-dumpfile) _zimfw_clean_dumpfile ;;
|
clean-dumpfile) _zimfw_clean_dumpfile ;;
|
||||||
compile) _zimfw_build_login_init && _zimfw_compile ;;
|
compile) _zimfw_build_login_init && _zimfw_compile ;;
|
||||||
|
help) print -P ${zusage} ;;
|
||||||
info) _zimfw_info ;;
|
info) _zimfw_info ;;
|
||||||
install|update)
|
install|update)
|
||||||
_zimfw_source_zimrc 1 || return 1
|
_zimfw_source_zimrc 1 || return 1
|
||||||
|
@ -451,6 +454,7 @@ fi
|
||||||
(( _zprintlevel-- ))
|
(( _zprintlevel-- ))
|
||||||
_zimfw_build_login_init && _zimfw_compile
|
_zimfw_build_login_init && _zimfw_compile
|
||||||
;;
|
;;
|
||||||
|
version) print '1.1.0-SNAPSHOT' ;;
|
||||||
*)
|
*)
|
||||||
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
print -u2 -PR "%F{red}${0}: Unknown action ${1}%f"$'\n'${zusage}
|
||||||
return 1
|
return 1
|
||||||
|
|
Loading…
Reference in a new issue