.sh

[sh] Multi-shell dotfiles manager
git clone https://git.torresjrjr.com/.sh.git
Log | Files | Refs | README | LICENSE

commit 680a0fce95bb0d8322faec446a54ce1f8d0afe3e
parent 5f6e320cf0154e6697ea433a9f75bd41cec8690c
Author: Byron Torres <b@torresjrjr.com>
Date:   Tue,  3 Jan 2023 01:20:36 +0000

info(): fix bad test on empty $COLUMNS in dash

dash seemingly does not set the $COLUMNS environment variable. info()
would perform a less-than test on this empty variable, causing an error.

Diffstat:
Msh/.init.sh | 2+-
1 file changed, 1 insertion(+), 1 deletion(-)

diff --git a/sh/.init.sh b/sh/.init.sh @@ -45,7 +45,7 @@ alias gitll='git log --oneline --decorate --graph --all' info() { [ -x ./.bin/info ] && { ./.bin/info ; return ;} $FETCH - [ "$COLUMNS" -lt 80 ] && l || la ; echo + [ "$COLUMNS" ] && [ "$COLUMNS" -gt 80 ] && la || l -FAXC ;echo git log -0 2>&- && { # if git repo git remote -v | awk '{print "\x1b[1;31m" $1 "\x1b[m\t" $2}' | uniq echo