From 95e0d56ea7992fa4dda817f388763e6a6572c31e Mon Sep 17 00:00:00 2001 From: bretello Date: Wed, 5 Jan 2022 18:16:45 +0100 Subject: [PATCH] zsh: add functions/aliases extras + migration --- brethil_dotfile.sh | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/brethil_dotfile.sh b/brethil_dotfile.sh index c65fa61..7cb57dc 100755 --- a/brethil_dotfile.sh +++ b/brethil_dotfile.sh @@ -84,6 +84,28 @@ export p="${HOME}/projects" export g="${HOME}/git" export w="${HOME}/work" +source $DOTFILES/functions.zsh +source $DOTFILES/aliases.zsh + +# Extras +functions_file=~/.dotfiles_functions +aliases_file=~/.dotfiles_aliases + +( # migration of old format + if [[ -f ${functions_file}.sh ]]; then + echo "Migrating ${functions_file}.sh to ${functions_file}" + mv ${functions_file}{.sh,} + fi + if [[ -f ${aliases_file}.sh ]]; then + echo "Migrating ${aliases_file}.sh to ${aliases_file}" + mv ${aliases_file}{.sh,} + fi +) + +# Source extras +test -f "${functions_file}" && source "${functions_file}" +test -f "${aliases_file}" && source "${aliases_file}" + ### SETUP PATHS #### export PATH=$PATH:$HOME/bin