From e886fa67844c874f1a7229f7bd14dc0a90534f27 Mon Sep 17 00:00:00 2001 From: Oleg Broytman Date: Wed, 13 May 2020 00:55:01 +0300 Subject: [PATCH] .profile: Check error code of `which`, not output --- .profile | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.profile b/.profile index 66fe2fa..68531ec 100644 --- a/.profile +++ b/.profile @@ -80,7 +80,7 @@ if [ -t 0 ] ; then stty sane erase ^H - if [ -n "`which less 2>/dev/null`" ]; then + if which less >/dev/null 2>&1; then HAS_LESS=true fi -- 2.39.2