zsh-autosuggestions icon indicating copy to clipboard operation
zsh-autosuggestions copied to clipboard

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

Open SeanOBoyle opened this issue 3 years ago • 9 comments

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 a411ef3e0992d4839f0732ebeb9823024afaaaa8

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

SeanOBoyle avatar Feb 04 '22 22:02 SeanOBoyle

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

raghur avatar Mar 27 '22 04:03 raghur

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

adamshand avatar Apr 10 '22 08:04 adamshand

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.)

SeanOBoyle avatar Apr 10 '22 19:04 SeanOBoyle

+1

brookhong avatar Jun 30 '22 02:06 brookhong

+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))

ngilles-aiven avatar Sep 28 '22 10:09 ngilles-aiven

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.

adamshand avatar Sep 28 '22 20:09 adamshand

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?

ngilles-aiven avatar Sep 29 '22 08:09 ngilles-aiven

I looked into this issue last week, https://github.com/brookhong/zsh-autosuggestions/commit/66aa318713277cb66676f77d63fb2696b54882df seems to have fixed the issue for me.

brookhong avatar Sep 29 '22 13:09 brookhong

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!!!

adamshand avatar Oct 02 '22 20:10 adamshand