Skip to content
Snippets Groups Projects
Commit 5bc56cd9 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Merge branch 'friendlier-customization' into 'master'

Friendlier customization

See merge request allworldit/awit-zsh-superawesome!3
parents 58086732 df8d184d
No related branches found
No related tags found
No related merge requests found
zshrc.local
cache cache
zshrc.local
...@@ -25,7 +25,7 @@ ...@@ -25,7 +25,7 @@
# Customizing # Customizing
Customizing can be done by editing the .zsh/zshrc.local file. Customizing can be done by adding files to ~/.zsh/zshrc_local.d/ directory and editing the ~/.zsh/zshrc.local file.
If you have something awesome to contribute, please consider adding it to zshrc.d/. If you have something awesome to contribute, please consider adding it to zshrc.d/.
......
# Ignore everything in this directory
*
# Except this file
!.gitignore
...@@ -20,10 +20,10 @@ fi ...@@ -20,10 +20,10 @@ fi
if [ ! -e ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh ]; then if [ ! -e ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh ]; then
# Install # Install
ln -s ~/.zsh/contrib/awit-ssh-completion/51-completion-awit-ssh.zsh ~/.zsh/zshrc.d/ ln -s ~/.zsh/contrib/awit-ssh-completion/51-completion-awit-ssh.zsh ~/.zsh/zshrc_local.d/
echo "Installed ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh" echo "Installed ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh"
else else
# Uninstall # Uninstall
rm -f ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh rm -f ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh ~/.zsh/zshrc_local.d/51-completion-awit-ssh.zsh
echo "Uninstalled ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh" echo "Uninstalled ~/.zsh/zshrc.d/51-completion-awit-ssh.zsh and ~/.zsh/zshrc_local.d/51-completion-awit-ssh.zsh"
fi fi
# https://github.com/robbyrussell/oh-my-zsh/wiki/Customization#overriding-internals
*.zsh
# https://github.com/robbyrussell/oh-my-zsh/wiki/Customization#overriding-internals
*.zsh
# https://github.com/robbyrussell/oh-my-zsh/wiki/Customization#overriding-and-adding-plugins
#
# Ignore everything in this directory
*
# Except this file
!.gitignore
# https://github.com/robbyrussell/oh-my-zsh/wiki/Customization#overriding-and-adding-themes
#
# Ignore everything in this directory
*
# Except this file
!.gitignore
...@@ -2,10 +2,24 @@ ...@@ -2,10 +2,24 @@
setopt EXTENDED_GLOB setopt EXTENDED_GLOB
# Source in resources # Source in resources
for F in ~/.zsh/zshrc.d/([a-zA-Z0-9-]##).zsh; do find ~/.zsh/zshrc{,_local}.d/([a-zA-Z0-9-]##).zsh | sort -t/ -k6,6 | while read LINE; do
source $F DIR="${LINE%/*}"
FILE="${LINE##*/}"
# If there's a file in zshrc_local.d with the same name as one
# in zshrc.d, ignore the file in zshrc.d
if [[ "$DIR" =~ "zshrc.d" ]] && [ -e "~/.zsh/zshrc_local.d/$FILE" ]; then
# Do nothing
:
else
source "$LINE"
fi
done done
# NB: Note that precedence matters, so some settings will not yield the
# expected results when put into ~/.zsh/zshrc.local. In that case you need
# to figure out the file number and put it into ~/.zsh/zshrc_local.d/
# Source in local stuff # Source in local stuff
if [ -f ~/.zsh/zshrc.local ] if [ -f ~/.zsh/zshrc.local ]
then then
......
# Ignore everything in this directory
*
# Except this file
!.gitignore
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment