2019-06-20 05:30:36 +08:00
|
|
|
# Installation
|
2018-05-22 01:35:26 +08:00
|
|
|
|
2019-07-03 11:20:48 +08:00
|
|
|
* [Packages](#packages)
|
2019-06-20 05:30:36 +08:00
|
|
|
* [Antigen](#antigen)
|
|
|
|
* [Oh My Zsh](#oh-my-zsh)
|
2022-10-12 15:40:21 +08:00
|
|
|
* [HomeBrew](#homebrew)
|
2019-07-03 11:20:48 +08:00
|
|
|
* [Manual](#manual-git-clone)
|
2018-05-22 01:35:26 +08:00
|
|
|
|
2019-07-03 11:20:48 +08:00
|
|
|
## Packages
|
2018-05-22 01:35:26 +08:00
|
|
|
|
2019-07-03 11:20:48 +08:00
|
|
|
| System | Package |
|
|
|
|
| ------------- | ------------- |
|
2022-03-16 05:52:50 +08:00
|
|
|
| Alpine Linux | [zsh-autosuggestions](https://pkgs.alpinelinux.org/packages?name=zsh-autosuggestions) |
|
2019-07-03 11:20:48 +08:00
|
|
|
| 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) |
|
|
|
|
| Void Linux | [zsh-autosuggestions](https://github.com/void-linux/void-packages/blob/master/srcpkgs/zsh-autosuggestions/template) |
|
2023-09-04 01:00:21 +08:00
|
|
|
| Mac OS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zsh-autosuggestions.rb) |
|
2019-07-03 11:20:48 +08:00
|
|
|
| NetBSD | [pkgsrc](http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-autosuggestions/README.html) |
|
2018-05-22 01:35:26 +08:00
|
|
|
|
2019-06-20 05:30:36 +08:00
|
|
|
## Antigen
|
2018-07-01 05:38:05 +08:00
|
|
|
|
|
|
|
1. Add the following to your `.zshrc`:
|
|
|
|
|
|
|
|
```sh
|
|
|
|
antigen bundle zsh-users/zsh-autosuggestions
|
|
|
|
```
|
|
|
|
|
|
|
|
2. Start a new terminal session.
|
|
|
|
|
2019-06-20 05:30:36 +08:00
|
|
|
## Oh My Zsh
|
2018-05-22 01:35:26 +08:00
|
|
|
|
|
|
|
1. Clone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`)
|
|
|
|
|
|
|
|
```sh
|
|
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
|
|
|
|
```
|
|
|
|
|
2018-07-03 10:25:20 +08:00
|
|
|
2. Add the plugin to the list of plugins for Oh My Zsh to load (inside `~/.zshrc`):
|
2018-05-22 01:35:26 +08:00
|
|
|
|
|
|
|
```sh
|
2021-03-09 16:08:18 +08:00
|
|
|
plugins=(
|
|
|
|
# other plugins...
|
|
|
|
zsh-autosuggestions
|
|
|
|
)
|
2018-05-22 01:35:26 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
3. Start a new terminal session.
|
|
|
|
|
2022-10-12 15:40:21 +08:00
|
|
|
## Homebrew
|
|
|
|
|
|
|
|
1. Install command:
|
|
|
|
```sh
|
|
|
|
brew install zsh-autosuggestions
|
|
|
|
```
|
|
|
|
|
|
|
|
2. To activate the autosuggestions, add the following at the end of your .zshrc:
|
|
|
|
|
|
|
|
```sh
|
2024-10-02 05:23:21 +08:00
|
|
|
echo "source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
|
2022-10-12 15:40:21 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
3. Start a new terminal session.
|
|
|
|
|
2019-07-03 11:20:48 +08:00
|
|
|
## Manual (Git Clone)
|
2019-06-20 05:30:36 +08:00
|
|
|
|
2019-07-03 11:20:48 +08:00
|
|
|
1. Clone this repository somewhere on your machine. This guide will assume `~/.zsh/zsh-autosuggestions`.
|
2018-05-22 01:35:26 +08:00
|
|
|
|
|
|
|
```sh
|
2019-07-03 11:20:48 +08:00
|
|
|
git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
|
2018-05-22 01:35:26 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
2. Add the following to your `.zshrc`:
|
|
|
|
|
|
|
|
```sh
|
2019-07-03 11:20:48 +08:00
|
|
|
source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
|
2018-05-22 01:35:26 +08:00
|
|
|
```
|
|
|
|
|
|
|
|
3. Start a new terminal session.
|