Commit Graph

50 Commits

Author SHA1 Message Date
Eric Freese
b714f6667c Improve documentation for configuring highlight style
Supersedes PR #430 and gives additional info.

https://stackoverflow.com/questions/47310537/how-to-change-zsh-autosuggestions-color
2019-05-27 14:56:19 -06:00
Eric Freese
c1910348c7 Implement completion suggestion strategy (#111)
Based on https://github.com/Valodim/zsh-capture-completion

`zpty -r` with a pattern seems to have some funky behavior on older
versions, giving unpredictable results

Don't use `-s` option to `zmodload`. It is not available in zsh versions
older than 5.3

If running in sync mode and a completion takes a long time, the user can
^C out of it. We need to use `always` in the strategy function or the
pty will not be destroyed in this case and the next time we go to create
it, it will fail, making the shell unusable.

User can have many different completion styles set that will modify what
they've already typed. These styles will result in suggestions that
don't match what the user has already typed. We try our best to unset
some of the more problematic ones, but add some code to fetch to
invalidate suggestions that don't match what the user's already typed.
2019-04-11 09:53:55 -06:00
Eric Freese
b9fee8a324 Allow disabling of automatic widget re-binding
Addresses github #411
2019-04-10 11:43:21 -06:00
Eric Freese
db290c518b cleanup: Leave max size config unset by default to match other options 2019-04-10 11:43:20 -06:00
Eric Freese
e405afab29 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

Also see http://www.zsh.org/mla/users/2018/msg00432.html

In async response handler:
- We only want to read data in case of POLLIN or POLLHUP. Not POLLNVAL
  or select error.
- We always want to remove the handler, so it doesn't get called in an
  infinite loop when error is nval or err.

There is an upstream bug that prevents ctrl-c from resetting the prompt
immediately after a suggestion has been fetched asynchronously. A patch
has been submitted, but a workaround for now is to add `command true`
after the exec.

See https://github.com/zsh-users/zsh-autosuggestions/issues/364
2019-04-09 14:45:22 -06:00
Eric Nielsen
9e4d3c337f Don't overwrite config with default values
otherwise users are obliged to set the config values *after* sourcing
the plugin. They're not able to do it before. Also, re-sourcing the
plugin will reset the values to the defaults again.

See zimfw/zimfw#301

Fixes #335
2018-11-24 09:56:52 -07:00
Eric Freese
a78ea16c50 Support fallback strategies by setting array in config 2018-11-24 09:56:30 -07:00
Eric Freese
62f5f14f2f default => history 2018-11-24 09:56:00 -07:00
Eric Freese
be6b22b864 Add info to the readme about docker testing image 2018-11-18 21:35:52 -07:00
Eric Freese
72ccee33b4 Pull out separate doc for installation instructions 2018-05-21 11:35:26 -06:00
Benjamin Denhartog
b2b9bf3b8c update arch linux installation instructions (now available via pacman)
closes #328
2018-05-14 10:43:45 -06:00
babaorum
afc14f79cc make Oh my zsh install works without ZSH_CUSTOM defined 2018-04-16 22:37:54 +02:00
Eric Freese
f462410b3c Add zsh version requirements to readme 2017-12-06 08:21:27 -07:00
Eric Freese
9e3f1bd359 Use https protocol instead of git in README instructions
https should work more broadly for folks
2017-09-26 07:56:29 -06:00
Alon Harel
706499838c Update README.md 2017-07-24 21:19:07 +03:00
Sumner Evans
4e72f7a91e Added installation instructions for AUR, Homebrew 2017-07-07 09:17:46 -06:00
Eric Freese
83129dd796 Make asynchronous suggestions disabled by default
While they are still experimental
2017-04-14 08:48:54 -06: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
39762ecd97 Set up circle ci 2017-02-26 14:26:41 -07:00
Eric Freese
06fca77ffb Readme updates for v0.4.0 2017-02-16 20:12:04 -07:00
Eric Freese
b377c39d0e Only fetch a new suggestion if buffer has changed 2016-07-31 20:10:22 -06:00
Eric Freese
25f4afb058 Add ZSH_AUTOSUGGEST_IGNORE_WIDGETS array 2016-07-31 19:35:30 -06:00
Lorenzo Bolla
a9c8efa048 Update README 2016-07-18 16:06:50 +01:00
Tassilo Horn
ca70612d3c Document caveats of match_prev_cmd strategy
This strategy relies on the history being exactly in the order in which
commands have been entered.  Therefore, options like suppressing
duplicates or expiring duplicates first will lead to unexpected
suggestions.
2016-05-28 21:23:35 +02:00
Eric Freese
7c688ec20c Add note to readme about PRs going to develop branch 2016-05-28 08:23:53 -06:00
Eric Freese
d7001f2c34 Fix readme test script reference. 2016-04-15 13:40:18 -06:00
Eric Freese
1ed9155f89 Add Suggestion Strategy section to Configuration section of Readme. 2016-03-14 17:25:09 -06:00
Kordan Ou
aa597eea6d Add an autosuggest widget: autosuggest-execute. 2016-03-01 13:18:46 -07:00
Eric Freese
8935a39e9b Remove plugin compatibility section from readme 2016-03-01 13:14:20 -07:00
Eric Freese
985de56f6e Update asciinema to reflect new repo 2016-02-25 13:20:21 -07:00
Eric Freese
dd54925b06 Update URL references after repo move to zsh-users 2016-02-25 13:04:32 -07:00
Eric Freese
aa5ceee256 Make asciinema a bit smaller. 2016-02-16 21:55:56 -07:00
Eric Freese
113ca0ad10 Add asciinema recording to README 2016-02-16 21:35:44 -07:00
Eric Freese
2461a98857 Fix segfaults once and for all? 2016-02-15 08:31:00 -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
b49d002888 [README] Add example of minimal .zshrc. 2016-02-13 23:53:32 -07:00
Eric Freese
1a38fbf6a5 [README] Add note about workaround for bpm bug. 2016-02-13 21:14:59 -07:00
Eric Freese
0ae5907294 [README] Add note about Oh My Zsh paste bug. 2016-02-13 09:59:16 -07:00
Eric Freese
03bd381112 Add .plugin file and installation instructions for Oh My Zsh (#104). 2016-02-07 15:35:54 -07:00
Eric Freese
00bd0e9125 Use add-zsh-hook to remove need to call autosuggest_start. 2016-02-07 15:35:43 -07:00
Eric Freese
48d2dc1091 Remove absolute link in readme. 2016-02-07 14:50:00 -07:00
Eric Freese
e91db46ce0 Add Development section to README (#106) 2016-02-07 08:52:52 -07:00
Eric Freese
0dd1b7febb Add Troubleshooting section to README 2016-02-07 08:52:07 -07:00
Eric Freese
6a4b2b3865 Update README 2016-02-06 21:57:34 -07:00
Eric Freese
775dd20706 Rewrite 2016-02-06 21:05:02 -07:00
Thor Erik
c044d06f70 Avoid bell on all keysrtokes
Due to using a forked version of zsh-syntax-highlighting, you also get along the bug that causes a [bell on every keystroke][1], using zsh-users/zsh-syntax-highlighting instead I avoided this bug.

[1]: https://github.com/zsh-users/zsh-syntax-highlighting/issues/200
2015-10-16 09:06:03 +02:00
Jakub Jirutka
a796ce5bdb Readme: extend section Known issues (closes #14) 2015-05-23 01:57:51 +02:00
Jakub Jirutka
6de948c9c5 Add widget autosuggest-execute-suggestion
It basically means this: go to the end of line (i.e. accept the
suggestion) and then hit enter.
2015-05-22 00:54:27 +02:00
Jakub Jirutka
47283c2619 Update readme 2015-05-21 20:23:09 +02:00
Jakub Jirutka
08f3b3148d Rename README.mkd to README.md
.md is a preferred file extension for Markdown files.
2015-05-21 18:06:38 +02:00