From 3fcb9ae569bd3b4e7852b9d0f19d05b322d74eb7 Mon Sep 17 00:00:00 2001 From: Andrew Schwartzmeyer Date: Thu, 21 Jan 2016 21:00:10 -0800 Subject: [PATCH] Fix up --help Moved to argument parsing and cleaned up. --- src/Microsoft.PowerShell.Linux.Host/main.cs | 68 ++++++++++----------- 1 file changed, 33 insertions(+), 35 deletions(-) diff --git a/src/Microsoft.PowerShell.Linux.Host/main.cs b/src/Microsoft.PowerShell.Linux.Host/main.cs index cd5235514..35429c21c 100644 --- a/src/Microsoft.PowerShell.Linux.Host/main.cs +++ b/src/Microsoft.PowerShell.Linux.Host/main.cs @@ -34,8 +34,40 @@ namespace Microsoft.PowerShell.Linux.Host bool hasNext = (i+1) < args.Length; string nextArg = hasNext ? args[i+1] : string.Empty; + // --help was specified + if (arg == "--help" || arg == "-h") + { + Console.WriteLine(@" +usage: powershell[.exe] [ (--help | -h) ] + [ (--file | -f) ] + [