diff options
author | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-02 23:56:24 +1300 |
---|---|---|
committer | Tom Ryder <tom@sanctum.geek.nz> | 2016-12-02 23:56:55 +1300 |
commit | 0bec8226208ae00341bd441ddc8008732683356b (patch) | |
tree | 11d161650d29284f19fe2f0af1875ce6f236a222 /bin/tlcs | |
parent | Update submodules (diff) | |
download | dotfiles-0bec8226208ae00341bd441ddc8008732683356b.tar.gz dotfiles-0bec8226208ae00341bd441ddc8008732683356b.zip |
Color compatibility fixes for tlcs(1df)
NetBSD sh(1) doesn't like unassigned variables in arithmetic expressions
Diffstat (limited to 'bin/tlcs')
-rwxr-xr-x | bin/tlcs | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -35,12 +35,13 @@ if [ "$#" -eq 0 ] ; then fi # If color was requested for the output, try and get a count of available -# colors +# colors; otherwise default to zero [ -n "$color" ] && color_count=$( { tput colors || tput Co } 2>/dev/null ) +: "${color_count:=0}" -# If the color count is greater than 7, we'll color the output +# If the color count is 8 or greater, we'll color the output if [ "$((color_count >= 8))" -eq 1 ] ; then # Color code for resetting |