From: Simon Ruderich Date: Mon, 16 Feb 2009 16:11:04 +0000 (+0100) Subject: Improve source_config() debug output. X-Git-Url: https://ruderich.org/simon/gitweb/?a=commitdiff_plain;h=15d08fdd1de8fb7accbccef9c8fa3003f7cab294;p=config%2Fdotfiles.git Improve source_config() debug output. Adding "->" makes results (sourcing, neither exists) stand out clearly in the text and so easy visible. --- diff --git a/shell/env b/shell/env index c654613..5951153 100644 --- a/shell/env +++ b/shell/env @@ -106,16 +106,16 @@ function source_config() { # If the file does exist then source it. if [ -f $source_file ]; then - source_debug "source_config(): sourcing $source_file" + source_debug "source_config(): -> sourcing $source_file" source $source_file # Otherwise load the .local file if it exists and .local files are # allowed. elif [ -f $source_file_local -a x$5 != xnolocal ]; then - source_debug "source_config(): sourcing $source_file_local" + source_debug "source_config(): -> sourcing $source_file_local" source $source_file_local else - source_debug "source_config(): neither exists" + source_debug "source_config(): -> neither exists" fi } diff --git a/tests/source_config.test.out b/tests/source_config.test.out index 7e1cec7..3f473a6 100644 --- a/tests/source_config.test.out +++ b/tests/source_config.test.out @@ -5,23 +5,23 @@ loaded shell/env.zucker source_config(): checking if tmp/zsh/os/rc.Darwin exists source_config(): checking if tmp/zsh/rc.local exists -source_config(): sourcing tmp/zsh/os/rc.Darwin +source_config(): -> sourcing tmp/zsh/os/rc.Darwin loaded zsh/os/rc.Darwin source_config(): checking if tmp/zsh/host/rc.zucker exists source_config(): checking if tmp/zsh/rc.local exists -source_config(): sourcing tmp/zsh/host/rc.zucker +source_config(): -> sourcing tmp/zsh/host/rc.zucker loaded zsh/host/rc.zucker source_config(): checking if tmp/zsh/os/env.Darwin exists source_config(): checking if tmp/zsh/env.local exists -source_config(): neither exists +source_config(): -> neither exists source_config(): checking if tmp/zsh/host/env.zucker exists source_config(): checking if tmp/zsh/env.local exists -source_config(): sourcing tmp/zsh/env.local +source_config(): -> sourcing tmp/zsh/env.local loaded zsh.env.local source_config(): checking if tmp/bash/host/rc.zucker exists source_config(): checking if tmp/bash/rc.local exists -source_config(): neither exists +source_config(): -> neither exists source_config(): checking if tmp/shell//env.zucker exists source_config(): checking if tmp/shell/env.local exists -source_config(): sourcing tmp/shell//env.zucker +source_config(): -> sourcing tmp/shell//env.zucker loaded shell/env.zucker