From: Silvio Rhatto Date: Fri, 3 Nov 2017 12:53:11 +0000 (-0200) Subject: Redirect both outputs when checking 'ls' version X-Git-Tag: 0.5.2~2 X-Git-Url: https://gitweb.fluxo.info/?a=commitdiff_plain;h=20d8b1f626207d9731586ff11975a142befb399c;p=keyringer.git Redirect both outputs when checking 'ls' version --- diff --git a/lib/keyringer/functions b/lib/keyringer/functions index b1e2e08..6f9a5e3 100755 --- a/lib/keyringer/functions +++ b/lib/keyringer/functions @@ -538,7 +538,7 @@ function keyringer_show_actions { # Usage function keyringer_usage { # are we're using an `ls` that supports `--color`? - if ls --version 2>/dev/null; then + if ls --version > /dev/null 2>&1; then local keyrings="$(ls --color=never `dirname $CONFIG` | sed -e 's/config//' | xargs)" else local keyrings="$(ls `dirname $CONFIG` | sed -e 's/config//' | xargs)"