[zsh] Move setting up tilde paths to their own init function

This commit is contained in:
Eryn Wells 2022-05-22 15:31:31 -07:00
parent 44302e10ed
commit db8e255a8f
3 changed files with 13 additions and 2 deletions

View file

@ -1,5 +1,4 @@
#!/usr/bin/env zsh
# vim:ft=zsh:
# Eryn Wells <eryn@erynwells.me>
autoload append_to_path
@ -9,7 +8,6 @@ export OSBUILD=`sysctl -n kern.osversion`
export OSVERSION=`sysctl -n kern.osproductversion`
export HWMODEL=`sysctl -n hw.model`
export c="$HOME/Code"
export dd="$HOME/Library/Developer/Xcode/DerivedData"
local pythonRoot

View file

@ -0,0 +1,11 @@
#!/usr/bin/env zsh
# Eryn Wells <eryn@erynwells.me>
for x in "$HOME/Code" "$HOME/Documents/Code"; do
if [[ ! -d "$x" ]]; then
continue
fi
export c="$x"
break
done

2
zshrc
View file

@ -4,6 +4,7 @@
autoload -Uz init_app_environments
autoload -Uz init_configure_ls
autoload -Uz init_rc_aliases
autoload -Uz init_rc_tilde_paths
autoload -Uz init_rc_configure_completion
autoload -Uz init_rc_configure_prompt
autoload -Uz init_rc_configure_zle
@ -12,6 +13,7 @@ autoload -Uz init_zsh_history
autoload -Uz init_zsh_functions
init_rc_aliases
init_rc_tilde_paths
init_rc_configure_prompt loquacious
init_rc_configure_zle emacs
init_rc_configure_completion