view src/testdir/dumps/Test_xxd_color_1.dump @ 33083:79b2eb83f2df v9.0.1827

patch 9.0.1827: xxd: no color support Commit: https://github.com/vim/vim/commit/e2528ae11134cdf35c312754b124aba4963d8054 Author: Aapo Rantalainen <aapo.rantalainen@gmail.com> Date: Thu Aug 31 17:58:13 2023 +0200 patch 9.0.1827: xxd: no color support Problem: xxd: no color support Solution: Add color support using xxd -R Add some basic color support for xxd The hex-value and value are both colored with the same color depending on the hex-value, e.g.: 0x00 = white 0xff = blue printable = green non-printable = red tabs and linebreaks = yellow Each character needs 11 more bytes to contain color. (Same color in a row could contain only one overhead but the logic how xxd creates colums must be then changed.) Size of colored output is increased by factor of ~6. Also grepping the output will break when colors is used. Flag for color is "-R", because less uses "-R". Color uses parameters auto,always,never same as less and grep (among others). E.g. xxd -R always $FILE | less -R Add some screen-tests (that currently on work on linux) to verify the feature works as expected. closes: #12131 Signed-off-by: Christian Brabandt <cb@256bit.org> Co-authored-by: Aapo Rantalainen <aapo.rantalainen@gmail.com>
author Christian Brabandt <cb@256bit.org>
date Thu, 31 Aug 2023 18:15:03 +0200
parents
children 2946268e7c48
line wrap: on
line source

|$+0&#ffffff0| |0@7|:| |0+2#e0e0e08&@1|0+2#e000002&|1| +0#0000000&|0+2#e000002&|2|0|3| +0#0000000&|0+2#e000002&|4|0|5| +0#0000000&|0+2#e000002&|6|0|7| +0#0000000&|0+2#e000002&|8|0+2#e0e0004&|9| +0#0000000&|0+2#e0e0004&|a|0+2#e000002&|b| +0#0000000&|0+2#e000002&|c|0+2#e0e0004&|d| +0#0000000&|0+2#e000002&|e|0|f| +0#0000000&@1|.+2#e0e0e08&|.+2#e000002&@7|.+2#e0e0004&@1|.+2#e000002&@1|.+2#e0e0004&|.+2#e000002&@1| +0#0000000&@5
|0@5|1|0|:| |1+2#e000002&|0|1@1| +0#0000000&|1+2#e000002&|2|1|3| +0#0000000&|1+2#e000002&|4|1|5| +0#0000000&|1+2#e000002&|6|1|7| +0#0000000&|1+2#e000002&|8|1|9| +0#0000000&|1+2#e000002&|a|1|b| +0#0000000&|1+2#e000002&|c|1|d| +0#0000000&|1+2#e000002&|e|1|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|2|0|:| |2+2#00e0003&|0|2|1| +0#0000000&|2+2#00e0003&@2|3| +0#0000000&|2+2#00e0003&|4|2|5| +0#0000000&|2+2#00e0003&|6|0+2#e0e0e08&@1| +0#0000000&|2+2#00e0003&|8|2|9| +0#0000000&|2+2#00e0003&|a|2|b| +0#0000000&|2+2#00e0003&|c|2|d| +0#0000000&|2+2#00e0003&|e|2|f| +0#0000000&@1| +2#00e0003&|!|"|#|$|%|&|.+2#e0e0e08&|(+2#00e0003&|)|*|+|,|-|.|/| +0#0000000&@7
|0@5|3|0|:| |3+2#00e0003&|0|3|1| +0#0000000&|3+2#00e0003&|2|3@1| +0#0000000&|3+2#00e0003&|4|3|5| +0#0000000&|3+2#00e0003&|6|3|7| +0#0000000&|3+2#00e0003&|8|3|9| +0#0000000&|3+2#00e0003&|a|3|b| +0#0000000&|3+2#00e0003&|c|3|d| +0#0000000&|3+2#00e0003&|e|3|f| +0#0000000&@1|0+2#00e0003&|1|2|3|4|5|6|7|8|9|:|;|<|=|>|?| +0#0000000&@7
|0@5|4|0|:| |4+2#00e0003&|0|4|1| +0#0000000&|4+2#00e0003&|2|4|3| +0#0000000&|4+2#00e0003&@2|5| +0#0000000&|4+2#00e0003&|6|4|7| +0#0000000&|4+2#00e0003&|8|4|9| +0#0000000&|4+2#00e0003&|a|4|b| +0#0000000&|4+2#00e0003&|c|4|d| +0#0000000&|4+2#00e0003&|e|4|f| +0#0000000&@1|@+2#00e0003&|A|B|C|D|E|F|G|H|I|J|K|L|M|N|O| +0#0000000&@7
|0@5|5|0|:| |5+2#00e0003&|0|5|1| +0#0000000&|5+2#00e0003&|2|5|3| +0#0000000&|5+2#00e0003&|4|5@1| +0#0000000&|5+2#00e0003&|6|5|7| +0#0000000&|5+2#00e0003&|8|5|9| +0#0000000&|5+2#00e0003&|a|5|b| +0#0000000&|0+2#e0e0e08&@1|5+2#00e0003&|d| +0#0000000&|5+2#00e0003&|e|5|f| +0#0000000&@1|P+2#00e0003&|Q|R|S|T|U|V|W|X|Y|Z|[|.+2#e0e0e08&|]+2#00e0003&|^|_| +0#0000000&@7
|0@5|6|0|:| |6+2#00e0003&|0|6|1| +0#0000000&|6+2#00e0003&|2|6|3| +0#0000000&|6+2#00e0003&|4|6|5| +0#0000000&|6+2#00e0003&@2|7| +0#0000000&|6+2#00e0003&|8|6|9| +0#0000000&|6+2#00e0003&|a|6|b| +0#0000000&|6+2#00e0003&|c|6|d| +0#0000000&|6+2#00e0003&|e|6|f| +0#0000000&@1|`+2#00e0003&|a|b|c|d|e|f|g|h|i|j|k|l|m|n|o| +0#0000000&@7
|0@5|7|0|:| |7+2#00e0003&|0|7|1| +0#0000000&|7+2#00e0003&|2|7|3| +0#0000000&|7+2#00e0003&|4|7|5| +0#0000000&|7+2#00e0003&|6|7@1| +0#0000000&|7+2#00e0003&|8|7|9| +0#0000000&|7+2#00e0003&|a|7|b| +0#0000000&|7+2#00e0003&|c|7|d| +0#0000000&|7+2#00e0003&|e|7+2#e000002&|f| +0#0000000&@1|p+2#00e0003&|q|r|s|t|u|v|w|x|y|z|{|||}|~|.+2#e000002&| +0#0000000&@7
|0@5|8|0|:| |8+2#e000002&|0|8|1| +0#0000000&|8+2#e000002&|2|8|3| +0#0000000&|8+2#e000002&|4|8|5| +0#0000000&|8+2#e000002&|6|8|7| +0#0000000&|8+2#e000002&@2|9| +0#0000000&|8+2#e000002&|a|8|b| +0#0000000&|8+2#e000002&|c|8|d| +0#0000000&|8+2#e000002&|e|8|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|9|0|:| |9+2#e000002&|0|9|1| +0#0000000&|9+2#e000002&|2|9|3| +0#0000000&|9+2#e000002&|4|9|5| +0#0000000&|9+2#e000002&|6|9|7| +0#0000000&|9+2#e000002&|8|9@1| +0#0000000&|9+2#e000002&|a|9|b| +0#0000000&|9+2#e000002&|c|9|d| +0#0000000&|9+2#e000002&|e|9|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|a|0|:| |a+2#e000002&|0|a|1| +0#0000000&|a+2#e000002&|2|a|3| +0#0000000&|a+2#e000002&|4|a|5| +0#0000000&|a+2#e000002&|6|a|7| +0#0000000&|a+2#e000002&|8|a|9| +0#0000000&|a+2#e000002&@2|b| +0#0000000&|a+2#e000002&|c|a|d| +0#0000000&|a+2#e000002&|e|a|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|b|0|:| |b+2#e000002&|0|b|1| +0#0000000&|b+2#e000002&|2|b|3| +0#0000000&|b+2#e000002&|4|b|5| +0#0000000&|b+2#e000002&|6|b|7| +0#0000000&|b+2#e000002&|8|b|9| +0#0000000&|b+2#e000002&|a|b@1| +0#0000000&|b+2#e000002&|c|b|d| +0#0000000&|b+2#e000002&|e|b|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|c|0|:| |c+2#e000002&|0|c|1| +0#0000000&|c+2#e000002&|2|c|3| +0#0000000&|c+2#e000002&|4|c|5| +0#0000000&|c+2#e000002&|6|c|7| +0#0000000&|c+2#e000002&|8|c|9| +0#0000000&|c+2#e000002&|a|c|b| +0#0000000&|c+2#e000002&@2|d| +0#0000000&|c+2#e000002&|e|c|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|d|0|:| |d+2#e000002&|0|d|1| +0#0000000&|d+2#e000002&|2|d|3| +0#0000000&|d+2#e000002&|4|d|5| +0#0000000&|d+2#e000002&|6|d|7| +0#0000000&|d+2#e000002&|8|d|9| +0#0000000&|d+2#e000002&|a|d|b| +0#0000000&|d+2#e000002&|c|d@1| +0#0000000&|d+2#e000002&|e|d|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|e|0|:| |e+2#e000002&|0|e|1| +0#0000000&|e+2#e000002&|2|e|3| +0#0000000&|e+2#e000002&|4|e|5| +0#0000000&|e+2#e000002&|6|e|7| +0#0000000&|e+2#e000002&|8|e|9| +0#0000000&|e+2#e000002&|a|e|b| +0#0000000&|e+2#e000002&|c|e|d| +0#0000000&|e+2#e000002&@2|f| +0#0000000&@1|.+2#e000002&@15| +0#0000000&@7
|0@5|f|0|:| |f+2#e000002&|0|f|1| +0#0000000&|f+2#e000002&|2|f|3| +0#0000000&|f+2#e000002&|4|f|5| +0#0000000&|f+2#e000002&|6|f|7| +0#0000000&|f+2#e000002&|8|f|9| +0#0000000&|f+2#e000002&|a|f|b| +0#0000000&|f+2#e000002&|c|f|d| +0#0000000&|f+2#e000002&|e|f+2#0000e05&@1| +0#0000000&@1|.+2#e000002&@14|.+2#0000e05&| +0#0000000&@7
|$| > @72
@75
@75
@75