abra zsh config 2.0
This commit is contained in:
@@ -1,68 +1,37 @@
|
||||
zsh-syntax-highlighting
|
||||
zsh-syntax-highlighting [![Build Status][build-status-image]][build-status-travis]
|
||||
=======================
|
||||
|
||||
**[Fish shell](http://www.fishshell.com) like syntax highlighting for [Zsh](http://www.zsh.org).**
|
||||
**[Fish shell][fish]-like syntax highlighting for [Zsh][zsh].**
|
||||
|
||||
*Requirements: zsh 4.3.17+.*
|
||||
*Requirements: zsh 4.3.11+.*
|
||||
|
||||
This package provides syntax highlighing for the shell zsh. It enables
|
||||
highlighing of commands whilst they are typed at a zsh prompt into an
|
||||
[fish]: http://www.fishshell.com/
|
||||
[zsh]: http://www.zsh.org/
|
||||
|
||||
This package provides syntax highlighting for the shell zsh. It enables
|
||||
highlighting of commands whilst they are typed at a zsh prompt into an
|
||||
interactive terminal. This helps in reviewing commands before running
|
||||
them, particularly in catching syntax errors.
|
||||
|
||||
[](images/preview.png)
|
||||
Some examples:
|
||||
|
||||
Before: [](images/before1.png)
|
||||
<br/>
|
||||
After: [](images/after1.png)
|
||||
|
||||
Before: [](images/before2.png)
|
||||
<br/>
|
||||
After: [](images/after2.png)
|
||||
|
||||
Before: [](images/before3.png)
|
||||
<br/>
|
||||
After: [](images/after3.png)
|
||||
|
||||
|
||||
How to install
|
||||
--------------
|
||||
|
||||
### Using packages
|
||||
|
||||
* Arch Linux: [community/zsh-syntax-highlighting](https://www.archlinux.org/packages/zsh-syntax-highlighting) / [AUR/zsh-syntax-highlighting-git](https://aur.archlinux.org/packages/zsh-syntax-highlighting-git)
|
||||
* Gentoo: [mv overlay](http://gpo.zugaina.org/app-shells/zsh-syntax-highlighting)
|
||||
* Mac OS X / Homebrew: [brew install zsh-syntax-highlighting](https://github.com/Homebrew/homebrew/blob/master/Library/Formula/zsh-syntax-highlighting.rb)
|
||||
|
||||
### In your ~/.zshrc
|
||||
|
||||
* Clone this repository:
|
||||
|
||||
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git
|
||||
|
||||
(or [download a snapshot](https://github.com/zsh-users/zsh-syntax-highlighting/archive/master.tar.gz))
|
||||
|
||||
* Source the script **at the end** of `~/.zshrc`:
|
||||
|
||||
source /path/to/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh
|
||||
|
||||
* Source `~/.zshrc` to take changes into account:
|
||||
|
||||
source ~/.zshrc
|
||||
|
||||
|
||||
### With oh-my-zsh
|
||||
|
||||
* Download the script or clone this repository in [oh-my-zsh](http://github.com/robbyrussell/oh-my-zsh) plugins directory:
|
||||
|
||||
git clone git://github.com/zsh-users/zsh-syntax-highlighting.git ~/.oh-my-zsh/custom/plugins/zsh-syntax-highlighting
|
||||
|
||||
* Activate the plugin in `~/.zshrc`:
|
||||
|
||||
plugins=( [plugins...] zsh-syntax-highlighting)
|
||||
|
||||
* Source `~/.zshrc` to take changes into account:
|
||||
|
||||
source ~/.zshrc
|
||||
|
||||
Note that `zsh-syntax-highlighting` must be the last plugin sourced,
|
||||
so make it the last element of the `$plugins` array.
|
||||
|
||||
### System-wide installation
|
||||
|
||||
Either of the above methods is suitable for a single-user installation, which requires
|
||||
no special privileges. If, however, you desire to install zsh-syntax-highlighting
|
||||
system-wide, you may do so by running `make install` and directing your users to
|
||||
add `source /usr/local/share/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh`
|
||||
in their `.zshrc`s.
|
||||
See [INSTALL.md](INSTALL.md).
|
||||
|
||||
|
||||
FAQ
|
||||
@@ -75,15 +44,37 @@ custom widgets have been created (i.e., after all `zle -N` calls and after
|
||||
running `compinit`). Widgets created later will work, but will not update the
|
||||
syntax highlighting.
|
||||
|
||||
### Does syntax highlighting work during incremental history search?
|
||||
|
||||
Highlighting the command line during an incremental history search (by default bound to
|
||||
to <kbd>Ctrl+R</kbd> in zsh's emacs keymap) requires zsh 5.4 or newer.
|
||||
|
||||
Under zsh versions older than 5.4, the zsh-default [underlining][zshzle-Character-Highlighting]
|
||||
of the matched portion of the buffer remains available, but zsh-syntax-highlighting's
|
||||
additional highlighting is unavailable. (Those versions of zsh do not provide
|
||||
enough information to allow computing the highlighting correctly.)
|
||||
|
||||
See issues [#288][i288] and [#415][i415] for details.
|
||||
|
||||
[zshzle-Character-Highlighting]: http://zsh.sourceforge.net/Doc/Release/Zsh-Line-Editor.html#Character-Highlighting
|
||||
[i288]: https://github.com/zsh-users/zsh-syntax-highlighting/pull/288
|
||||
[i415]: https://github.com/zsh-users/zsh-syntax-highlighting/pull/415
|
||||
|
||||
### How are new releases announced?
|
||||
|
||||
There is currently no "push" announcements channel. However, the following alternatives exist:
|
||||
There is currently no "push" announcements channel. However, the following
|
||||
alternatives exist:
|
||||
|
||||
- GitHub's RSS feed of releases: https://github.com/zsh-users/zsh-syntax-highlighting/releases.atom
|
||||
- An anitya entry: https://release-monitoring.org/project/7552/
|
||||
|
||||
|
||||
How to tweak
|
||||
------------
|
||||
|
||||
Syntax highlighting is done by pluggable highlighter scripts, see the [highlighters directory](highlighters)
|
||||
for documentation and configuration settings.
|
||||
Syntax highlighting is done by pluggable highlighter scripts. See the
|
||||
[documentation on highlighters](docs/highlighters.md) for details and
|
||||
configuration settings.
|
||||
|
||||
[build-status-image]: https://travis-ci.org/zsh-users/zsh-syntax-highlighting.svg?branch=master
|
||||
[build-status-travis]: https://travis-ci.org/zsh-users/zsh-syntax-highlighting
|
||||
|
Reference in New Issue
Block a user