INSTALL.md 2.02 KB
Newer Older
Mo Zhou's avatar
Mo Zhou committed
1
# Installation
Mo Zhou's avatar
Mo Zhou committed
2

Mo Zhou's avatar
Mo Zhou committed
3 4 5 6 7 8 9
* [Manual](#manual-git-clone)
* [Antigen](#antigen)
* [Oh My Zsh](#oh-my-zsh)
* [Arch Linux](#arch-linux)
* [macOS via Homebrew](#macos-via-homebrew)

## Manual (Git Clone)
Mo Zhou's avatar
Mo Zhou committed
10 11 12 13 14 15 16 17 18 19 20 21 22 23 24

1. Clone this repository somewhere on your machine. This guide will assume `~/.zsh/zsh-autosuggestions`.

    ```sh
    git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
    ```

2. Add the following to your `.zshrc`:

    ```sh
    source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
    ```

3. Start a new terminal session.

Mo Zhou's avatar
Mo Zhou committed
25
## Antigen
Mo Zhou's avatar
Mo Zhou committed
26 27 28 29 30 31 32 33 34

1. Add the following to your `.zshrc`:

    ```sh
    antigen bundle zsh-users/zsh-autosuggestions
    ```

2. Start a new terminal session.

Mo Zhou's avatar
Mo Zhou committed
35
## Oh My Zsh
Mo Zhou's avatar
Mo Zhou committed
36 37 38 39 40 41 42

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
    ```

Mo Zhou's avatar
Mo Zhou committed
43
2. Add the plugin to the list of plugins for Oh My Zsh to load (inside `~/.zshrc`):
Mo Zhou's avatar
Mo Zhou committed
44 45 46 47 48 49 50

    ```sh
    plugins=(zsh-autosuggestions)
    ```

3. Start a new terminal session.

Mo Zhou's avatar
Mo Zhou committed
51
## Arch Linux
Mo Zhou's avatar
Mo Zhou committed
52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68

1. Install [`zsh-autosuggestions`](https://www.archlinux.org/packages/community/any/zsh-autosuggestions/) from the `community` repository.

    ```sh
    pacman -S zsh-autosuggestions
    ```

    or, to use a package based on the `master` branch, install [`zsh-autosuggestions-git`](https://aur.archlinux.org/packages/zsh-autosuggestions-git/) from the [AUR](https://wiki.archlinux.org/index.php/Arch_User_Repository).

2. Add the following to your `.zshrc`:

    ```sh
    source /usr/share/zsh/plugins/zsh-autosuggestions/zsh-autosuggestions.zsh
    ```

3. Start a new terminal session.

Mo Zhou's avatar
Mo Zhou committed
69 70
## macOS via Homebrew

Mo Zhou's avatar
Mo Zhou committed
71 72 73 74 75 76 77 78 79 80 81 82 83
1. Install the `zsh-autosuggestions` package using [Homebrew](https://brew.sh/).

    ```sh
    brew install zsh-autosuggestions
    ```

2. Add the following to your `.zshrc`:

    ```sh
    source /usr/local/share/zsh-autosuggestions/zsh-autosuggestions.zsh
    ```

3. Start a new terminal session.