Skip to content

_zsh_autosuggest_bind_widget:zle:47: widget name `.foo' is protected #653

Open

Description

@SeanOBoyle

Describe the bug

This is probably more a cry for help than an autosuggest bug.. any guidance as to what this error message means would be really appreciated before this bug is rightly closed as 'not repeatable'
I am not able to repeat when I only source autosuggest.

On this specific OS (see below) - after a series of 'cd' and 'ls' commands the console will start to see the following on every command:
_zsh_autosuggest_bind_widget:zle:47: widget name `.foo' is protected
repeated across many widgets (see bottom of bug for the real and complete list)

Repeating commands can make this error message appear and disappear.
Sometimes the error doesn't appear immediately - it takes a series of command line commands before it appears .. then it gets stuck - so it appears on every command .. and then after another series of 'cd' and 'ls' or other simple commands .. it eventually disappears. Only to again appear later.
This makes the usual technique of removing lines from the rc file to find the offender really challenging.
So far the only sure-fire way to get rid of the error message is to comment out autosuggestions -- and I don't want to do that!

Also worth noting that I use this same rc file across a number of different machines / OS; I only have this issue on one OS: Oracle Linux 7 (see below for details)

To Reproduce

Steps to reproduce the behavior:
load the rc file posted here: https://github.com/SeanOBoyle/zshrc on an Oracle Linux 7 machine. Type commands until the error message appears.

% zsh -df
% source path/to/zsh-autosuggestions.zsh
% ... # what do you do to reproduce?

Not able to reproduce when I only source autosuggestions.

Expected behavior

Screenshots

NA

Desktop

  • OS + distribution: Oracle Linux Server release 7.9 (3.10.0-1160.24.1.el7.x86_64)

  • Zsh version: 5.0.2

  • Plugin version: commit a411ef3

Additional context

Full Error Output:

_zsh_autosuggest_bind_widget:zle:47: widget name `.accept-and-hold' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.accept-and-infer-next-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.accept-and-menu-complete' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.accept-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.accept-line-and-down-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.accept-search' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.argument-base' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.auto-suffix-remove' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.auto-suffix-retain' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.backward-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.backward-delete-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.backward-delete-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.backward-kill-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.backward-kill-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.backward-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.beep' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.beginning-of-buffer-or-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.beginning-of-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.beginning-of-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.beginning-of-line-hist' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.capitalize-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.clear-screen' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.complete-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.copy-prev-shell-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.copy-prev-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.copy-region-as-kill' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.delete-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.delete-char-or-list' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.delete-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.describe-key-briefly' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.digit-argument' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.down-case-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.down-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.down-line-or-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.down-line-or-search' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.emacs-backward-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.emacs-forward-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.end-of-buffer-or-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.end-of-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.end-of-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.end-of-line-hist' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.end-of-list' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.exchange-point-and-mark' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.execute-last-named-cmd' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.execute-named-cmd' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.expand-cmd-path' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.expand-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.expand-or-complete' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.expand-or-complete-prefix' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.expand-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.forward-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.forward-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.get-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.gosmacs-transpose-chars' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-beginning-search-backward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-beginning-search-forward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-incremental-pattern-search-backward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-incremental-pattern-search-forward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-incremental-search-backward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-incremental-search-forward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-search-backward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.history-search-forward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.infer-next-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.insert-last-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.kill-buffer' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.kill-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.kill-region' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.kill-whole-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.kill-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.list-choices' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.list-expand' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.magic-space' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.menu-complete' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.menu-expand-or-complete' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.menu-select' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.neg-argument' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.overwrite-mode' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.pound-insert' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.push-input' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.push-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.push-line-or-edit' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.quote-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.quote-region' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.quoted-insert' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.read-command' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.recursive-edit' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.redisplay' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.redo' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.reset-prompt' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.reverse-menu-complete' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.run-help' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.self-insert' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.self-insert-unmeta' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.send-break' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.set-local-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.set-mark-command' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.spell-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.transpose-chars' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.transpose-words' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.undefined-key' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.undo' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.universal-argument' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.up-case-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.up-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.up-line-or-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.up-line-or-search' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-add-eol' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-add-next' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-backward-blank-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-backward-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-backward-delete-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-backward-kill-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-backward-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-beginning-of-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-caps-lock-panic' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-change' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-change-eol' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-change-whole-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-cmd-mode' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-delete' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-delete-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-digit-or-beginning-of-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-down-line-or-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-end-of-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-fetch-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-find-next-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-find-next-char-skip' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-find-prev-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-find-prev-char-skip' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-first-non-blank' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-forward-blank-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-forward-blank-word-end' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-forward-char' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-forward-word' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-forward-word-end' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-goto-column' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-goto-mark' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-goto-mark-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-history-search-backward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-history-search-forward' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-indent' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-insert' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-insert-bol' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-join' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-kill-eol' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-kill-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-match-bracket' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-open-line-above' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-open-line-below' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-oper-swap-case' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-pound-insert' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-put-after' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-put-before' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-quoted-insert' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-repeat-change' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-repeat-find' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-repeat-search' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-replace' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-replace-chars' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-rev-repeat-find' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-rev-repeat-search' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-set-buffer' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-set-mark' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-substitute' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-swap-case' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-undo-change' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-unindent' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-up-line-or-history' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-yank' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-yank-eol' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.vi-yank-whole-line' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.what-cursor-position' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.where-is' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.which-command' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.yank' is protected
_zsh_autosuggest_bind_widget:zle:47: widget name `.yank-pop' is protected

Activity

  1. raghur commented on Mar 27, 2022

    @raghur

    In the same boat....

    I'm trying to see what could cause it - there another bug around this plugin conflicting with syntax highlighting #673 . On a whim, I've disabled syntax highlighting - and at least it's not crapped out for the last 10 mins

  2. adamshand commented on Apr 10, 2022

    @adamshand

    I'm getting this as well, haven't figured out what's going on yet;.

  3. SeanOBoyle commented on Apr 10, 2022

    @SeanOBoyle
    Author

    I'm now seeing this issue with Ubuntu 20.04.4 LTS.

    (Previously I had only seen the issue on the somewhat archaic Oracle Linux 7.)

  4. brookhong commented on Jun 30, 2022

    @brookhong

    +1

  5. ngilles-aiven commented on Sep 28, 2022

    @ngilles-aiven

    +1 let me pile on, I get this on Ubuntu 22.04 LTS, as well (zsh version zsh 5.8.1 (x86_64-ubuntu-linux-gnu))

  6. adamshand commented on Sep 28, 2022

    @adamshand

    It’s very strange. I have the same .zshrc on four computers (one Mac and three Debian) and it only happens on one of the Debian boxes. All running the same version of zsh.

    I also use syntax highlighting, Will try disabling that and see if it makes a deference.

  7. ngilles-aiven commented on Sep 29, 2022

    @ngilles-aiven

    Yeah, it doesn't seem dependent on zsh version, maybe there are some specific system level scripts/compilation options that are done on ubuntu/debian?

  8. added a commit that references this issue on Sep 29, 2022
    66aa318
  9. brookhong commented on Sep 29, 2022

    @brookhong

    I looked into this issue last week, brookhong@66aa318 seems to have fixed the issue for me.

  10. adamshand commented on Oct 2, 2022

    @adamshand

    I looked into this issue last week, brookhong@66aa318 seems to have fixed the issue for me.

    This seems to have fixed it for me, thanks!!!

  11. added a commit that references this issue on Sep 2, 2023
    ed802d9
  12. added a commit that references this issue on Sep 2, 2025
    ef0f270
  13. brookhong commented on Nov 20, 2025

    @brookhong

    For anyone who has this issue, could you please confirm whether you're using https://github.com/agkozak/agkozak-zsh-prompt? I recently just removed the plugin, which seems also fixing this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions