Remove hard-coded ignore of zle-* widgets and add to default config

Use case suggested by @romkatv uses zle-line-init to restore buffer
after running a widget to cd up one level (GitHub #431).

As far as I can tell, the ignoring of zle-line-* was added in commit
9788c2e to support some deprecation warnings that were removed some time
ago.

The pattern was then widened in commit 0c940e7 to zle-* to fix problems
encountered when wrapping zle-isearch-update.

This commit removes the hard coded ignore of all zle-* widgets and adds
zle-* to the default list of widgets to be ignored. Users who want the
plugin to wrap zle-line-init or zle-line-finish can override the
default.
This commit is contained in:
Eric Freese
2019-05-27 13:37:25 -06:00
parent 15bcfd7126
commit 0d3bbaf8e6
4 changed files with 19 additions and 2 deletions

View File

@@ -69,7 +69,6 @@ _zsh_autosuggest_bind_widgets() {
ignore_widgets=(
.\*
_\*
zle-\*
autosuggest-\*
$ZSH_AUTOSUGGEST_ORIGINAL_WIDGET_PREFIX\*
$ZSH_AUTOSUGGEST_IGNORE_WIDGETS