Modules/CD/Pscx.CD.psm1

#---------------------------------------------------------------------------
# Author: Keith Hill
# Desc: Module that replaces the regular CD function with one that handles
# history and backward/forward navigation using - and +.
# as ..[.]*.
# Date: Nov 18, 2006
# Site: http://pscx.codeplex.com
#---------------------------------------------------------------------------
#requires -Version 3
Set-StrictMode -Version Latest

$backwardStack = new-object System.Collections.ArrayList
$forewardStack = new-object System.Collections.ArrayList

# We are going to replace the PowerShell default "cd" alias with the CD function defined below.
Set-Alias cd Set-LocationEx -Force -Scope Global -Option AllScope -Description "PSCX alias"

<#
.SYNOPSIS
    CD function that tracks location history allowing easy navigation to previous locations.
.DESCRIPTION
    CD function that tracks location history allowing easy navigation to previous locations.
    CD maintains a backward and forward stack mechanism that can be navigated using "cd -"
    to go backwards in the stack and "cd +" to go forwards in the stack. Executing "cd"
    without any parameters will display the current stack history. By default, the new location
    is echo'd to the host. If you want to suppress this set the preference variable in your
    profile e.g. $Pscx:Preferences['CD_EchoNewLocation'] = $false
.PARAMETER Path
    The path to change location to.
.PARAMETER LiteralPath
    The literal path to change location to. This path can contain wildcard characters that
    do not need to be escaped.
.PARAMETER PassThru
    If the PassThru switch is specified the object passed into the CD function is also output
    from the function. This allows the next pipeline stage to also operate on the object.
.PARAMETER UnboundArguments
    This parameter accumulates all the additional arguments and concatenates them to the Path
    or LiteralPath parameter using a space separator. This allows you to cd to some paths containing
    spaces without having to quote the path e.g. 'cd c:\program files'. Note that this doesn't always
    work. For example, this following won't work: 'cd c:\program files (x86)'. This fails because
    PowerShell tries to evaluate the contents of the expression '(x86)' which isn't a valid command name.
.PARAMETER UseTransaction
    Includes the command in the active transaction. This parameter is valid only when a transaction
    is in progress. For more information, see about_Transactions.
.EXAMPLE
    C:\PS> cd $pshome; cd -; cd +
    This example changes location to the PowerShell install dir, then back to the original
    location, than forward again to the PowerShell install dir.
.EXAMPLE
    C:\PS> cd ....
    This example changes location up two levels from the current path. You can use an arbitrary
    number of periods to indicate how many levels you want to go up. A single period "." indicates
    the current location. Two periods ".." indicate the current location's parent. Three periods "..."
    indicates the current location's parent's parent and so on.
.EXAMPLE
    C:\PS> cd
    Executing CD without any parameters will cause it to display the current stack contents.
.EXAMPLE
    C:\PS> cd -0
    Changes location to the very first (0th index) location in the stack. Execute CD without any parameters
    to see all the paths, then execute CD -<number> to change location to that path.
.EXAMPLE
    C:\PS> $profile | cd
    This example will change location to the parent location of $profile.
.NOTES
    This is a PSCX function.
#>

function Set-LocationEx
{
    [CmdletBinding(DefaultParameterSetName='Path')]
    param(
        [Parameter(Position=0, ParameterSetName='Path', ValueFromPipeline=$true, ValueFromPipelineByPropertyName=$true)]
        [string]
        $Path, 
        
        [Parameter(Position=0, ParameterSetName='LiteralPath', ValueFromPipelineByPropertyName=$true)]
        [Alias("PSPath")]
        [string]
        $LiteralPath, 
        
        [Parameter(ValueFromRemainingArguments=$true)]
        [string[]]
        $UnboundArguments,
                
        [Parameter()]
        [switch]
        $PassThru,
        
        [Parameter()]
        [switch]
        $UseTransaction        
    )
    
    Begin 
    {
        Set-StrictMode -Version Latest
        
        # String resources
        Import-LocalizedData -BindingVariable msgTbl -FileName Messages
                      
        function SetLocationImpl($path, [switch]$IsLiteralPath)
        {
            if ($pscmdlet.ParameterSetName -eq 'LiteralPath' -or $IsLiteralPath)
            {
                Write-Debug   "Setting location to literal path: '$path'"
                Set-Location -LiteralPath $path -UseTransaction:$UseTransaction
            }
            else
            {
                Write-Debug   "Setting location to path: '$path'"
                Set-Location $path -UseTransaction:$UseTransaction
            }
            
            if ($PassThru)
            {
                Write-Output $ExecutionContext.SessionState.Path.CurrentLocation
            }
            else
            {
                # If not passing thru, then check for user options of other info to display.
                if ($Pscx:Preferences['CD_GetChildItem'])
                {
                    Get-ChildItem
                } 
                elseif ($Pscx:Preferences['CD_EchoNewLocation'])
                {
                    Write-Host $ExecutionContext.SessionState.Path.CurrentLocation
                }
            }
        }
    }
        
    Process 
    {
        if ($pscmdlet.ParameterSetName -eq 'Path')
        {
            Write-Debug "Path parameter received: '$Path'"
            $aPath = $Path
        }
        else
        {
            Write-Debug "LiteralPath parameter received: '$LiteralPath'"
            $aPath = $LiteralPath
        }
        
        if ($UnboundArguments -and $UnboundArguments.Count -gt 0)
        {    
            $OFS=','
            Write-Debug "Appending unbound arguments to path: '$UnboundArguments'"
            $aPath = $aPath + " " + ($UnboundArguments -join ' ')
        }
                
        # If no input, dump contents of backward and foreward stacks
        if (!$aPath) 
        {
            # Command to dump the backward & foreward stacks
            ""
            " # Directory Stack:"
            " --- ----------------"
            if ($backwardStack.Count -ge 0) 
            {
                for ($i = 0; $i -lt $backwardStack.Count; $i++) 
                { 
                    " {0,3} {1}" -f $i, $backwardStack[$i]
                } 
            }

            "-> {0,3} {1}" -f $i++,$ExecutionContext.SessionState.Path.CurrentLocation

            if ($forewardStack.Count -ge 0) 
            {
                $ndx = $i
                for ($i = 0; $i -lt $forewardStack.Count; $i++) 
                { 
                    " {0,3} {1}" -f ($ndx+$i), $forewardStack[$i]
                } 
            }
            ""
            return
        }
        
        Write-Debug "Processing arg: '$aPath'"
        
        $currentPathInfo = $ExecutionContext.SessionState.Path.CurrentLocation
        
        # Expand ..[.]+ out to ..\..[\..]+
        if ($aPath -like "*...*") 
        {
            $regex = [regex]"\.\.\."
            while ($regex.IsMatch($aPath)) 
            {
                $aPath = $regex.Replace($aPath, "..\..")
            }
        }

        if ($aPath -eq "-") 
        {
            if ($backwardStack.Count -eq 0) 
            {
                Write-Warning $msgTbl.BackStackEmpty
            }
            else 
            {        
                $lastNdx = $backwardStack.Count - 1
                $prevPath = $backwardStack[$lastNdx]
                SetLocationImpl $prevPath -IsLiteralPath
                [void]$forewardStack.Insert(0, $currentPathInfo.Path)
                $backwardStack.RemoveAt($lastNdx)
            }
        }
        elseif ($aPath -eq "+") 
        {
            if ($forewardStack.Count -eq 0) 
            {
                Write-Warning $msgTbl.ForeStackEmpty
            }
            else 
            {
                $nextPath = $forewardStack[0]
                SetLocationImpl $nextPath -IsLiteralPath        
                [void]$backwardStack.Add($currentPathInfo.Path)
                $forewardStack.RemoveAt(0)
            }
        }
        elseif ($aPath -like "-[0-9]*")
        {
            [int]$num = $aPath.replace("-","")
            $backstackSize = $backwardStack.Count
            $forestackSize = $forewardStack.Count
            if ($num -eq $backstackSize) 
            {
                Write-Host "`n$($msgTbl.GoingToTheSameDir)`n"
            }
            elseif ($num -lt $backstackSize) 
            {
                $selectedPath = $backwardStack[$num]
                SetLocationImpl $selectedPath -IsLiteralPath
                [void]$forewardStack.Insert(0, $currentPathInfo.Path)
                $backwardStack.RemoveAt($num)
                
                [int]$ndx = $num
                [int]$count = $backwardStack.Count - $ndx
                if ($count -gt 0) 
                {
                    $itemsToMove = $backwardStack.GetRange($ndx, $count)
                    $forewardStack.InsertRange(0, $itemsToMove)
                    $backwardStack.RemoveRange($ndx, $count)
                }
            }
            elseif (($num -gt $backstackSize) -and ($num -lt ($backstackSize + 1 + $forestackSize))) 
            {
                [int]$ndx = $num - ($backstackSize + 1)
                $selectedPath = $forewardStack[$ndx]
                SetLocationImpl $selectedPath -IsLiteralPath
                [void]$backwardStack.Add($currentPathInfo.Path)
                $forewardStack.RemoveAt($ndx)
                
                [int]$count = $ndx
                if ($count -gt 0) 
                {
                    $itemsToMove = $forewardStack.GetRange(0, $count)
                    $backwardStack.InsertRange(($backwardStack.Count), $itemsToMove)
                    $forewardStack.RemoveRange(0, $count)
                }
            }
            else 
            {
                Write-Warning ($msgTbl.NumOutOfRangeF1 -f $num)
            }
        }
        else
        {
            $driveName = ''
            if ($ExecutionContext.SessionState.Path.IsPSAbsolute($aPath, [ref]$driveName) -and
                !(Test-Path -LiteralPath $aPath -PathType Container)) 
            {
                # File or a non-existant path - handle the case of "cd $profile" when the profile script doesn't exist
                $aPath = Split-Path $aPath -Parent
                Write-Debug "Path is not a container, attempting to set location to parent: '$aPath'"
            }

            SetLocationImpl $aPath                                  
                                   
            $forewardStack.Clear()
            
            # Don't add the same path twice in a row
            if ($backwardStack.Count -gt 0) 
            {
                $newPathInfo = $ExecutionContext.SessionState.Path.CurrentLocation
                if (($currentPathInfo.Provider     -eq $newPathInfo.Provider) -and
                    ($currentPathInfo.ProviderPath -eq $newPathInfo.ProviderPath)) 
                {
                    return
                }
            }
            [void]$backwardStack.Add($currentPathInfo.Path)
        }
    }
}

# SIG # Begin signature block
# MIIfUwYJKoZIhvcNAQcCoIIfRDCCH0ACAQExCzAJBgUrDgMCGgUAMGkGCisGAQQB
# gjcCAQSgWzBZMDQGCisGAQQBgjcCAR4wJgIDAQAABBAfzDtgWUsITrck0sYpfvNR
# AgEAAgEAAgEAAgEAAgEAMCEwCQYFKw4DAhoFAAQU/N+2YjAb8BwwSkc7vrxeWb6e
# MX2gghqFMIIGajCCBVKgAwIBAgIQAwGaAjr/WLFr1tXq5hfwZjANBgkqhkiG9w0B
# AQUFADBiMQswCQYDVQQGEwJVUzEVMBMGA1UEChMMRGlnaUNlcnQgSW5jMRkwFwYD
# VQQLExB3d3cuZGlnaWNlcnQuY29tMSEwHwYDVQQDExhEaWdpQ2VydCBBc3N1cmVk
# IElEIENBLTEwHhcNMTQxMDIyMDAwMDAwWhcNMjQxMDIyMDAwMDAwWjBHMQswCQYD
# VQQGEwJVUzERMA8GA1UEChMIRGlnaUNlcnQxJTAjBgNVBAMTHERpZ2lDZXJ0IFRp
# bWVzdGFtcCBSZXNwb25kZXIwggEiMA0GCSqGSIb3DQEBAQUAA4IBDwAwggEKAoIB
# AQCjZF38fLPggjXg4PbGKuZJdTvMbuBTqZ8fZFnmfGt/a4ydVfiS457VWmNbAklQ
# 2YPOb2bu3cuF6V+l+dSHdIhEOxnJ5fWRn8YUOawk6qhLLJGJzF4o9GS2ULf1ErNz
# lgpno75hn67z/RJ4dQ6mWxT9RSOOhkRVfRiGBYxVh3lIRvfKDo2n3k5f4qi2LVkC
# YYhhchhoubh87ubnNC8xd4EwH7s2AY3vJ+P3mvBMMWSN4+v6GYeofs/sjAw2W3rB
# erh4x8kGLkYQyI3oBGDbvHN0+k7Y/qpA8bLOcE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