From a1409e44410da26deefc7870fded10a256337b14 Mon Sep 17 00:00:00 2001 From: Keanu Date: Wed, 23 Jun 2021 12:11:32 +0200 Subject: [PATCH] [zsh] Added loading of files next to zshrc. --- zsh/functions.zsh | 3 +++ zsh/zshrc | 10 +++++++++- 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 zsh/functions.zsh diff --git a/zsh/functions.zsh b/zsh/functions.zsh new file mode 100644 index 0000000..c47c5e6 --- /dev/null +++ b/zsh/functions.zsh @@ -0,0 +1,3 @@ +#!/usr/bin/env zsh +# +silence() { $1 &>/dev/null } diff --git a/zsh/zshrc b/zsh/zshrc index 5c19c7d..0c049bb 100644 --- a/zsh/zshrc +++ b/zsh/zshrc @@ -1,3 +1,11 @@ -SCRIPT_DIR="$( dirname "$( readlink -f "$0" )" )" +#!/usr/bin/env zsh +K_ZSH_DOTFILES="${0:h}" + +# Get this file's current directory and source Dima's zshrc from there +SCRIPT_DIR="$( dirname "$( readlink -f "$0" )" )" source $SCRIPT_DIR/../dmitmel-dotfiles/zsh/zshrc + +for script in functions; do + source "$K_ZSH_DOTFILES/$script.zsh" +done