mirror of
https://github.com/zsh-users/zsh-autosuggestions.git
synced 2025-12-06 15:20:40 +01:00
Compare commits
20 Commits
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
85919cd1ff | ||
|
|
dc8dcf7425 | ||
|
|
da75fc226d | ||
|
|
a00927c673 | ||
|
|
0e810e5afa | ||
|
|
f9526195c5 | ||
|
|
e52ee8ca55 | ||
|
|
c3d4e576c9 | ||
|
|
95602e2dea | ||
|
|
39aa7bed3a | ||
|
|
27c298cf1a | ||
|
|
a84d78f8b5 | ||
|
|
309d32ac9e | ||
|
|
9908eb49a3 | ||
|
|
2b97cf3b30 | ||
|
|
f29bb7f032 | ||
|
|
c14ad9fc46 | ||
|
|
fc391d6bf6 | ||
|
|
7795a357e6 | ||
|
|
a411ef3e09 |
2
.gitignore
vendored
Normal file
2
.gitignore
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
# zsh word code files
|
||||
*.zwc
|
||||
22
INSTALL.md
22
INSTALL.md
@@ -3,20 +3,23 @@
|
||||
* [Packages](#packages)
|
||||
* [Antigen](#antigen)
|
||||
* [Oh My Zsh](#oh-my-zsh)
|
||||
* [HomeBrew](#homebrew)
|
||||
* [Manual](#manual-git-clone)
|
||||
|
||||
## Packages
|
||||
|
||||
| System | Package |
|
||||
| ------------- | ------------- |
|
||||
| Alpine Linux | [zsh-autosuggestions](https://pkgs.alpinelinux.org/packages?name=zsh-autosuggestions) |
|
||||
| Debian / Ubuntu | [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) |
|
||||
| Fedora / CentOS / RHEL / Scientific Linux | [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) |
|
||||
| OpenSUSE / SLE | [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) |
|
||||
| Arch Linux / Manjaro / Antergos / Hyperbola | [zsh-autosuggestions](https://www.archlinux.org/packages/zsh-autosuggestions), [zsh-autosuggestions-git](https://aur.archlinux.org/packages/zsh-autosuggestions-git) |
|
||||
| NixOS | [zsh-autosuggestions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/shells/zsh/zsh-autosuggestions/default.nix) |
|
||||
| NixOS | [zsh-autosuggestions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/by-name/zs/zsh-autosuggestions/package.nix) |
|
||||
| Void Linux | [zsh-autosuggestions](https://github.com/void-linux/void-packages/blob/master/srcpkgs/zsh-autosuggestions/template) |
|
||||
| Mac OS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-autosuggestions.rb) |
|
||||
| Mac OS | [homebrew](https://formulae.brew.sh/formula/zsh-autosuggestions) |
|
||||
| NetBSD | [pkgsrc](http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-autosuggestions/README.html) |
|
||||
| FreeBSD | [pkg](https://cgit.freebsd.org/ports/tree/shells/zsh-autosuggestions) |
|
||||
|
||||
## Antigen
|
||||
|
||||
@@ -47,6 +50,21 @@
|
||||
|
||||
3. Start a new terminal session.
|
||||
|
||||
## Homebrew
|
||||
|
||||
1. Install command:
|
||||
```sh
|
||||
brew install zsh-autosuggestions
|
||||
```
|
||||
|
||||
2. To activate the autosuggestions, add the following at the end of your .zshrc:
|
||||
|
||||
```sh
|
||||
source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
|
||||
```
|
||||
|
||||
3. Start a new terminal session.
|
||||
|
||||
## Manual (Git Clone)
|
||||
|
||||
1. Clone this repository somewhere on your machine. This guide will assume `~/.zsh/zsh-autosuggestions`.
|
||||
|
||||
2
Makefile
2
Makefile
@@ -1,4 +1,4 @@
|
||||
SRC_DIR := ./src
|
||||
SRC_DIR := ./src
|
||||
|
||||
SRC_FILES := \
|
||||
$(SRC_DIR)/config.zsh \
|
||||
|
||||
@@ -52,7 +52,7 @@ For more info, read the Character Highlighting section of the zsh manual: `man z
|
||||
`ZSH_AUTOSUGGEST_STRATEGY` is an array that specifies how suggestions should be generated. The strategies in the array are tried successively until a suggestion is found. There are currently three built-in strategies to choose from:
|
||||
|
||||
- `history`: Chooses the most recent match from history.
|
||||
- `completion`: Chooses a suggestion based on what tab-completion would suggest. (requires `zpty` module)
|
||||
- `completion`: Chooses a suggestion based on what tab-completion would suggest. (requires `zpty` module, which is included with zsh since 4.0.1)
|
||||
- `match_prev_cmd`: Like `history`, but chooses the most recent match whose preceding history item matches the most recently executed command ([more info](src/strategies/match_prev_cmd.zsh)). Note that this strategy won't work as expected with ZSH options that don't preserve the history order such as `HIST_IGNORE_ALL_DUPS` or `HIST_EXPIRE_DUPS_FIRST`.
|
||||
|
||||
For example, setting `ZSH_AUTOSUGGEST_STRATEGY=(history completion)` will first try to find a suggestion from your history, but, if it can't find a match, will find a suggestion from the completion engine.
|
||||
|
||||
Reference in New Issue
Block a user