Make machine specific config better
This commit is contained in:
12
init.zsh
12
init.zsh
@ -18,11 +18,17 @@ function cmd_exists {
|
||||
[[ -v ZSH_USER_DIR ]] || ZSH_USER_DIR="${HOME}/.zsh.d"
|
||||
# source_user_file <name>
|
||||
function source_user_file {
|
||||
[ -e "${ZSH_USER_DIR}/${1}" ] && source "${ZSH_USER_DIR}/${1}"
|
||||
local machine_specific="${ZSH_CONFIG_DIR}/local/${1}.${HOST}.zsh"
|
||||
local default="${ZSH_CONFIG_DIR}/local/${1}.zsh"
|
||||
if [ -e "${machine_specific}" ]; then
|
||||
source "${machine_specific}"
|
||||
elif [ -e "${default}" ]; then
|
||||
source "${default}"
|
||||
fi
|
||||
}
|
||||
|
||||
# Load user early init file
|
||||
source_user_file "early-init.zsh"
|
||||
source_user_file "early-init"
|
||||
|
||||
# Some options
|
||||
setopt autocd extendedglob rm_star_silent completealiases
|
||||
@ -249,7 +255,7 @@ zstyle ':fzf-tab:*' switch-group 'ctrl-h' 'ctrl-l'
|
||||
zstyle ':fzf-tab:*' fzf-bindings 'ctrl-a:toggle-all'
|
||||
|
||||
# Load user init file
|
||||
source_user_file 'local.zsh'
|
||||
source_user_file 'init'
|
||||
|
||||
# THE FOLLOWING PLUGINS MUST COME LAST
|
||||
|
||||
|
Reference in New Issue
Block a user