From 1dd341508579051453f7663bdacd43a321b33075 Mon Sep 17 00:00:00 2001 From: codesoap Date: Sun, 3 Feb 2019 19:00:20 +0100 Subject: mless: Quote variables whenever possible --- mless | 16 ++++++++-------- 1 file changed, 8 insertions(+), 8 deletions(-) (limited to 'mless') diff --git a/mless b/mless index 8692722..390ebcf 100755 --- a/mless +++ b/mless @@ -37,9 +37,9 @@ if [ "$1" = --filter ]; then mshow "$2" fi | mcolor else - mseq -r $2 + mseq -r "$2" echo - cat "$(mseq -r $2)" + cat "$(mseq -r "$2")" fi exit $? fi @@ -64,12 +64,12 @@ nl=" export MLESS_RAW=0 export MLESS_HTML=0 while :; do - 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 + 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 \ -- cgit 1.4.1