Eric Freese
e937e89267
Respect user's set options when running original widget
...
Fixes GitHub #379
2018-12-16 21:13:02 -07:00
Eric Freese
41657e3565
Revert async process substitution & completion strategy
...
They're not quite ready. Keep them on a feature branch for now.
2018-12-16 20:49:06 -07:00
Eric Freese
681ffc7b28
Reset opts in some functions affected by GLOB_SUBST
...
Should fix GitHub #334
2018-07-13 22:16:53 -06:00
Eric Freese
d7171232c3
Merge branch 'develop' into features/completion-suggestions
2018-06-11 02:34:24 -06:00
Eric Freese
9cb0101512
Refactor async mode to no longer use zpty
...
See technique used in `fast-syntax-highlighting`:
- ca2e18bbc9
- http://www.zsh.org/mla/users/2018/msg00424.html
2018-06-11 02:12:47 -06:00
Eric Freese
bcbdad83e9
Support fallback strategies by setting array in config
2018-06-06 22:03:56 -06:00
Eric Freese
393f7b8bb9
Fix vi-mode partial-accept
...
Issue #188 . PR #324 .
Thanks to @toadjaune and @IngoHeimbach.
2018-05-15 11:44:42 -06:00
Eric Freese
42f5a06f7f
Need to reset the POSTDISPLAY if exiting early
...
Specific case where this matters is following:
Be in vi insert mode with some text in the buffer and the cursor at the
end of the buffer. Press `esc` to trigger `vi-cmd-mode widget`, then
before the cursor moves (KEYTIMEOUT), press `h` to trigger
`vi-backward-char` widget. When `vi-cmd-mode` original widget exits,
KEYS_QUEUED_COUNT will be non-zero and the suggestion will be lost.
2018-05-15 11:44:42 -06:00
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.
2017-11-27 08:31:41 -07:00
Eric Freese
9f1f322979
Update comment about KEYS_QUEUED_COUNT support
...
Now that patch has released
2017-09-27 15:04:42 -06:00
Eric Freese
a2f0ffb122
Enabling suggestions should not fetch a suggestion if buffer is empty
2017-03-05 12:53:13 -05:00
Eric Freese
7d4a1d9a4a
Add enable/disable/toggle widgets to disable suggestion functionality
...
[GitHub #219 ]
Intended to be helpful for folks using bracketed-paste-magic and other
widgets that use `zle -U`.
2017-03-03 18:43:17 -05:00
Eric Freese
e1959d0f61
Put in a general fix for #219 - Handling input from zle -U
...
Depends on patch to ZSH from workers/40702:
http://www.zsh.org/mla/workers/2017/msg00414.html
2017-03-03 18:43:17 -05:00
Eric Freese
23ef16c297
Do not show suggestions if the buffer is empty
2017-02-17 18:26:34 -07:00
Eric Freese
ed8056c5e8
Lots of async changes
2017-02-16 19:19:30 -07:00
Eric Freese
2c465a932a
Rename async pty name config var
2017-01-29 10:39:07 -07:00
Eric Freese
e3eb286ea2
Lots of little async cleanups
2017-01-27 15:18:26 -07:00
Eric Freese
54e1eee924
Optimize case where manually typing in a suggestion
2017-01-25 00:00:13 -07:00
Eric Freese
ab2742537f
Quote the suggestion to support sh_split_word option
2017-01-24 22:27:47 -07:00
Eric Freese
ab8f295225
First pass at async functionality
2017-01-24 19:45:11 -07:00
Eric Freese
b377c39d0e
Only fetch a new suggestion if buffer has changed
2016-07-31 20:10:22 -06:00
Eric Freese
a44aa59321
Remove unnecessary reset of POSTDISPLAy
2016-07-31 20:09:26 -06:00
Lorenzo Bolla
2450c95d8a
Rename and document new config var
2016-07-18 10:55:19 +01:00
Lorenzo Bolla
7b81eb79b8
Disable autosuggest if buffer is too large
...
Make buffer max size configurable, defaulted to infinity
2016-07-18 08:56:00 +01:00
Eric Freese
e87bc74654
Fix 118: Clear suggestion before original widget to fix completions
...
See PR #149
2016-04-25 14:42:09 -06:00
Eric Freese
1d4f7e157e
Keep track of return value from original widget ( #135 )
2016-04-06 17:13:04 -06:00
Eric Freese
15c5db898f
Fix #137
2016-03-14 21:41:14 -06:00
Eric Freese
a314a01a6a
Fix various bugs found while testing
2016-03-14 16:51:27 -06:00
Eric Freese
8c3fdea75d
Call original accept-line widget when executing suggestion
2016-03-01 13:18:46 -07:00
Kordan Ou
aa597eea6d
Add an autosuggest widget: autosuggest-execute.
2016-03-01 13:18:46 -07:00
Eric Freese
1b98af5b33
Fix suggestions when sh_split_words
option is enabled
2016-02-16 07:57:44 -07:00
Eric Freese
5e419da326
Remove list of modify widgets and make 'modify' the default behavior.
2016-02-14 08:54:34 -07:00
Eric Freese
ebcfc46b72
Comment formatting
2016-02-14 00:29:43 -07:00
Eric Freese
51b39e210e
Bound widgets now handle arguments correctly
2016-02-13 23:46:34 -07:00
Eric Freese
f154d25fb3
Fix typo when setting up autosuggest-clear
widget.
2016-02-07 08:58:09 -07:00
Eric Freese
775dd20706
Rewrite
2016-02-06 21:05:02 -07:00