From 5dc0ff0a90de856a57c693876d9dd449eaaa68e8 Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Mon, 21 Jan 2019 03:15:43 -0800 Subject: [PATCH] ls.fish: remove for loop `command -s` can take multiple arguments to try. --- share/functions/ls.fish | 8 +------- 1 file changed, 1 insertion(+), 7 deletions(-) diff --git a/share/functions/ls.fish b/share/functions/ls.fish index 9023b74e4..d162c8c44 100644 --- a/share/functions/ls.fish +++ b/share/functions/ls.fish @@ -12,13 +12,7 @@ if command ls --version >/dev/null 2>/dev/null end if not set -q LS_COLORS - set -l dircolors - for d in gdircolors dircolors - if command -sq $d - set dircolors $d - break - end - end + set -l dircolors (command -s {g,}dircolors)[1] if set -q dircolors[1] set -l colorfile