From a8244a555a62f04f77c4056672c91df15103597b Mon Sep 17 00:00:00 2001 From: Eric Nielsen Date: Thu, 28 Sep 2017 15:54:24 -0500 Subject: [PATCH] [template] Add new templates/zlogin that sources `login_init.zsh`. Also refactor templates/zshrc to use a one-liner instead of if/then/fi. Closes #218 --- templates/zlogin | 8 ++++++++ templates/zshrc | 9 +++------ 2 files changed, 11 insertions(+), 6 deletions(-) create mode 100644 templates/zlogin diff --git a/templates/zlogin b/templates/zlogin new file mode 100644 index 0000000..a9af863 --- /dev/null +++ b/templates/zlogin @@ -0,0 +1,8 @@ + + +# +# User configuration sourced by login shells +# + +# Initialize zim +[[ -s ${ZIM_HOME}/login_init.zsh ]] && source ${ZIM_HOME}/login_init.zsh diff --git a/templates/zshrc b/templates/zshrc index 0f9665c..eab16b8 100644 --- a/templates/zshrc +++ b/templates/zshrc @@ -4,11 +4,8 @@ # User configuration sourced by interactive shells # -# Change default zim location +# Change default zim location export ZIM_HOME=${ZDOTDIR:-${HOME}}/.zim -# Source zim -if [[ -s ${ZIM_HOME}/init.zsh ]]; then - source ${ZIM_HOME}/init.zsh -fi - +# Start zim +[[ -s ${ZIM_HOME}/init.zsh ]] && source ${ZIM_HOME}/init.zsh