refactor: combine with Ubuntu Provisioning repo
Combine with this repository with https://github.com/opdavies/ubuntu-provisioning so that everything can be managed in one place, and add a role for each piece of software.
This commit is contained in:
parent
e11cf61218
commit
8916e90050
73 changed files with 239 additions and 3783 deletions
37
roles/zsh/files/.zshrc
Normal file
37
roles/zsh/files/.zshrc
Normal 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
|
Loading…
Add table
Add a link
Reference in a new issue