diff --git a/tools.funcs.zsh b/tools.funcs.zsh index c3f0014..92a825d 100644 --- a/tools.funcs.zsh +++ b/tools.funcs.zsh @@ -34,24 +34,24 @@ function zshlibs_boot() function zshlibs_ensure() { - target=${2} - typ=${1} - if ! test -e ${target} + target="${2}" + typ="${1}" + if ! test -e "${target}" then zshlibs_log zshlibs_ensure "creating '${target}' ($typ) …" case $typ in -d) - mkdir -p ${target} \ + mkdir -p "${target}" \ || zshlibs_log $0 "unable to create directory '${target}'" \ && return 2 ;; -f) - touch ${target} \ + touch "${target}" \ || zshlibs_log $0 "unable to create file '${target}'" \ && return 2 esac zshlibs_log zshlibs_ensure "target '${target}' created" - elif test ${typ} ${target} + elif test "${typ}" "${target}" then zshlibs_log zshlibs_ensure "target '${target}' ($typ) present" return 0