From 26c9ac00186b280d59440dde5087de594090a342 Mon Sep 17 00:00:00 2001 From: Jakob Kaivo Date: Sun, 14 Oct 2018 14:56:33 -0400 Subject: allow for improper interpretation of -1 in OpenBSD's ls --- color-ls | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/color-ls b/color-ls index d3b673a..044d4eb 100755 --- a/color-ls +++ b/color-ls @@ -29,9 +29,9 @@ options= while getopts ACFHLRSacdfgiklmnopqrstux1 option; do case ${option} in - l|o|n|g) output=${option};; - C|m|x) output=${option};; - 1) output=1;; + l|o|n|g) output=${option}; one=${option};; + C|m|x) output=${option}; one=1;; + 1) output=1; one=1;; F) trim=0;; ?) options=${options}${option};; esac @@ -39,4 +39,4 @@ done shift $(($OPTIND - 1)) -exec ls -${options}F1 -- ${1+$*} | awk -vtrim=${trim} -voutput=${output} -f $(dirname $0)/color-ls.awk +exec ls -${options}F${one} -- ${1+$*} | awk -vtrim=${trim} -voutput=${output} -f $(dirname $0)/color-ls.awk -- cgit v1.2.1