ohmyzsh: New z plugin does not work by placing it into ~/.zshrc → plugins=(... z) array
Describe the bug
At this moment oh-my-zsh plugin docs saying that any plugin listed is enabled by listing it in plugins=(...) array.
Doing so with new version of z causes:
zsh: command not found: z
Steps to reproduce
- Upgrade to latest oh-my-zsh
- in .zshrc put z into plugins array
- reload terminal
- navigate with z
zsh: command not found: z
Expected behavior
I expect z to work once placed into plugins array.
Screenshots and recordings
My .zshrc:
# Oh My Zsh
export ZSH=$HOME/.oh-my-zsh # Path to oh-my-zsh installation.
export ZSH_COMPDUMP=$ZSH/cache/.zcompdump-$HOST # Store zsh's completion cache inside oh-my-zsh cache folder
# Oh My Zsh config variables
ZSH_THEME=half-life
ENABLE_CORRECTION=true
ZSH_CUSTOM=~/.config/oh-my-zsh-custom # my oh-my-zsh customization folder. contains aliases, functions, plugins, etc.
plugins=(z)
# Init Oh My Zsh after its config variables are set
source $ZSH/oh-my-zsh.sh
OS / Linux distribution
MacOS Monterey 12.6 (21G115)
Zsh version
5.9
Oh My Zsh version
master (0066280)
Terminal emulator
iTerm2
Additional context
agkozak version of z installation section mentions to use a plugin manager to install it. So plugins approach won’t work with it and to install new z a plugin manager needs to be used?
About this issue
- Original URL
- State: closed
- Created 2 years ago
- Comments: 15 (6 by maintainers)
You have a custom
aliases.zshfile that deletes all aliases:Without aliases, there is no alias named
z, which is how the plugin works.You can set
alias 'z=zshz 2>&1'in theoh-my-zsh-custom/aliases.zshfile if you still want to keep theunalias -m '*'line.