diff options
author | Jakob Kaivo <jkk@ung.org> | 2018-10-14 14:56:33 -0400 |
---|---|---|
committer | Jakob Kaivo <jkk@ung.org> | 2018-10-14 14:56:33 -0400 |
commit | 26c9ac00186b280d59440dde5087de594090a342 (patch) | |
tree | bff2dafc7e23ac2317881a4a63850812f194e9fd | |
parent | 0eae9a1904143419d29d35b20b84c428d36dee0b (diff) |
allow for improper interpretation of -1 in OpenBSD's ls
-rwxr-xr-x | color-ls | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -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 |