From 15d08fdd1de8fb7accbccef9c8fa3003f7cab294 Mon Sep 17 00:00:00 2001 From: Simon Ruderich Date: Mon, 16 Feb 2009 17:11:04 +0100 Subject: [PATCH] Improve source_config() debug output. Adding "->" makes results (sourcing, neither exists) stand out clearly in the text and so easy visible. --- shell/env | 6 +++--- tests/source_config.test.out | 12 ++++++------ 2 files changed, 9 insertions(+), 9 deletions(-) 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 -- 2.45.2