In your .zshrc you have the following two lines:
plugins=(z zsh-autosuggestions)
plugins=(zsh-autosuggestions)
The second line remove the z plugin. You should have only one line with:
plugins=(z zsh-autosuggestions)
According to the ZSH-z plugin Github homepage:
Answer from Ortomala Lokni on Stack OverflowZSH-z is a command line tool that allows you to jump quickly to directories that you have visited frequently in the past, or recently -- but most often a combination of the two (a concept known as "frecency"). It works by keeping track of when you go to directories and how much time you spend in them. It is then in the position to guess where you want to go when you type a partial string, e.g.
z srcmight take you to~/src/zsh.
Why plugin z of zsh is not active inside the .zshrc? - Stack Overflow
PSA: Bug in Z plugin from oh-my-zsh
My favorite Oh My Zsh plugins
What is the best plugin manager in your opinion?
Videos
I did some debugging of the Z plugin from oh-my-zsh recently as some of the functionality didn't seem to work for me. In particular:
-
_Z_NO_RESOLVE_SYMLINKSwasn't working - it was showing the messy actual path rather than the nice symlinked one. -
Also
_Z_EXCLUDE_DIRSwasn't working either. It wasn't excluding any directories from its database.
Turns out the first problem was my issue. In my .zshrc I needed to set that variable before loading oh-my-zsh not after (doh!).
But the second issue seems to be a bug in the plugin code. To fix you need to edit the file {oh-my-zsh-directory}/plugins/z/z.sh
Line 60 of that file should read:
case "$*" in "$exclude"*) return;; esac
(the second " should come before the * not after).
I've submitted a pull-request but I have no idea how long these things take.
Hope this helps someone out there!
Here are my favorite Oh My Zsh plugins:
-
colored-man-pages - adds color to man pages
-
command-not-found - suggests packages to install if a command cannot be found
-
fancy-ctrl-z - use ctrl+z to suspend your process and press ctrl+z again to get back (useful if you use terminal text editor)
-
sudo - prefix your current or previous commands with sudo by pressing esc twice (good for noobs!)
-
zoxide - smarter cd command
You can find all the plugins here. I hope it helps!