]> git.phdru.name Git - dotfiles.git/commitdiff
.profile: Check error code of `which`, not output
authorOleg Broytman <phd@phdru.name>
Tue, 12 May 2020 21:55:01 +0000 (00:55 +0300)
committerOleg Broytman <phd@phdru.name>
Tue, 12 May 2020 21:55:01 +0000 (00:55 +0300)
.profile

index 66fe2fa3fbf306f365d5452898b1d3e544e6e78d..68531ec0057de1c5a3fcac252415ade7d7202033 100644 (file)
--- 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