mirror of
https://git.proxmox.com/git/mirror_zfs.git
synced 2026-05-23 02:44:41 +03:00
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:
committed by
Tony Hutter
parent
0e72f5fb83
commit
9ef565a185
+4
-2
@@ -151,13 +151,15 @@ int zfs_ioctl_fd(int fd, unsigned long request, struct zfs_cmd *zc);
|
||||
* 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"
|
||||
|
||||
void color_start(char *color);
|
||||
void color_start(const char *color);
|
||||
void color_end(void);
|
||||
int printf_color(char *color, char *format, ...);
|
||||
int printf_color(const char *color, char *format, ...);
|
||||
|
||||
/*
|
||||
* These functions are used by the ZFS libraries and cmd/zpool code, but are
|
||||
|
||||
Reference in New Issue
Block a user