No puede seleccionar más de 25 temas Los temas deben comenzar con una letra o número, pueden incluir guiones ('-') y pueden tener hasta 35 caracteres de largo.

115 líneas
4.7 KiB

hace 8 años
hace 8 años
  1. How to install
  2. --------------
  3. ### Using packages
  4. * Arch Linux: [community/zsh-syntax-highlighting][arch-package] / [AUR/zsh-syntax-highlighting-git][AUR-package]
  5. * Debian: `zsh-syntax-highlighting` package [in `stretch`][debian-package] (or in [OBS repository][obs-repository])
  6. * Fedora: [zsh-syntax-highlighting package][fedora-package-alt] in Fedora 24+ (or in [OBS repository][obs-repository])
  7. * FreeBSD: `pkg install zsh-syntax-highlighting` (port name: [`textproc/zsh-syntax-highlighting`][freebsd-port])
  8. * Gentoo: [mv overlay][gentoo-overlay]
  9. * Mac OS X / Homebrew: [brew install zsh-syntax-highlighting][brew-package]
  10. * Ubuntu: `zsh-syntax-highlighting` package [in Xenial][ubuntu-package] (or in [OBS repository][obs-repository])
  11. * RHEL / CentOS / Scientific Linux: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
  12. * openSUSE / SLE: `zsh-syntax-highlighting` package in [OBS repository][obs-repository]
  13. * Void Linux: `zsh-syntax-highlighting package` [in XBPS][void-package]
  14. [arch-package]: https://www.archlinux.org/packages/zsh-syntax-highlighting
  15. [AUR-package]: https://aur.archlinux.org/packages/zsh-syntax-highlighting-git
  16. [debian-package]: https://packages.debian.org/zsh-syntax-highlighting
  17. [freebsd-port]: http://www.freshports.org/textproc/zsh-syntax-highlighting/
  18. [gentoo-overlay]: http://gpo.zugaina.org/app-shells/zsh-syntax-highlighting
  19. [brew-package]: https://github.com/Homebrew/homebrew-core/blob/master/Formula/zsh-syntax-highlighting.rb
  20. [ubuntu-package]: https://launchpad.net/ubuntu/+source/zsh-syntax-highlighting
  21. [fedora-package]: https://apps.fedoraproject.org/packages/zsh-syntax-highlighting
  22. [fedora-package-alt]: https://bodhi.fedoraproject.org/updates/?packages=zsh-syntax-highlighting
  23. [obs-repository]: https://software.opensuse.org//download.html?project=shells%3Azsh-users%3Azsh-syntax-highlighting&package=zsh-syntax-highlighting
  24. [void-package]: https://github.com/voidlinux/void-packages/tree/master/srcpkgs/zsh-syntax-highlighting
  25. See also [repology's cross-distro index](https://repology.org/metapackage/zsh-syntax-highlighting/versions)
  26. ### In your ~/.zshrc
  27. Simply clone this repository and source the script:
  28. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git
  29. echo "source ${(q-)PWD}/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh" >> ${ZDOTDIR:-$HOME}/.zshrc
  30. Then, enable syntax highlighting in the current interactive shell:
  31. source ./zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  32. If `git` is not installed, download and extract a snapshot of the latest
  33. development tree from:
  34. https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz
  35. Note the `source` command must be **at the end** of `~/.zshrc`.
  36. ### With a plugin manager
  37. Note that `zsh-syntax-highlighting` must be the last plugin sourced.
  38. The zsh-syntax-highlighting authors recommend manual installation over the use
  39. of a framework or plugin manager.
  40. This list is incomplete as there are too many
  41. [frameworks / plugin managers][framework-list] to list them all here.
  42. [framework-list]: https://github.com/unixorn/awesome-zsh-plugins#frameworks
  43. #### [Antigen](https://github.com/zsh-users/antigen)
  44. Add `antigen bundle zsh-users/zsh-syntax-highlighting` as the last bundle in
  45. your `.zshrc`.
  46. #### [Oh-my-zsh](https://github.com/robbyrussell/oh-my-zsh)
  47. 1. Clone this repository in oh-my-zsh's plugins directory:
  48. git clone https://github.com/zsh-users/zsh-syntax-highlighting.git ${ZSH_CUSTOM:-~/.oh-my-zsh/custom}/plugins/zsh-syntax-highlighting
  49. 2. Activate the plugin in `~/.zshrc`:
  50. plugins=( [plugins...] zsh-syntax-highlighting)
  51. 3. Source `~/.zshrc` to take changes into account:
  52. source ~/.zshrc
  53. #### [Prezto](https://github.com/sorin-ionescu/prezto)
  54. Zsh-syntax-highlighting is included with Prezto. See the
  55. [Prezto documentation][prezto-docs] to enable and configure highlighters.
  56. [prezto-docs]: https://github.com/sorin-ionescu/prezto/tree/master/modules/syntax-highlighting
  57. #### [zgen](https://github.com/tarjoilija/zgen)
  58. Add `zgen load zsh-users/zsh-syntax-highlighting` to the end of your `.zshrc`.
  59. #### [zplug](https://github.com/zplug/zplug)
  60. Add `zplug "zsh-users/zsh-syntax-highlighting", defer:2` to your `.zshrc`.
  61. #### [zplugin](https://github.com/psprint/zplugin)
  62. Add `zplugin load zsh-users/zsh-syntax-highlighting` to the end of your
  63. `.zshrc`.
  64. ### System-wide installation
  65. Any of the above methods is suitable for a single-user installation,
  66. which requires no special privileges. If, however, you desire to install
  67. zsh-syntax-highlighting system-wide, you may do so by running
  68. make install
  69. and directing your users to add
  70. source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
  71. to their `.zshrc`s.