From fee44c904d0fe9a9809c347b0de86a1a20c61786 Mon Sep 17 00:00:00 2001 From: "martin f. krafft" Date: Thu, 16 Mar 2017 12:08:07 +1300 Subject: [PATCH] Rename logging functions --- .zsh/logging | 16 ++++++++-------- .zsh/sourcedir | 6 +++--- 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/.zsh/logging b/.zsh/logging index ad4c54a..26d7544 100644 --- a/.zsh/logging +++ b/.zsh/logging @@ -15,24 +15,24 @@ __log() { __do_debug() { [ -n "${ZDEBUG:-}" ] } -error() { +zerror() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __log E "$@" + __log E "$@" [ "${__XTRACE:-}" ] && set -x } -warn() { +zwarn() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __log W "$@" + __log W "$@" [ "${__XTRACE:-}" ] && set -x } -info() { +zinfo() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __log I "$@" + __log I "$@" [ "${__XTRACE:-}" ] && set -x } -debug() { +zdebug() { [[ -o xtrace ]] && set +x && local __XTRACE=1 - __do_debug && __log D "$@" + __do_debug && __log D "$@" [ "${__XTRACE:-}" ] && set -x } diff --git a/.zsh/sourcedir b/.zsh/sourcedir index 40f1aa0..4226915 100644 --- a/.zsh/sourcedir +++ b/.zsh/sourcedir @@ -12,15 +12,15 @@ sourcedir() { if [ ! -d "$1" ]; then - error "no such directory: $1" + zerror "no such directory: $1" return 1 fi -# debug "sourcing directory ${1#$ZDOTDIR/}" +# zdebug "sourcing directory ${1#$ZDOTDIR/}" for f in "$1"/*(.N,@N); do case "$f" in *~|*.bak|*.old|*.sw?|*.zwc|*.disabled) continue;; esac -# debug " sourcing file $f" +# zdebug " sourcing file $f" source "$f" done } -- 2.39.5