Re-organise to use a bare repo

Re-organise to use a bare repo, e.g.
https://www.atlassian.com/git/tutorials/dotfiles.
This commit is contained in:
Oliver Davies 2021-06-10 10:10:59 +01:00
parent e00d9b2e96
commit d1da7c6e15
59 changed files with 19 additions and 68 deletions

37
.zshrc Normal file
View file

@ -0,0 +1,37 @@
# Enable extended globbing for use in _load_settings()
setopt extendedglob
# extra files in ~/.zsh/configs/pre , ~/.zsh/configs , and ~/.zsh/configs/post
# these are loaded first, second, and third, respectively.
_load_settings() {
_dir="$1"
if [ -d "$_dir" ]; then
if [ -d "$_dir/pre" ]; then
for config in "$_dir"/pre/**/*~*.zwc(N-.); do
. $config
done
fi
for config in "$_dir"/**/*(N-.); do
case "$config" in
"$_dir"/(pre|post)/*|*.zwc)
:
;;
*)
. $config
;;
esac
done
if [ -d "$_dir/post" ]; then
for config in "$_dir"/post/**/*~*.zwc(N-.); do
. $config
done
fi
fi
}
_load_settings "$HOME/.zsh/configs"
# Local config
[[ -f ~/.zshrc.local ]] && source ~/.zshrc.local