ZLocation is the new Jump-Location
PowerShell C#
Switch branches/tags
Nothing to show
Clone or download
Latest commit e22d9e1 Mar 22, 2018

README.md

Build status

ZLocation

Join the chat at https://gitter.im/vors/ZLocation

Tracks your most used directories, based on number of previously run commands. After a short learning phase, z will take you to the most popular directory that matches all of the regular expressions given on the command line. You can use Tab-Completion / Intellisense to pick directories that are not the first choice.

ZLocation is the successor of Jump-Location. Like z.sh is a reimagined clone of autojump, Zlocation is a reimagined clone of Jump-Location.

Usage

ZLocation keeps track of your $pwd (current folder). Once visited, folder become known to ZLocation. You can cd with just a hint of the path!

The full command name is Set-ZLocation, but in examples I use alias z. It's all about navigation speed, isn't it?

PS C:\Users\sevoroby> z c:
PS C:\> z zlo
PS C:\dev\ZLocation> z dsc
PS C:\dev\azure-sdk-tools\src\ServiceManagement\Compute\Commands.ServiceManagement\IaaS\Extensions\DSC> z test
PS C:\dev\ZLocation\ZLocation.Tests>

Goals / Key features

  • Support for multiple PS sessions.
  • Customizable matching algorithm and weight function.

Install

Install from PowerShellGet Gallery

Install-Module ZLocation -Scope CurrentUser

Make sure to include ZLocation import in your $profile. It intentionally doesn't alternate $profile automatically on installation.

This one-liner installs ZLocation, imports it and adds it to a profile.

Install-Module ZLocation -Scope CurrentUser; Import-Module ZLocation; "`r`n`r`nImport-Module ZLocation`r`n" >> $profile.CurrentUserAllHosts

If you want to display some additional information about ZLocation on start-up, you can put this snippet in $profile after import.

Write-Host -Foreground Green "`n[ZLocation] knows about $((Get-ZLocation).Keys.Count) locations.`n"

Develop

Run tests

Install Pester. Run Invoke-Pester from the root folder.