You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: ColorCat/ColorCatOptions.cs
+62-21Lines changed: 62 additions & 21 deletions
Original file line number
Diff line number
Diff line change
@@ -8,35 +8,58 @@ namespace ColorCat
8
8
{
9
9
publicclassColorCatOptions
10
10
{
11
-
[Option('a',"add",HelpText="Add a color mapping to the configuration")]
12
-
publicboolAdd{get;set;}
11
+
[VerbOption("add",HelpText="Add a color mapping to the configuration")]
12
+
publicAddOptionAdd{get;set;}
13
13
14
-
[Option('c',"color",HelpText="When adding a color mapping, the color to use for the mapping. Requires --add to be specified.")]
15
-
publicConsoleColorColor{get;set;}
14
+
[HelpOption]
15
+
[HelpVerbOption]
16
+
publicstringGetUsage(stringverb)
17
+
{
18
+
varhelp=HelpText.AutoBuild(this,verb);
16
19
17
-
[Option('i',"ignoreCase",HelpText="When adding a color mapping, ignore case when executing the mapping. Requires --add to be specified.")]
18
-
publicboolIgnoreCase{get;set;}
20
+
help.AdditionalNewLineAfterOption=true;
19
21
20
-
[Option('r',"regex",HelpText="When adding a color mapping, execute mapping as a regular expression instead of a string compare. Requires --add to be specified.")]
21
-
publicboolIsRegex{get;set;}
22
+
switch(verb)
23
+
{
24
+
casenull:
25
+
help.AddPreOptionsLine("To colorize the output of another program (such as tail or cat) simply pipe into colorCat");
22
26
23
-
[ValueList(typeof(List<string>))]
24
-
publicIList<string>Pattern{get;set;}
27
+
help.AddPostOptionsLine(string.Empty);
28
+
help.AddPostOptionsLine("For more information on a specific command use --help");
0 commit comments