add ruby script to generate zimfw_doctor
This commit is contained in:
parent
4abb7638fd
commit
fc211de017
5
src/stage2/50_zimfw_doctor.zsh.erb
Normal file
5
src/stage2/50_zimfw_doctor.zsh.erb
Normal file
|
@ -0,0 +1,5 @@
|
||||||
|
_zimfw_doctor() {
|
||||||
|
local zopt
|
||||||
|
etc="$(grep -El '\bcompinit\b' /etc/zshenv /etc/zshrc /etc/zprofile /etc/zlogin 2> /dev/null)"
|
||||||
|
[ -n "${etc}" ] && _zimfw_print -P "compinit is probably already loaded in your system configuration file ${etc}"
|
||||||
|
}
|
|
@ -8,6 +8,7 @@ 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
|
||||||
|
%Bdoctor%b Check for common issues
|
||||||
%Bhelp%b Print this help
|
%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
|
||||||
|
@ -61,6 +62,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 ;;
|
||||||
|
doctor) _zimfw_doctor ;;
|
||||||
help) print -PR ${zusage} ;;
|
help) print -PR ${zusage} ;;
|
||||||
info) _zimfw_info ;;
|
info) _zimfw_info ;;
|
||||||
install|update)
|
install|update)
|
||||||
|
|
|
@ -289,7 +289,7 @@ _zimfw_doctor() {
|
||||||
}
|
}
|
||||||
|
|
||||||
_zimfw_info() {
|
_zimfw_info() {
|
||||||
print -R 'zimfw version: '${_zversion}' (previous commit is 6129062)'
|
print -R 'zimfw version: '${_zversion}' (previous commit is 6f357b5)'
|
||||||
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)
|
||||||
|
|
Loading…
Reference in a new issue