Commit Graph

20 Commits (ce6ee94f30abeaa63cfd5d3c861175e15045f615)

Author SHA1 Message Date
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
6 years ago
Eric Freese a78ea16c50 Support fallback strategies by setting array in config 7 years ago
Eric Freese a1babef972 Revert "Simplify escaping of pattern and fix match_prev_cmd strategy"
This reverts commit 7f8ff2867c.
8 years ago
Stefan Siegel 7f8ff2867c Simplify escaping of pattern and fix match_prev_cmd strategy
Maybe this is also a fix for #247, #248 and #258. Supersedes #267.

Testcase:
Using match_prev_cmd strategy and with these lines in history:
echo '1^'
echo '2^'
echo '1^'

type:
echo       (unexpected suggestion echo '1^' instead of echo '2^')
echo '1^1  (wrong suggestion echo '1^1echo '1^')
echo '1^#  (error "bad math expression")
8 years ago
Eric Freese 39762ecd97 Set up circle ci 9 years ago
Eric Freese dcce973287 Remove support for long-deprecated options
These options have been deprecated for over a year.
9 years ago
Eric Freese ed8056c5e8 Lots of async changes 9 years ago
Eric Freese 78ba07179a Add feature detection
Checks whether `zpty` gives a file descriptor, which was not the case in
older versions of zsh.

Based on a4b2f81c96/async.zsh (L395-L401)
9 years ago
Eric Freese ab8f295225 First pass at async functionality 9 years ago
Eric Freese 4850119887 Add separate test task for RSpec 9 years ago
Eric Freese 4a2d9f9049 Fix Makefile to not create symbolic link after PR #156 was merged 9 years ago
Eric Freese c477db2696 Remove unused test variables from Makefile 9 years ago
Eric Freese a28e72e84a Test Runner now supports running specific tests and choosing zsh bin 9 years ago
Eric Freese e5cdbb6c33 Lots of test cleanup. 10 years ago
Geza Lore 976acc708c Fix default suggestion strategy and add testing 10 years ago
Eric Freese 83f78d0760 Add suggestion "strategy" concept with default strategy 10 years ago
Eric Freese abe577d519 Fix build 10 years ago
Eric Freese 03bd381112 Add `.plugin` file and installation instructions for Oh My Zsh (#104). 10 years ago
Eric Freese 00bd0e9125 Use `add-zsh-hook` to remove need to call `autosuggest_start`. 10 years ago
Eric Freese 775dd20706 Rewrite 10 years ago