zsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.

Github星跟踪图

zsh-syntax-highlighting Build Status

Fish shell-like syntax highlighting for Zsh.

Requirements: zsh 4.3.11+.

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.

Some examples:

Before: Screenshot #1.1

After:  Screenshot #1.2

Before: Screenshot #2.1

After:  Screenshot #2.2

Before: Screenshot #3.1

After:  Screenshot #3.2

How to install

See INSTALL.md.

FAQ

Why must zsh-syntax-highlighting.zsh be sourced at the end of the .zshrc file?

zsh-syntax-highlighting.zsh wraps ZLE widgets. It must be sourced after all
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.

Highlighting the command line during an incremental history search (by default bound to
to Ctrl+R in zsh's emacs keymap) requires zsh 5.4 or newer.

Under zsh versions older than 5.4, the zsh-default underlining
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 and #415 for details.

How are new releases announced?

There is currently no "push" announcements channel. However, the following
alternatives exist:

How to tweak

Syntax highlighting is done by pluggable highlighter scripts. See the
documentation on highlighters for details and
configuration settings.

主要指标

概览
名称与所有者zsh-users/zsh-syntax-highlighting
主编程语言Shell
编程语言Shell (语言数: 3)
平台
许可证BSD 3-Clause "New" or "Revised" License
所有者活动
创建于2010-12-25 17:28:55
推送于2024-11-21 15:11:08
最后一次提交2024-11-21 14:56:08
发布数17
最新版本名称0.8.0 (发布于 2023-12-18 16:06:14)
第一版名称0.1.0 (发布于 )
用户参与
星数21.3k
关注者数135
派生数1.3k
提交数1.3k
已启用问题?
问题数699
打开的问题数159
拉请求数125
打开的拉请求数38
关闭的拉请求数99
项目设置
已启用Wiki?
已存档?
是复刻?
已锁定?
是镜像?
是私有?