From c249a5afc4f480e10346198422a3161931afd574 Mon Sep 17 00:00:00 2001 From: Pádraig Brady Date: Tue, 13 Oct 2015 12:40:52 +0100 Subject: dircolors: support globbing of TERM entries * src/dircolors.c (dc_parse_stream): Support globbing of TERM entries, to allow entries like "TERM *256color*" for example. * src/dircolors.hin: Reduce the internal list with globbing. * tests/misc/dircolors.pl: New test cases. * NEWS: Mention the improvement. --- tests/misc/dircolors.pl | 8 ++++++++ 1 file changed, 8 insertions(+) (limited to 'tests/misc/dircolors.pl') diff --git a/tests/misc/dircolors.pl b/tests/misc/dircolors.pl index b9f8a1d26..2e6f27d88 100755 --- a/tests/misc/dircolors.pl +++ b/tests/misc/dircolors.pl @@ -33,6 +33,14 @@ my @Tests = . "export LS_COLORS\n"}], ['other-wr', '-b', {IN => "owt 40;33\n"}, {OUT => "LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"}], + ['term-1', '-b', {IN => "TERM none\nowt 40;33\n"}, + {OUT => "LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"}], + ['term-2', '-b', {IN => "TERM non*\nowt 40;33\n"}, + {OUT => "LS_COLORS='tw=40;33:';\nexport LS_COLORS\n"}], + ['term-3', '-b', {IN => "TERM nomatch\nowt 40;33\n"}, + {OUT => "LS_COLORS='';\nexport LS_COLORS\n"}], + ['term-4', '-b', {IN => "TERM N*match\nowt 40;33\n"}, + {OUT => "LS_COLORS='';\nexport LS_COLORS\n"}], # CAREFUL: always specify the -b option, unless explicitly testing # for csh syntax output. -- cgit v1.2.3-54-g00ecf