File tree Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Expand file tree Collapse file tree 4 files changed +13
-7
lines changed Original file line number Diff line number Diff line change 1- # 0.4.5
1+
2+ ## 0.4.6
3+
4+ Features:
5+
6+ - Improve color-support detection (#73 )
7+
8+ ## 0.4.5
29
310Features:
411
Original file line number Diff line number Diff line change @@ -10,6 +10,7 @@ import 'package:unscripted/src/plugin.dart';
1010import 'package:unscripted/src/usage.dart' ;
1111import 'package:unscripted/src/util.dart' ;
1212import 'package:quiver/strings.dart' ;
13+ import 'package:supports_color/supports_color.dart' ;
1314
1415import 'option_help.dart' ;
1516import 'pens.dart' ;
@@ -79,7 +80,7 @@ class Help extends Plugin {
7980 }
8081
8182 UsageFormatter _getUsageFormatter (Usage usage, bool isWindows) =>
82- new TerminalUsageFormatter (usage, shouldDisableColor (isWindows) );
83+ new TerminalUsageFormatter (usage, supportsColor );
8384
8485 List <String > _getHelpPath (CommandInvocation commandInvocation) {
8586 var path = [];
@@ -102,6 +103,3 @@ class Help extends Plugin {
102103 }
103104
104105}
105-
106- // TODO: May need to also disable when testing help formatting output.
107- bool shouldDisableColor (bool isWindows) => isWindows; // || !stdout.hasTerminal;
Original file line number Diff line number Diff line change @@ -21,7 +21,7 @@ class TerminalUsageFormatter extends UsageFormatter {
2121
2222 var oldColorDisabled = color_disabled;
2323
24- color_disabled = color;
24+ color_disabled = ! color;
2525
2626 var parser = usage.parser;
2727 var description = usage.description;
Original file line number Diff line number Diff line change 11name : unscripted
2- version : 0.4.5
2+ version : 0.4.6
33author :
Sean Eagan <[email protected] > 44description : Declarative command-line interface programming.
55homepage : http://github.com/seaneagan/unscripted
@@ -10,5 +10,6 @@ dependencies:
1010 mockable_filesystem : any
1111 path : any
1212 quiver : any
13+ supports_color : any
1314dev_dependencies :
1415 unittest : any
You can’t perform that action at this time.
0 commit comments