Skip to content
Snippets Groups Projects
Commit 0523c1eb authored by Robert Spencer's avatar Robert Spencer
Browse files

Fix bug in zshrc and tighten up code

The bug was that tilde expansion was inconsistent, so one of the tests
always failed. Replaced ~ with $HOME.
parent 1e7416ac
No related branches found
No related tags found
1 merge request!7Fix bug in zshrc and tighten up code
...@@ -2,13 +2,10 @@ ...@@ -2,13 +2,10 @@
setopt EXTENDED_GLOB setopt EXTENDED_GLOB
# Source in resources # Source in resources
find ~/.zsh/zshrc{,_local}.d/([a-zA-Z0-9-]##).zsh | sort -t/ -k6,6 | while read LINE; do ls $HOME/.zsh/zshrc{,_local}.d/([a-zA-Z0-9-]##).zsh | sort -t/ -k6,6 | while read LINE; do
DIR="${LINE%/*}"
FILE="${LINE##*/}"
# If there's a file in zshrc_local.d with the same name as one # If there's a file in zshrc_local.d with the same name as one
# in zshrc.d, ignore the file in zshrc.d # 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 # Do nothing
: :
else else
......
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