Add colored output to zfs list

Use a bold header row and colorize the AVAIL column based on
the used space percentage of volume.

We define these colors:
- when > 80%, use yellow
- when > 90%, use red

Reviewed-by: WHR <msl0000023508@gmail.com>
Reviewed-by: Brian Behlendorf <behlendorf1@llnl.gov>
Signed-off-by: Ethan Coe-Renner <coerenner1@llnl.gov>
Signed-off-by: Tino Reichardt <milky-zfs@mcmilk.de>
Closes #14621
Closes #14350
This commit is contained in:
Tino Reichardt
2023-03-13 23:31:44 +01:00
committed by Tony Hutter
parent 433b9a89c4
commit 3da577280a
2 changed files with 32 additions and 0 deletions
+2
View File
@@ -708,6 +708,8 @@ command will be undone if the share is ever unshared (like via a reboot).
.It Sy ZFS_COLOR
Use ANSI color in
.Nm zfs Cm diff
and
.Nm zfs Cm list
output.
.El
.Bl -tag -width "ZFS_MOUNT_HELPER"