Time is finite. The system endures, but only in bursts of stolen hours. Feature requests gather like stardust—brilliant, infinite, out of reach. Invoke /coffee to recharge the core and rekindle the forge. Your signal boosts morale. ☕⚡
Harness the echoes of your own movement—z
learns as you roam.
With each cd
, it maps your path, shaping memory into motion.
A PowerShell-native port of the legendary z from the Bash realms.
Install it from the PowerShell Gallery and let your history guide your future.
Since the cycle of June 2013, this utility has been forged through hours of iteration—tweaked, refined, and honed to align with PowerShell's rhythm. Born from necessity, it became a tool of mastery, accelerating my traversal through the filesystem—a realm I once wandered daily.
There are no unit tests yet (one day, perhaps), but its true purpose was never perfection. It was time. Time saved. Knowledge gained.
Its mission is simple: bypass the burden of full pathnames and leap to frecent locations with speed and grace. Stable. Swift. Battle-tested. May it serve you as it has served me.
Once installed, begin the ritual—cd
into a few directories. Let the system observe. Let the memory form.
cd foo
cd HKLM:\software\Microsoft\Office
cd 'C:\Windows\Microsoft.NET\Framework64\v4.0.30319\Temporary ASP.NET Files'
Based on the examples above, try executing some of these commands.
z foo cd to most frecent folder matching foo
z temp cd to most frecent folder matching `Temporary ASP.NET Files`
z foo -o r cd to highest ranked folder matching foo
z foo -o f cd to highest frecency folder matching foo
z foo -o t cd to the most recently accessed folder matching foo
z -l foo list all dirs matching regex foo
z -l list all entries
z office cd to most frecent folder matching office in drive HKLM (The registry)
z -x remove the current directory from the datafile
z -clean delete inaccessible paths from the datafile
z c:\windows go to c:\windows and log in the datafile (works with
8000
any valid path)
z c<TAB> expand entries in the datafile which match 'c'
OK, back to normal writing style.
Below is a list of features which have not yet been ported from the original z
bash script...yet.
- Specifying two separate regex's and matching on both, i.e.
z foo bar
- Does not have the ability to restrict searches to sub-directories of the current directory
-
Tab completion support (will not currently work if you have PowerTab installed)
-
Works with registry paths such as
HKLM\Software\....
and NetBIOS paths such as\\server\share
. -
Executing
pushd
will record the current directory for use withz
.
For those with Windows 10, you can issue a Install-Module z -AllowClobber
command.
For those running the latest version of PowerShell PowerShellGet\Install-Module z -Scope CurrentUser -Force -AllowClobber
For those with Windows Vista or 7 who are using PowerShell version 3 or 4, you'll need to install PackageManagement first before executing Install-Module z -AllowClobber
.
See the module listing in the official PowerShell gallary
Once complete, run the command Import-Module z
. For ease of use I recomend placing this command in your PowerShell startup profile. Typically $env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
Download the z.psm1
file and save it to your PowerShell module directory. The default location for this is $env:USERPROFILE\Documents\WindowsPowerShell\Modules
(relative to your Documents folder). You can also extract it to another directory listed in your $env:PSModulePath
. The full installation path should be $env:USERPROFILE\Documents\WindowsPowerShell\Modules\z\z.psm1
.
Assuming you want z
to be avilable in every PowerShell session, open your profile script located at $env:USERPROFILE\Documents\WindowsPowerShell\Microsoft.PowerShell_profile.ps1
and add the following line.
Import-Module z
If the file Microsoft.PowerShell_profile.ps1
does not exist, you can simply create it and it will be executed the next time a PowerShell session starts.
Once the module is installed and has been imported in to your session you can start jumping around. Remember, you need to build up the DB of directories first so be sure to cd
around your file system. You can also use z
as an alternative to the cd
command.