From: Oleg Broytman Date: Tue, 12 May 2020 21:55:01 +0000 (+0300) Subject: .profile: Check error code of `which`, not output X-Git-Url: https://git.phdru.name/?p=dotfiles.git;a=commitdiff_plain;h=e886fa67844c874f1a7229f7bd14dc0a90534f27 .profile: Check error code of `which`, not output --- 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