Skip to content

Get PathAlias

Nate Ferrell edited this page Aug 19, 2019 · 2 revisions

Get-PathAlias

SYNOPSIS

Gets the Path alias using either the short name from $PSProfile.GitPathMap or a path alias stored in $PSProfile.PathAliases, falls back to using a shortened version of the root drive + current directory.

SYNTAX

Get-PathAlias [[-Path] <String>] [[-DirectorySeparator] <String>] [<CommonParameters>]

DESCRIPTION

Gets the Path alias using either the short name from $PSProfile.GitPathMap or a path alias stored in $PSProfile.PathAliases, falls back to using a shortened version of the root drive + current directory.

EXAMPLES

EXAMPLE 1

Get-PathAlias

PARAMETERS

-Path

The full path to get the PathAlias for. Defaults to $PWD.Path

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 1
Default value: $PWD.Path
Accept pipeline input: False
Accept wildcard characters: False

-DirectorySeparator

The desired DirectorySeparator character. Defaults to $global:PathAliasDirectorySeparator if present, falls back to [System.IO.Path]::DirectorySeparatorChar if not.

Type: String
Parameter Sets: (All)
Aliases:

Required: False
Position: 2
Default value: $(if ($null -ne $global:PathAliasDirectorySeparator) {
                $global:PathAliasDirectorySeparator
            }
            else {
                [System.IO.Path]::DirectorySeparatorChar
            })
Accept pipeline input: False
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

OUTPUTS

NOTES

RELATED LINKS

PSProfile

Concepts

Function Help

Command Aliases

Configuration

Helpers

Init Scripts

Meta

Modules to Import

Modules to Install

Path Aliases

Plugin Paths

Plugins

Power Tools

Project Paths

Prompts

Script Paths

Secrets

Symbolic Links

Variables

Badges

Azure Pipelines      Discord - Chat      Slack - Chat      Codacy PowerShell Gallery      GitHub Releases      GitHub Releases

Clone this wiki locally