From 1645fb88bd7fb5786dbad8e7d5814ac6b0be551f Mon Sep 17 00:00:00 2001 From: Sorin Ionescu Date: Sun, 27 May 2012 17:04:01 -0400 Subject: [PATCH] [#171] Move launchd setenv into zlogin --- init.zsh | 10 +--------- templates/zlogin | 8 ++++++++ 2 files changed, 9 insertions(+), 9 deletions(-) diff --git a/init.zsh b/init.zsh index 42c395a..6fa7a5f 100644 --- a/init.zsh +++ b/init.zsh @@ -37,15 +37,7 @@ zstyle -a ':omz:load' omodule 'omodules' omodload "$omodules[@]" unset omodules -# Set environment variables for launchd processes. -if [[ "$OSTYPE" == darwin* ]]; then - for env_var in PATH MANPATH; do - launchctl setenv "$env_var" "${(P)env_var}" &! - done - unset env_var -fi - -# Compile the completion dump, to increase startup speed. +# Compile the completion dump to increase startup speed. dump_file="$HOME/.zcompdump" if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -s "${dump_file}.zwc" ]]; then zcompile "$dump_file" diff --git a/templates/zlogin b/templates/zlogin index b13b611..4697dee 100644 --- a/templates/zlogin +++ b/templates/zlogin @@ -5,6 +5,14 @@ # Sorin Ionescu # +# Set environment variables for launchd processes. +if [[ "$OSTYPE" == darwin* ]]; then + for env_var in PATH MANPATH; do + launchctl setenv "$env_var" "${(P)env_var}" &! + done + unset env_var +fi + # Print a random, hopefully interesting, adage. if (( $+commands[fortune] )); then fortune -a