< Back
Switch-Location
Post
NAME Switch-Location
SYNOPSIS
Changes current directory to the path in the location stack
SYNTAX
Switch-Location [[-id] <String>] [[-location] <String>] [<CommonParameters>]
DESCRIPTION
If <-id> is specified, uses path with that ID in $LocationStack hashtable.
If <-location> is specified, changes to that location if it can be resolved.
Before changing location, current directory path is recorded in $LocationStack hashtable under 'last' key.
If no parameters specified, changes location to the path defined by 'last' key in $LocationStack hashtable.
PARAMETERS
-id <String>
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-location <String>
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS
https://github.com/PavelStsefanovich/LocationStack
SYNOPSIS
Changes current directory to the path in the location stack
SYNTAX
Switch-Location [[-id] <String>] [[-location] <String>] [<CommonParameters>]
DESCRIPTION
If <-id> is specified, uses path with that ID in $LocationStack hashtable.
If <-location> is specified, changes to that location if it can be resolved.
Before changing location, current directory path is recorded in $LocationStack hashtable under 'last' key.
If no parameters specified, changes location to the path defined by 'last' key in $LocationStack hashtable.
PARAMETERS
-id <String>
Required? false
Position? 1
Default value
Accept pipeline input? false
Accept wildcard characters? false
-location <String>
Required? false
Position? 2
Default value
Accept pipeline input? false
Accept wildcard characters? false
<CommonParameters>
This cmdlet supports the common parameters: Verbose, Debug,
ErrorAction, ErrorVariable, WarningAction, WarningVariable,
OutBuffer, PipelineVariable, and OutVariable. For more information, see
about_CommonParameters (https:/go.microsoft.com/fwlink/?LinkID=113216).
INPUTS
OUTPUTS
RELATED LINKS
https://github.com/PavelStsefanovich/LocationStack