mirror of
https://github.com/PowerShell/PowerShell.git
synced 2024-11-23 17:53:58 +08:00
Adding man page for linux
This commit is contained in:
parent
800382f019
commit
f78ed27597
90
assets/powershellorig
Normal file
90
assets/powershellorig
Normal file
@ -0,0 +1,90 @@
|
||||
POWERSHELL(1) User Manuals POWERSHELL(1)
|
||||
|
||||
|
||||
NAME
|
||||
powershell - commandline shell and C# REPL.
|
||||
|
||||
SYNOPSIS
|
||||
powershell[.exe][.exe] [-PSConsoleFile <file> | -Version <version>]
|
||||
[-NoLogo] [-NoExit] [-Sta] [-Mta] [-NoProfile] [-NonInteractive]
|
||||
[-InputFormat {Text | XML}] [-OutputFormat {Text | XML}]
|
||||
[-WindowStyle <style>] [-EncodedCommand <Base64EncodedCommand>]
|
||||
[-File <filePath> <args>] [-ExecutionPolicy <ExecutionPolicy>]
|
||||
[-Command { - | <script-block> [-args <arg-array>]
|
||||
| <string> [<CommandParameters>] } ]
|
||||
|
||||
DESCRIPTION
|
||||
powershell commandline shell and C# REPL.
|
||||
|
||||
OPTIONS
|
||||
|
||||
-PSConsoleFile
|
||||
Loads the specified Windows PowerShell console file. To create a console file, use Export-Console in Windows PowerShell.
|
||||
|
||||
-Version
|
||||
Starts the specified version of Windows PowerShell. Enter a version number with the parameter, such as "-version 2.0".
|
||||
|
||||
-NoLogo
|
||||
Hides the copyright banner at startup.
|
||||
|
||||
-NoExit
|
||||
Does not exit after running startup commands.
|
||||
|
||||
-Sta
|
||||
Starts the shell using a single-threaded apartment. single-threaded apartment (STA) is the default.
|
||||
|
||||
-Mta
|
||||
Start the shell using a multithreaded apartment.
|
||||
|
||||
-NoProfile
|
||||
Does not load the Windows PowerShell profile.
|
||||
|
||||
-NonInteractive
|
||||
Does not present an interactive prompt to the user.
|
||||
|
||||
-InputFormat
|
||||
Describes the format of data sent to Windows PowerShell. Valid values are "Text" (text strings) or "XML" (serialized CLIXML format).
|
||||
|
||||
-OutputFormat
|
||||
Determines how output from Windows PowerShell is formatted. Valid values are "Text" (text strings) or "XML" (serialized CLIXML format).
|
||||
|
||||
-WindowStyle
|
||||
Sets the window style to Normal, Minimized, Maximized or Hidden.
|
||||
|
||||
-EncodedCommand
|
||||
Accepts a base-64-encoded string version of a command. Use this parameter to submit commands to Windows PowerShell that require complex quotation marks or curly braces.
|
||||
|
||||
-File
|
||||
Runs the specified script in the local scope ("dot-sourced"), so that the functions and variables that the script creates are available in the current session. Enter the script file path and any parameters. File must be the last parameter in the command, because all characters typed after the File parameter name are interpreted as the script file path followed by the script parameters.
|
||||
|
||||
-ExecutionPolicy
|
||||
Sets the default execution policy for the current session and saves it in the $env:PSExecutionPolicyPreference environment variable. This parameter does not change the Windows PowerShell execution policy that is set in the registry.
|
||||
|
||||
-Command
|
||||
Executes the specified commands (and any parameters) as though they were typed at the Windows PowerShell command prompt, and then exits, unless NoExit is specified. The value of Command can be "-", a string or a script block. If the value of Command is "-", the command text is read from standard input. If the value of Command is a script block, the script block must be enclosed in braces ({}). You can specify a script block only when running PowerShell.exe in Windows PowerShell. The results of the script block are returned to the parent shell as deserialized XML objects, not live objects. If the value of Command is a string, Command must be the last parameter in the command , because any characters typed after the command are interpreted as the command arguments. To write a string that runs a Windows PowerShell command, use the format: "& {<command>}" where the quotation marks indicate a string and the invoke operator (&) causes the command to be executed.
|
||||
|
||||
-Help, -?, /?
|
||||
Shows this message. If you are typing a PowerShell.exe command in Windows PowerShell, prepend the command parameters with a hyphen (-), not a forward slash (/). You can use either a hyphen or forward slash in Cmd.exe.
|
||||
|
||||
FILES
|
||||
/home/usr/.config/powershell.Microsoft.PowerShell_profile.ps1
|
||||
User configuration file.
|
||||
~/.powershell
|
||||
runs powershell
|
||||
|
||||
ENVIRONMENT
|
||||
$profile
|
||||
Displays location for user configuration file.
|
||||
|
||||
DIAGNOSTICS
|
||||
See GitHub for debugging information.
|
||||
BUGS
|
||||
Please report all bugs to GitHub.
|
||||
|
||||
AUTHOR
|
||||
Microsoft
|
||||
|
||||
SEE ALSO
|
||||
|
||||
|
||||
Linux Last change: MARCH 1995 2
|
21
build.psm1
21
build.psm1
@ -692,7 +692,7 @@ function Start-PSBootstrap {
|
||||
|
||||
# Install [fpm](https://github.com/jordansissel/fpm)
|
||||
if ($Package) {
|
||||
gem install fpm
|
||||
gem install fpm ronn
|
||||
}
|
||||
|
||||
$obtainUrl = "https://raw.githubusercontent.com/dotnet/cli/rel/1.0.0/scripts/obtain"
|
||||
@ -826,6 +826,12 @@ PowerShell is an automation and configuration management platform.
|
||||
It consists of a cross-platform command-line shell and associated scripting language.
|
||||
"@
|
||||
|
||||
#runn ronn to convert man page to roff
|
||||
$manorigfile = $PSScriptRoot + "/assets/powershellorig"
|
||||
$mantxtfile = $PSScriptRoot + "/assets/powershell"
|
||||
$manronnfile = $PSScriptRoot + "/assets/powershell.1"
|
||||
$gzipmanfile = $PSScriptRoot + "/assets/powershell.1.gz"
|
||||
|
||||
# Use Git tag if not given a version
|
||||
if (-not $Version) {
|
||||
$Version = (git --git-dir="$PSScriptRoot/.git" describe) -Replace '^v'
|
||||
@ -899,6 +905,18 @@ It consists of a cross-platform command-line shell and associated scripting lang
|
||||
}
|
||||
}
|
||||
|
||||
#copy backup to new file
|
||||
cp $manorigfile $mantxtfile
|
||||
|
||||
#run ronn on assets file
|
||||
ronn $mantxtfile
|
||||
|
||||
#rename ronn file
|
||||
mv $mantxtfile $manronnfile
|
||||
|
||||
#gzip in assets directory
|
||||
gzip -f $manronnfile
|
||||
|
||||
# Change permissions for packaging
|
||||
chmod -R go=u $Source /tmp/powershell
|
||||
|
||||
@ -933,6 +951,7 @@ It consists of a cross-platform command-line shell and associated scripting lang
|
||||
"-t", $Type,
|
||||
"-s", "dir",
|
||||
"$Source/=$Destination/",
|
||||
"assets/powershell.1.gz=/usr/local/share/man/man1/powershell.1.gz",
|
||||
"/tmp/powershell=$Link"
|
||||
)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user