Add color output to zfs diff.

This adds support to color zfs diff (in the style of git diff)
conditional on the ZFS_COLOR environment variable.

Signed-off-by: Ethan Coe-Renner <coerenner1@llnl.gov>
This commit is contained in:
Ethan Coe-Renner
2022-12-12 15:30:51 -08:00
committed by Tony Hutter
parent 24502bd3a7
commit fb11b1570a
4 changed files with 53 additions and 2 deletions
+2
View File
@@ -170,7 +170,9 @@ struct zfs_cmd;
* List of colors to use
*/
#define ANSI_RED "\033[0;31m"
#define ANSI_GREEN "\033[0;32m"
#define ANSI_YELLOW "\033[0;33m"
#define ANSI_BLUE "\033[0;34m"
#define ANSI_RESET "\033[0m"
#define ANSI_BOLD "\033[1m"