I installed with zplug:

zplug "junegunn/fzf-bin", from:gh-r, as:command, rename-to:fzf, use:"*${(L)$(uname -s)}*amd64*"
zplug "junegunn/fzf", use:"shell/*.zsh", defer:2
zplug "peco/peco", as:command,     from:gh-r, use:"*${(L)$(uname -s)}*amd64*"

zplug "lincheney/fzf-tab-completion", use:"zsh/fzf-zsh-completion.sh"

Observe that I also have zsl-autosuggestions and zsh-completions installed.

The options/functions – I tried to comment which one of them caused No such widget:

autoload -Uz async && async             
autoload -Uz add-zsh-hook               
autoload -Uz compinit && compinit       
autoload -Uz url-quote-magic            
autoload -Uz vcs_info                   
setopt autocd                           
setopt append_history                   
setopt auto_list                        
setopt auto_menu                        
setopt auto_pushd                       
setopt extended_history                 
setopt hist_expire_dups_first           
setopt hist_find_no_dups                
setopt hist_ignore_dups                 
setopt hist_ignore_all_dups             
setopt hist_reduce_blanks               
setopt hist_save_no_dups                
setopt hist_ignore_space                
setopt inc_append_history               
setopt interactive_comments                               
setopt magic_equal_subst                                      
setopt print_eight_bit                  
setopt print_exit_value                 
setopt prompt_subst                     
setopt pushd_ignore_dups                
setopt share_history                    
setopt transient_rprompt


The keybindings – bindkey '^I' fzf_completions was caused by No such widget. But if I commented it, and pressed Tab, it still would give No such widget `1'.

bindkey  "^[[H"   beginning-of-line
bindkey  "^[[F"   end-of-line
bindkey  '^I'     fzf_completions


The checks:

if zplug check "junegunn/fzf-bin"; then
    export FZF_DEFAULT_OPTS="--height 40% --reverse --border --inline-info --color=dark,bg+:235,hl+:10,pointer:5"

if zplug check "zsh-users/zsh-autosuggestions"; then

if zplug check "junegunn/fzf-bin"; then
    alias base="base64"
    alias decode="decode64"
    alias encode="encode64"

The completions – I also tried to comment each one of them to solve, but the problem is unclear:

zstyle ':completion::complete:*' gain-privileges 1
zstyle ':completion:*:descriptions' format '%B%d%b'
zstyle ':completion:*:descriptions' format '%U%F{yellow}%d%f%u'
zstyle ':completion:*:messages' format '%d'
zstyle ':completion:*:warnings' format 'No matches for: %d'
zstyle ':completion:*' completer _expand _complete _ignored _approximate
zstyle ':completion:*' group-name ''
zstyle ':completion:*' menu select=2
zstyle ':completion:*' rehash true
zstyle ':completion:*' select-prompt '%SScrolling active: current selection at %p%s'
zstyle ':completion:*' verbose yes
zstyle ':completion:*' matcher-list 'm:{a-zA-Z}={A-Za-z}' 'r:|=*' 'l:|=* r:|=*'
zstyle ':completion:*' list-colors "${(s.:.)LS_COLORS}"

The origin of the cause remains unclear. I can not figure which caused it.


1 Answer 1


Getting No such widget when your press Tab means you have a bindkey statement that has bound Tab to a widget that does not actually exist or the widget you've bound to Tab is trying to invoke another widget that does not exist.

To find out what's bound to your Tab key, do

bindkey '^I'

This will output something like

"^I" fzf-completion

To find out if this widget exists:

  1. In your ~/.zshrc file, disable zsh-autosuggestions.
  2. Restart your terminal.
  3. Then do
    zle -lL fzf-completion

If the widget does not exist, the command above will output nothing at all. In that case, you've found the problem. You can then fix it by binding your Tab key to a widget that does exist.

If the command above outputs something like this: ```sh zle -N fzf-completion ``` or perhaps something like this ```sh zle -C complete-word .complete-word _main_complete ``` then the widget exists. In that case, the _last_ of the words in the output tells you the name of the function that implements the widget.

You can then do the following to find out where the function is coming from:

type fzf-completion

This will output something like

fzf-completion is a shell function from /path/to/fzf/completion/completion

You can then open the file to inspect the code. Or, if you prefer, you can turn on tracing for that function, like this:

functions -t fzf-completion

In either, try to look for a statement like zle widget-name. Then, you can try to see if that widget exists, in the manner described above.

This way, you can find the exact spot where things go wrong and then fix the problem.

Not the answer you're looking for? Browse other questions tagged or ask your own question.