您最多选择25个主题 主题必须以字母或数字开头,可以包含连字符 (-),并且长度不得超过35个字符

81 行
2.8 KiB

  1. # Installation
  2. * [Packages](#packages)
  3. * [Antigen](#antigen)
  4. * [Oh My Zsh](#oh-my-zsh)
  5. * [HomeBrew](#homebrew)
  6. * [Manual](#manual-git-clone)
  7. ## Packages
  8. | System | Package |
  9. | ------------- | ------------- |
  10. | Alpine Linux | [zsh-autosuggestions](https://pkgs.alpinelinux.org/packages?name=zsh-autosuggestions) |
  11. | Debian / Ubuntu | [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) |
  12. | Fedora / CentOS / RHEL / Scientific Linux | [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) |
  13. | OpenSUSE / SLE | [zsh-autosuggestions OBS repository](https://software.opensuse.org/download.html?project=shells%3Azsh-users%3Azsh-autosuggestions&package=zsh-autosuggestions) |
  14. | 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) |
  15. | NixOS | [zsh-autosuggestions](https://github.com/NixOS/nixpkgs/blob/master/pkgs/shells/zsh/zsh-autosuggestions/default.nix) |
  16. | Void Linux | [zsh-autosuggestions](https://github.com/void-linux/void-packages/blob/master/srcpkgs/zsh-autosuggestions/template) |
  17. | Mac OS | [homebrew](https://github.com/Homebrew/homebrew-core/blob/master/Formula/z/zsh-autosuggestions.rb) |
  18. | NetBSD | [pkgsrc](http://ftp.netbsd.org/pub/pkgsrc/current/pkgsrc/shells/zsh-autosuggestions/README.html) |
  19. ## Antigen
  20. 1. Add the following to your `.zshrc`:
  21. ```sh
  22. antigen bundle zsh-users/zsh-autosuggestions
  23. ```
  24. 2. Start a new terminal session.
  25. ## Oh My Zsh
  26. 1. Clone this repository into `$ZSH_CUSTOM/plugins` (by default `~/.oh-my-zsh/custom/plugins`)
  27. ```sh
  28. git clone https://github.com/zsh-users/zsh-autosuggestions ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-autosuggestions
  29. ```
  30. 2. Add the plugin to the list of plugins for Oh My Zsh to load (inside `~/.zshrc`):
  31. ```sh
  32. plugins=(
  33. # other plugins...
  34. zsh-autosuggestions
  35. )
  36. ```
  37. 3. Start a new terminal session.
  38. ## Homebrew
  39. 1. Install command:
  40. ```sh
  41. brew install zsh-autosuggestions
  42. ```
  43. 2. To activate the autosuggestions, add the following at the end of your .zshrc:
  44. ```sh
  45. source $(brew --prefix)/share/zsh-autosuggestions/zsh-autosuggestions.zsh
  46. ```
  47. 3. Start a new terminal session.
  48. ## Manual (Git Clone)
  49. 1. Clone this repository somewhere on your machine. This guide will assume `~/.zsh/zsh-autosuggestions`.
  50. ```sh
  51. git clone https://github.com/zsh-users/zsh-autosuggestions ~/.zsh/zsh-autosuggestions
  52. ```
  53. 2. Add the following to your `.zshrc`:
  54. ```sh
  55. source ~/.zsh/zsh-autosuggestions/zsh-autosuggestions.zsh
  56. ```
  57. 3. Start a new terminal session.