mirror of
https://github.com/PowerShell/PowerShell
synced 2026-06-08 12:12:50 +00:00
Implementation of -lp alias for -LiteralPath variable for issue #6732 Add-Content Add-Type Clear-Content Clear-Item Clear-ItemProperty Convert-Path Copy-Item Export-Alias Export-Clixml Export-Csv Export-FormatData Format-Hex Get-ChildItem Get-Content Get-FileHash Get-Item Get-ItemProperty Get-ItemPropertyValue Import-Alias Import-Clixml Import-Csv Import-PowerShellDataFile Move-Item Out-File Push-Location Remove-Item Rename-Item Resolve-Path Select-String Select-Xml Set-Content Set-Item Set-ItemProperty Set-Location Split-Path Start-Job Start-Transcript Tee-Object Test-Path Unblock-File
This commit is contained in:
committed by
Travis Plunk
parent
84344cbb32
commit
ec678be4f4
+1
-1
@@ -39,7 +39,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return Path; }
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -31,7 +31,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return paths; }
|
||||
|
||||
+1
-1
@@ -53,7 +53,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = literalChildrenSet,
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+2
-2
@@ -39,7 +39,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -197,7 +197,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Gets or sets the literal path parameter to the command
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath", Mandatory = true, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
|
||||
+1
-1
@@ -32,7 +32,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return paths; }
|
||||
|
||||
@@ -757,7 +757,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = literalPathSet,
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -937,7 +937,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -2059,7 +2059,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -2426,7 +2426,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return _paths; }
|
||||
@@ -2643,7 +2643,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -3117,7 +3117,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return _paths; }
|
||||
@@ -3507,7 +3507,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Gets or sets the literal path property
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get { return _path; }
|
||||
@@ -3801,7 +3801,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return _paths; }
|
||||
@@ -4074,7 +4074,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -4305,7 +4305,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -37,7 +37,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -83,7 +83,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Gets or sets the literal path parameter to the command
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPathSet", Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
@@ -52,7 +52,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return _paths; }
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -38,7 +38,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "LiteralPath",
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -41,7 +41,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Parameter(ParameterSetName = propertyPSObjectLiteralPathSet,
|
||||
Mandatory = true, ValueFromPipeline = false, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
get { return paths; }
|
||||
|
||||
@@ -189,7 +189,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The literal path to the source code or DLL to load.
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ParameterSetName = FromLiteralPathParameterSetName)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
|
||||
@@ -151,7 +151,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter()]
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string LiteralPath
|
||||
{
|
||||
@@ -534,7 +534,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(ValueFromPipelineByPropertyName = true)]
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
|
||||
@@ -53,7 +53,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
///
|
||||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get { return _path; }
|
||||
|
||||
+1
-1
@@ -57,7 +57,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Literal path of the XML file
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = "ByLiteralPath", Mandatory = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public String LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -36,7 +36,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ParameterSetName = "LiteralPath")]
|
||||
[ValidateNotNullOrEmpty()]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string[] LiteralPath { get; set; }
|
||||
|
||||
/// <summary>
|
||||
|
||||
+1
-1
@@ -52,7 +52,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// mandatory file name to write to
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
/// <value></value>
|
||||
[Parameter(Mandatory = true, ParameterSetName = LiteralPathParameterSet, Position = 0, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public String[] LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
@@ -39,7 +39,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
///
|
||||
[Parameter(Mandatory = true, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true, ParameterSetName = LiteralPathParameterSetName)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
+1
-1
@@ -30,7 +30,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, Position = 0, ParameterSetName = "ByLiteralPath", ValueFromPipelineByPropertyName = true)]
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
|
||||
@@ -1001,7 +1001,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "LiteralFile")]
|
||||
[FileinfoToString]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
|
||||
@@ -43,7 +43,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The literal path of the file to unblock
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ParameterSetName = "ByLiteralPath", ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
{
|
||||
|
||||
@@ -45,7 +45,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// mandatory file name to write to
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ParameterSetName = "ByLiteralPath")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
@@ -296,7 +296,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// mandatory file name to read from
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "ByLiteralPath")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public String[] LiteralPath
|
||||
{
|
||||
@@ -825,7 +825,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
[Parameter(Mandatory = true, ValueFromPipelineByPropertyName = true, ParameterSetName = "LiteralPath")]
|
||||
[ValidateNotNullOrEmpty]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public String[] LiteralPath
|
||||
{
|
||||
get { return Path; }
|
||||
|
||||
@@ -40,7 +40,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Literal FilePath parameter
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ParameterSetName = "LiteralFile")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
@@ -47,7 +47,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// The literal name of the file in which to write the transcript.
|
||||
/// </summary>
|
||||
[Parameter(Position = 0, ParameterSetName = "ByLiteralPath")]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[ValidateNotNullOrEmpty]
|
||||
public string LiteralPath
|
||||
{
|
||||
|
||||
@@ -302,7 +302,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
[Parameter(
|
||||
Mandatory = true,
|
||||
ParameterSetName = StartJobCommand.LiteralFilePathComputerNameParameterSet)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
public string LiteralPath
|
||||
{
|
||||
get
|
||||
|
||||
@@ -60,7 +60,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Specifies the literal path to save updates to
|
||||
/// </summary>
|
||||
[Parameter(Mandatory = true, ParameterSetName = LiteralPathParameterSetName)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[ValidateNotNull]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
|
||||
@@ -90,7 +90,7 @@ namespace Microsoft.PowerShell.Commands
|
||||
/// Specifies the literal path to save updates to
|
||||
/// </summary>
|
||||
[Parameter(ParameterSetName = LiteralPathParameterSetName, ValueFromPipelineByPropertyName = true)]
|
||||
[Alias("PSPath")]
|
||||
[Alias("PSPath","LP")]
|
||||
[ValidateNotNull]
|
||||
[SuppressMessage("Microsoft.Performance", "CA1819:PropertiesShouldNotReturnArrays")]
|
||||
public string[] LiteralPath
|
||||
|
||||
Reference in New Issue
Block a user