]> CyberLeo.Net >> Repos - FreeBSD/FreeBSD.git/commit
Add colored output to zfs list
authorTino Reichardt <milky-zfs@mcmilk.de>
Mon, 13 Mar 2023 22:31:44 +0000 (23:31 +0100)
committerTony Hutter <hutter2@llnl.gov>
Tue, 28 Mar 2023 21:13:33 +0000 (14:13 -0700)
commit3da577280a137ff98fffd67d307372b8c881f6eb
tree4d4220ecaa26e547df51e4946c0b3a19068565bb
parent433b9a89c48e0179d3be941ef3e175590ea13952
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
cmd/zfs/zfs_main.c
man/man8/zfs.8