use less code

This commit is contained in:
Dequan Zhang 2018-07-07 21:02:21 +00:00
parent c30703ac66
commit d9bf3585f1
1 changed files with 2 additions and 13 deletions

View File

@ -7,19 +7,6 @@ autoload -Uz is-at-least && if ! is-at-least 5.2; then
return 1
fi
# Define zim location
(( ! ${+ZIM_HOME} )) && export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim
# Source user configuration
[[ -s ${ZDOTDIR:-${HOME}}/.zimrc ]] && source ${ZDOTDIR:-${HOME}}/.zimrc
# Set input mode before loading modules
if [[ ${zinput_mode} == 'vi' ]]; then
bindkey -v
else
bindkey -e
fi
# Autoload module functions
() {
local mod_function
@ -82,6 +69,8 @@ Actions:
;;
build-cache) source ${ZIM_HOME}/tools/zim_build_cache && print 'Cache rebuilt'
;;
reload) zmanage clean-cache && zmanage build-cache
;;
remove) zsh ${ZIM_HOME}/tools/zim_remove
;;
reset) zsh ${ZIM_HOME}/tools/zim_reset