@Symaxtry to make it:
else
if [ -z "$XDG_CONFIG_DIRS" ]; then
XDG_CONFIG_DIRS="$DEFAULT_XDG_CONFIG_DIRS"
fi
if [ -z "$XDG_DATA_DIRS" ]; then
XDG_DATA_DIRS="$DEFAULT_XDG_DATA_DIRS"
fi
fi
so the default is only defined in one place (and an update of the default at the top is respected in your code path)
@Symaxtry to make it: CONFIG_ DIRS="$ DEFAULT_ XDG_CONFIG_ DIRS" DATA_DIRS= "$DEFAULT_ XDG_DATA_ DIRS"
else
if [ -z "$XDG_CONFIG_DIRS" ]; then
XDG_
fi
if [ -z "$XDG_DATA_DIRS" ]; then
XDG_
fi
fi
so the default is only defined in one place (and an update of the default at the top is respected in your code path)