external help file | Module Name | online version | schema |
---|---|---|---|
PSScriptTools-help.xml |
PSScriptTools |
2.0.0 |
Modify or add a PSAnsiFileEntry.
Set-PSAnsiFileMap [-Description] <String> [-Pattern <String>] [-Ansi <String>]
[-PassThru] [-WhatIf] [-Confirm] [<CommonParameters>]
Use this command to modify an existing entry in the global $PSAnsiFileMap variable or add a new entry. If modifying, you must specify a regular expression pattern or an ANSI escape sequence. If you are adding a new entry, you need to supply both values.
PS C:\> Set-PSAnsiFileMap Temporary -Ansi "`e[38;5;190m"
Update the ANSI pattern for temporary files. This change will not persist unless you export the map.
PS C:\> Set-PSAnsiFileMap -Description "Config" -Pattern "\.(yml)$" -Ansi "`e[38;5;25m"ge
Add a new PSAnsiFileMap entry. This change will not persist unless you export the map.
Specify an ANSI escape sequence. You only need to define the opening sequence.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Prompts you for confirmation before running the cmdlet.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: cf
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify the file map entry. If it is a new entry it will be added.
Type: String
Parameter Sets: (All)
Aliases:
Required: True
Position: 0
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Display the updated map.
Type: SwitchParameter
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Specify a regular expression pattern for the file name.
Type: String
Parameter Sets: (All)
Aliases:
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
Shows what would happen if the cmdlet runs. The cmdlet is not run.
Type: SwitchParameter
Parameter Sets: (All)
Aliases: wi
Required: False
Position: Named
Default value: None
Accept pipeline input: False
Accept wildcard characters: False
This cmdlet supports the common parameters: -Debug, -ErrorAction, -ErrorVariable, -InformationAction, -InformationVariable, -OutVariable, -OutBuffer, -PipelineVariable, -Verbose, -WarningAction, and -WarningVariable. For more information, see about_CommonParameters.
Learn more about PowerShell: http://jdhitsolutions.com/blog/essential-powershell-resources/