Commit Graph

26 Commits (ef657cb38cc197171c39caf2a93984176092f1ba)

Author SHA1 Message Date
Eric Freese 0d3bbaf8e6 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.
6 years ago
romkatv 4a82ff1ead speed up widget rebinding by removing redundant array subscripts 6 years ago
Eric Freese f76472272e cleanup: Remove unnecessary braces 6 years ago
Eric Freese 681ffc7b28 Reset opts in some functions affected by GLOB_SUBST
Should fix GitHub #334
7 years ago
Eric Freese 4e466f0e4e Support widgets starting with dashes (ex: `-a-widget`)
Fixes #337
7 years ago
dana c978004c0e ..._invoke_original_widget: Return 0 when given no arguments
`_zsh_autosuggest_widget_accept()` (&al.) passes this function's return status
on, and ZLE rings the bell if it's >0. Not having an original widget isn't an
error condition, so always returning 0 here should be OK to avoid the bell

Fixes #228
8 years ago
Kaleb Elwert 940e10a691 Fix conditionals to use [[ and (( rather than [
This fixes a small issue in src/widgets.zsh which makes it so if you
alias [ to g[ (as is done in prezto if the gnu-utility module is loaded)
autosuggestions would fail.

The documentation for GNU test mentions that -o and -a should be avoided
if possible because it's not very clear. Also, with zsh and [[ -o
actually tests if an option is set, which makes this option even more
confusing.
8 years ago
Eric Freese 256293cbb6 Use typeset -g to avoid warnnestedvar warnings
Fixes github issue #271
8 years ago
Eric Freese c52c428793 Fix issues with widgets wrapped by other plugins
Puts in a better fix for #126 and related issues.
9 years ago
Eric Freese 75e850577d Gracefully handle being sourced multiple times
Should fix #126
9 years ago
Christian Höltje 0c940e70f2 Don't bind any zle-* methods
It seems like all the zle-* methods are special and shouldn't be
monkeyed with.

Specifically `zle-isearch-update` and friends. Binding that widget
caused `history-incremental-pattern-search` to stop working.

Fixes zsh-users/zsh-syntax-highlighting#387
9 years ago
Eric Freese 25f4afb058 Add ZSH_AUTOSUGGEST_IGNORE_WIDGETS array 9 years ago
Eric Freese 964773aa75 Use array indices for forward compatibility
See issue #152
9 years ago
Eric Freese 945c660856 Fix #152 by escaping widget names inside evals
Solves problems when dealing with widget names with irregular
characters such as those that come from `opp.zsh`.
9 years ago
Eric Freese a314a01a6a Fix various bugs found while testing 9 years ago
Kordan Ou aa597eea6d Add an autosuggest widget: autosuggest-execute. 10 years ago
Eric Freese 03fac1f0d7 Revert "Use zle -w flag to set WIDGET appropriately when calling orig widget"
This reverts commit 70438d233d.
10 years ago
Eric Freese 70438d233d Use zle -w flag to set WIDGET appropriately when calling orig widget 10 years ago
Eric Freese acc129de6c Fix error when using autosuggest widgets 10 years ago
Eric Freese 41f15d5c9f Forgot a pesky backslash 10 years ago
Eric Freese 2461a98857 Fix segfaults once and for all? 10 years ago
Eric Freese 5e419da326 Remove list of modify widgets and make 'modify' the default behavior. 10 years ago
Eric Freese 9788c2ee49 Fix deprecation warnings. 10 years ago
Eric Freese ebcfc46b72 Comment formatting 10 years ago
Eric Freese 51b39e210e Bound widgets now handle arguments correctly 10 years ago
Eric Freese 775dd20706 Rewrite 10 years ago