Thanks to visit codestin.com
Credit goes to github.com

Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
35 changes: 35 additions & 0 deletions src/Microsoft.PowerShell.Linux.Host/main.cs
Original file line number Diff line number Diff line change
Expand Up @@ -175,6 +175,41 @@ public Listener(string initialScript)
this.currentPowerShell = PowerShell.Create();
}


if (initialScript == "--help" || initialScript == "-h")
{
Console.WriteLine(@"
======HELP======
PowerShell for Linux
Command Line Help Resource
================

TOPIC
PowerShell for Linux Command Line Arguments

SYNOPSIS
PowerShell for Linux takes several command line arguments.

OPTIONS

[NO ARGUMENTS] Will launch PowerShell for Linux in an interactive shell.

--command <string> Will execute given string as a PowerShell command.

-c <string> Will execute given string as a PowerShell command.

--file <filePath> Given a file path will execute as a PowerShell script.

-f <filePath> Given a file path will execute as a PowerShell script.

--help Prints a basic help of command line arguments for PowerShell on Linux

-h Prints a basic help of command line arguments for PowerShell on Linux.

");
return;
}

try
{
this.currentPowerShell.Runspace = this.myRunSpace;
Expand Down