Skip to content

Commit 4e92245

Browse files
committed
Move output type option to root command
1 parent d3e8004 commit 4e92245

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

BooleanExpressionParser/Program.cs

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -26,6 +26,7 @@ private static void Main(string[] args)
2626

2727
// Shared options
2828
var outputTypeOption = new Option<OutputType>(new[] { "--output", "--output-type", "-o" }, description: "The output type to use.");
29+
rootCommand.AddOption(outputTypeOption);
2930

3031
// Table command
3132
// Takes in a list of expressions, and prints out the truth table for each one.
@@ -37,7 +38,7 @@ private static void Main(string[] args)
3738

3839
var tableCommand = new Command("table", description: "Prints the truth table of a boolean expression(s). If none are provided, the user will be prompted to enter them.")
3940
{
40-
outputTypeOption,
41+
// outputTypeOption,
4142
trueOption,
4243
falseOption,
4344
colourModeOption,
@@ -53,7 +54,7 @@ private static void Main(string[] args)
5354
// Takes in a list of expressions, and converts them to prefix notation.
5455
var convertCommand = new Command("convert", description: "Converts a boolean expression(s) to prefix notation. If none are provided, the user will be prompted to enter them.")
5556
{
56-
outputTypeOption,
57+
// outputTypeOption,
5758
expressionsArgument
5859
};
5960

0 commit comments

Comments
 (0)