Combine conditional statements

This commit is contained in:
John Eckhart 2017-05-23 16:29:16 -04:00
parent 5178a8a1a8
commit cae0bd04ea

7
zshrc
View file

@ -10,7 +10,7 @@ _load_settings() {
if [ -d "$_dir" ]; then
if [ -d "$_dir/pre" ]; then
for config in "$_dir"/pre/**/*(N-.); do
if [ ${config:e} = "zwc" ] ; then continue ; done
if [ ${config:e} = "zwc" ] ; then continue ; fi
. $config
done
fi
@ -24,8 +24,7 @@ _load_settings() {
:
;;
*)
if [ -f $config ]; then
if [ ${config:e} = "zwc" ] ; then continue ; done
if [ -f $config && ${config:e} != "zwc" ]; then
. $config
fi
;;
@ -34,7 +33,7 @@ _load_settings() {
if [ -d "$_dir/post" ]; then
for config in "$_dir"/post/**/*(N-.); do
if [ ${config:e} = "zwc" ] ; then continue ; done
if [ ${config:e} = "zwc" ] ; then continue ; fi
. $config
done
fi