本網站在啟用 JavaScript 的情況下可以運作的更好。
首頁
探索
說明
登入
isprogram
/
zsh-syntax-highlighting
镜像来自
https://github.com/zsh-users/zsh-syntax-highlighting.git
關注
1
收藏
0
複製
0
程式碼
問題
0
Projects
0
版本發佈
17
Wiki
活動
瀏覽代碼
autoload add-zsh-hook && provide a nicer error message if that fails due to old zsh version, or similar situations. Reset another variable in hook function; it can't hurt
pull/82/head
Andreas Gahr
13 年之前
父節點
304ddb9400
當前提交
603fce64b5
共有
1 個檔案被更改
,包括
5 行新增
和
1 行删除
分割檢視
Diff Options
Show Stats
Download Patch File
Download Diff File
+5
-1
zsh-syntax-highlighting.zsh
+ 5
- 1
zsh-syntax-highlighting.zsh
查看文件
@ -207,8 +207,12 @@ _zsh_highlight_load_highlighters "${ZSH_HIGHLIGHT_HIGHLIGHTERS_DIR:-${0:h}/highl
_zsh_highlight_preexec_hook
(
)
{
_ZSH_HIGHLIGHT_PRIOR_BUFFER
=
_ZSH_HIGHLIGHT_PRIOR_CURSOR
=
}
add-zsh-hook preexec _zsh_highlight_preexec_hook
autoload -U add-zsh-hook
add-zsh-hook preexec _zsh_highlight_preexec_hook 2>/dev/null
||
{
echo
'zsh-syntax-highlighting: failed loading add-zsh-hook.'
>
&
2
}
# Initialize the array of active highlighters if needed.
[
[
$#
ZSH_HIGHLIGHT_HIGHLIGHTERS -eq
0
]
]
&&
ZSH_HIGHLIGHT_HIGHLIGHTERS
=
(
main
)
||
true
Write
Preview
Loading…
取消
儲存