ohmyzsh/plugins/z
Mahesh Subramanian a4f13aec98 fix(z): prevent stack overflow from recursive Tab binding on re-source
The ZLE widget added in #13710 saves the current Tab binding and
delegates to it. If the plugin is sourced more than once, the saved
binding points to the widget itself, causing infinite recursion and
"maximum nested function level reached" errors on any Tab press.

Guard against self-reference by only capturing the binding on first
load and falling back to expand-or-complete if the saved value is
our own widget.

Fixes #13714

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
2026-04-27 12:53:33 -07:00
..
img feat(z): update to version afaf2965 (#12136) 2023-12-28 22:05:37 +01:00
_z chore(z): update to version ae10ba3f (#13710) 2026-04-27 09:20:10 +02:00
LICENSE chore(z): update to version ae10ba3f (#13710) 2026-04-27 09:20:10 +02:00
MANUAL.md chore(z): update to version ae10ba3f (#13710) 2026-04-27 09:20:10 +02:00
README.md feat(z): replace rupa/z with agkozak/zsh-z (#11236) 2022-10-18 19:10:55 +02:00
z.plugin.zsh fix(z): prevent stack overflow from recursive Tab binding on re-source 2026-04-27 12:53:33 -07:00

z - jump around

This plugin defines the z command that tracks your most visited directories and allows you to access them with very few keystrokes.

Example

Assume that you have previously visited directory ~/.oh-my-zsh/plugins. From any folder in your command line, you can quickly access it by using a regex match to this folder:

/usr/bin$ z plug  # Even 'z p' might suffice
~/.oh-my-zsh/plugins$

Setup

To enable z, add z to your plugins array in your zshrc file:

plugins=(... z)

Further reading

For advanced usage and details of z, see MANUAL (copied from agkozak/zsh-z).