zsh-z: Tab completion not working

Hello! First off, thank you so much for the plugin, it’s awesome!

Secondly, I’m running a bare bones zsh with just a .zshrc file that I’ve created and for some reason tab completion does not work with z.

This is the contents of the .zshrc

bindkey -e
# End of lines configured by zsh-newuser-install

# The following lines were added by compinstall
zstyle :compinstall filename '${HOME}/.zshrc'

autoload -Uz compinit
# End of lines added by compinstall

# Allow comments even in interactive shells.
setopt interactive_comments
# Add command to history file immediately after hitting Enter
setopt inc_append_history
# Share history between terminals
setopt share_history

# Zstyle stuff
zstyle ':completion:*' menu select

# Aliases
alias ls='ls -G -F'
alias ll='ls -G -F -lh'
alias zshconfig="vim ~/.zshrc"
alias zr="source ~/.zshrc"
alias gs="git status"
alias gco="git checkout"
alias gcu="git commit --amend --no-edit"
alias gd="git diff"
alias c="code"
alias cat="bat"
alias python="python3"
alias e="open -a /Applications/Emacs.app $@"
alias em="/usr/local/bin/emacsclient -n"

## Functions
mkcdir() {
  mkdir -p -- "$1" &&
    cd -P -- "$1"

dclean() {
  docker stop $(docker ps -aq)
  docker rm -v $(docker ps -aq)

# Exports
# Remove duplicates from $PATH
typeset -U PATH path
export PATH=$PATH:$HOME/.toolbox/bin:$HOME/Library/Python/3.7/bin
export EDITOR="/Applications/Emacs.app/Contents/MacOS/Emacs"
export JAVA_HOME="$(/usr/libexec/java_home)"
export ZSH_PLUGIN_DIR="$HOME/.zsh_plugins"

# Plugins
# Z
source $ZSH_PLUGIN_DIR/zsh-z/zsh-z.plugin.zsh

Contents of z -l:

 ~ 👉 z -l
3.85       /Users/dimiha/scripts
7.78       /private/tmp

When I type z tm<TAB>, i don’t get the path expanded to /private/tmp.

Am i doing anything wrong?

About this issue

  • Original URL
  • State: closed
  • Created 4 years ago
  • Comments: 15 (8 by maintainers)

Most upvoted comments

Try putting

autoload -Uz compinit


source $ZSH_PLUGIN_DIR/zsh-z/zsh-z.plugin.zsh

Let me know if that helps!