1
0
Fork 0
mirror of synced 2024-12-21 21:51:07 -05:00

use less code

This commit is contained in:
Dequan Zhang 2018-07-07 21:02:21 +00:00
parent c30703ac66
commit d9bf3585f1

View file

@ -7,19 +7,6 @@ autoload -Uz is-at-least && if ! is-at-least 5.2; then
return 1 return 1
fi 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 # Autoload module functions
() { () {
local mod_function local mod_function
@ -82,6 +69,8 @@ Actions:
;; ;;
build-cache) source ${ZIM_HOME}/tools/zim_build_cache && print 'Cache rebuilt' 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 remove) zsh ${ZIM_HOME}/tools/zim_remove
;; ;;
reset) zsh ${ZIM_HOME}/tools/zim_reset reset) zsh ${ZIM_HOME}/tools/zim_reset