[#171] Move launchd setenv into zlogin
This commit is contained in:
parent
7a4433e92c
commit
1645fb88bd
10
init.zsh
10
init.zsh
|
@ -37,15 +37,7 @@ zstyle -a ':omz:load' omodule 'omodules'
|
||||||
omodload "$omodules[@]"
|
omodload "$omodules[@]"
|
||||||
unset omodules
|
unset omodules
|
||||||
|
|
||||||
# Set environment variables for launchd processes.
|
# Compile the completion dump to increase startup speed.
|
||||||
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.
|
|
||||||
dump_file="$HOME/.zcompdump"
|
dump_file="$HOME/.zcompdump"
|
||||||
if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -s "${dump_file}.zwc" ]]; then
|
if [[ "$dump_file" -nt "${dump_file}.zwc" || ! -s "${dump_file}.zwc" ]]; then
|
||||||
zcompile "$dump_file"
|
zcompile "$dump_file"
|
||||||
|
|
|
@ -5,6 +5,14 @@
|
||||||
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
# Sorin Ionescu <sorin.ionescu@gmail.com>
|
||||||
#
|
#
|
||||||
|
|
||||||
|
# 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.
|
# Print a random, hopefully interesting, adage.
|
||||||
if (( $+commands[fortune] )); then
|
if (( $+commands[fortune] )); then
|
||||||
fortune -a
|
fortune -a
|
||||||
|
|
Loading…
Reference in a new issue