1
0
mirror of https://git.decapod.one/brethil/dotfiles synced 2024-11-25 04:51:31 +01:00

zsh: add functions/aliases extras + migration

This commit is contained in:
bretello 2022-01-05 18:16:45 +01:00
parent c507973d50
commit 95e0d56ea7
Signed by: brethil
GPG Key ID: 876AAC6290170FE7

View File

@ -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