diff options
author | Andreas Gruenbacher <agruen@suse.de> | 2005-01-23 18:27:47 +0000 |
---|---|---|
committer | Andreas Gruenbacher <agruen@suse.de> | 2005-01-23 18:27:47 +0000 |
commit | ddc509bc766fbde0eb8a5dfe9acb25fbce7b1aaf (patch) | |
tree | 720fb2072d6926500ed5beec813d485f0f26cf28 /scripts | |
parent | 0ae231e732db3af8de72ec7c846ed72a7f9c9fd3 (diff) | |
download | quilt-ddc509bc766fbde0eb8a5dfe9acb25fbce7b1aaf.tar.gz |
- Add color support for push command output and allow to customize
colors via the QUILT_COLORS environment variable (for reverse
video, etc.).
Diffstat (limited to 'scripts')
-rw-r--r-- | scripts/patchfns.in | 9 |
1 files changed, 9 insertions, 0 deletions
diff --git a/scripts/patchfns.in b/scripts/patchfns.in index 0e9b306..25e92af 100644 --- a/scripts/patchfns.in +++ b/scripts/patchfns.in @@ -761,6 +761,15 @@ print_patch() { echo -n "${QUILT_PATCHES_PREFIX:+$SUBDIR_DOWN$QUILT_PATCHES/}$1" } +setup_colors() +{ + local C=${QUILT_COLORS:-diff_hdr=32:diff_add=36:diff_mod=35:diff_rem=35:diff_hunk=33:diff_ctx=35:diff_cctx=33:patch_offs=33:patch_fuzz=35:patch_fail=31}:clear=00 + + C=${C//=/=\'$'\e'[} + C=color_${C//:/m\'; color_}m\' + eval $C +} + # # If the working directory does not contain a $QUILT_PATCHES directory, # quilt searches for its base directory up the directory tree. If no |