Commit ffef92f2 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Merge branch 'zshrc-fix' into 'master'

Fix bug in zshrc and tighten up code

See merge request !7
parents 1e7416ac 0523c1eb
......@@ -2,13 +2,10 @@
setopt EXTENDED_GLOB
# Source in resources
find ~/.zsh/zshrc{,_local}.d/([a-zA-Z0-9-]##).zsh | sort -t/ -k6,6 | while read LINE; do
DIR="${LINE%/*}"
FILE="${LINE##*/}"
ls $HOME/.zsh/zshrc{,_local}.d/([a-zA-Z0-9-]##).zsh | sort -t/ -k6,6 | while read LINE; do
# 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
if [[ "$LINE" =~ "zshrc.d" && -e "$HOME/.zsh/zshrc_local.d/${LINE:t}" ]] ; then
# Do nothing
:
else
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment