Some if statements looked like if $lse_color while others looked like if [ "$lse_color" ], so I added brackets to all of them. Technically we could reduce the file size slightly by removing these brackets if there is only one argument for the if statement - you can decide which you prefer.
And one echo -e command was changed to printf, since this was the last echo I found with a flag (all the cases of echo -n were switched to printf during earlier POSIX compliance migration) . Now echo is only used without a flag.
Let me know if you want these split into two different pull requests.
I am sorry but your PR is not right. Using or not quotes depend on if the variable is a boolean or not. Also I started using printf almost anywhere for POSIX compliance.
Some
if
statements looked likeif $lse_color
while others looked likeif [ "$lse_color" ]
, so I added brackets to all of them. Technically we could reduce the file size slightly by removing these brackets if there is only one argument for the if statement - you can decide which you prefer.And one
echo -e
command was changed toprintf
, since this was the lastecho
I found with a flag (all the cases ofecho -n
were switched toprintf
during earlier POSIX compliance migration) . Nowecho
is only used without a flag.Let me know if you want these split into two different pull requests.