Commit 011c8611 authored by Nigel Kukard's avatar Nigel Kukard
Browse files

Use find to find rc files

Using `ls` with a pattern fails if one of the directories is empty.

We don't have to be extremely strict on the filename format, they're
for ordering only, which the sort handles in any case.
parent 0ccdffa7
......@@ -2,7 +2,7 @@
# Source in resources
ls $HOME/.zsh/zshrc{,_local}.d/([a-zA-Z0-9-]##).zsh | sort -t/ -k6,6 | while read LINE; do
find "$HOME"/.zsh/zshrc{,_local}.d -type f -name "*.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 [[ "$LINE" =~ "zshrc.d" && -e "$HOME/.zsh/zshrc_local.d/${LINE:t}" ]] ; then
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