From a5e5f90f739956938d2b2165c99b6eb963310bef Mon Sep 17 00:00:00 2001 From: Aaron Gyes Date: Mon, 21 Jan 2019 07:52:26 -0800 Subject: [PATCH] ls.fish: fix colorless ls not taking options That -- no-op would have the effect that a user can not pass more options to ls, they would be interpreted as file names. --- share/functions/ls.fish | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/share/functions/ls.fish b/share/functions/ls.fish index 1cd4e659f..aab2f0e49 100644 --- a/share/functions/ls.fish +++ b/share/functions/ls.fish @@ -5,9 +5,9 @@ # BSD, macOS and others support colors with ls -G. # GNU ls and FreeBSD ls takes --color=auto. Order of this test is important because ls also takes -G but it has a different meaning. # Solaris 11's ls command takes a --color flag. -# Also test a no-op -- because we'll want to define this function even with an ls that can't do colors (like NetBSD). +# Also test -F because we'll want to define this function even with an ls that can't do colors (like NetBSD). -for opt in --color=auto -G --color -- +for opt in --color=auto -G --color -F if command ls $opt / >/dev/null 2>/dev/null function ls --description "List contents of directory" -V opt