From ca8cef1660ad89ab488a22dc50eeb7cd77222c6e Mon Sep 17 00:00:00 2001 From: Ivy Foster Date: Thu, 1 Sep 2016 18:50:20 -0500 Subject: Add $MBLAZE environment variable to set profile location As a side benefit, all callers of blaze822_home_file need only pass the filename, so the base directory is set in only one place. --- mless | 8 +++++++- 1 file changed, 7 insertions(+), 1 deletion(-) (limited to 'mless') diff --git a/mless b/mless index 1a4a38b..1b0a014 100755 --- a/mless +++ b/mless @@ -65,7 +65,13 @@ nl=" export MLESS_RAW=0 export MLESS_HTML=0 while :; do - [ -f $HOME/.mless ] && export LESSKEY=$HOME/.mless + if [ -f $MBLAZE/mless ]; then + export LESSKEY=$MBLAZE/mless + elif [ -f $HOME/.mblaze/mless ]; then + export LESSKEY=$HOME/.mblaze/mless + elif [ -f $HOME/.mless ]; then + export LESSKEY=$HOME/.mless + fi LESSOPEN="|$0 --filter %s" \ less -Ps"mless %f?m (message %i of %m).." -R \ "+:e $(mscan -n .)$nl" //scan $(mscan -n :) -- cgit 1.4.1