Skip to content

Latest commit

 

History

History
138 lines (93 loc) · 2.94 KB

Edit-PSFunctionInfo.md

File metadata and controls

138 lines (93 loc) · 2.94 KB
external help file Module Name online version schema
PSFunctionInfo-help.xml
PSFunctionInfo
2.0.0

Edit-PSFunctionInfo

SYNOPSIS

Open a source file in your preferred editor.

SYNTAX

name (Default)

Edit-PSFunctionInfo [-Name] <String> [-Editor <String>] [<CommonParameters>]

source

Edit-PSFunctionInfo [-Source <String>] [[-Name] <String>] [-Editor <String>] [<CommonParameters>]

DESCRIPTION

You can use Edit-PSFunctionInfo to open the source file for a given function with PSFunctionInfo metadata. You can either specify a loaded function by name, or pipe a Get-PSFunctionInfo expression to Edit-PSFunctionInfo. Once the function is opened in the editor, you will need to navigate to the function itself.

The editor choices are VS Code, PowerShell ISE, or Notepad. Of course they are also dependent on your operating system and if you have installed it.

EXAMPLES

Example 1

PS C:\> Edit-PSFunctionInfo -name Set-Title -editor ise

Open the source file for the Set-Title function and open in the PowerShell ISE. This assumes the Set-Title function is currently loaded into your PowerShell session.

Example 2

PS C:\> Get-PSFunctionInfo *git* | Edit-PSFunctionInfo

Get all functions with git in the name and edit them with the default editor.

PARAMETERS

-Editor

Specify the editor you want to use. On non-Windows systems enter the value in lower case.

Type: String
Parameter Sets: (All)
Aliases:
Accepted values: code, ise, notepad

Required: False
Position: Named
Default value: code
Accept pipeline input: False
Accept wildcard characters: False

-Name

The name of a loaded function, presumably with PSFunctionInfo metadata.

Type: String
Parameter Sets: name
Aliases:

Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Type: String
Parameter Sets: source
Aliases:

Required: False
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False

-Source

Specify the path to the source file.

Type: String
Parameter Sets: source
Aliases:

Required: False
Position: Named
Default value: None
Accept pipeline input: True (ByPropertyName, ByValue)
Accept wildcard characters: False

CommonParameters

This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.

INPUTS

System.String

OUTPUTS

None

NOTES

This command has an alias of epfi.

Learn more about PowerShell: https://jdhitsolutions.com/yourls/newsletter

RELATED LINKS

Get-PSFunctionInfo

New-PSFunctionInfo