# Define cd to work more like Unix/Linux: # * No path argument changes to the users home directory # * Passing "-" for the path argument changes to the previous directory $Global:cdPreviousPath = Get-Location function cd { Param ([string]$Path) if ($Path -eq "") { $Path = "~" } elseif ($Path -eq "-") { $Path = $cdPreviousPath } $Global:cdPreviousPath = Get-Location Set-Location -Path $Path } # TODO: Define rm to work with -rf and multiple entries