From aecfd61bbda9b8739c48e7a2818438cb0f134791 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Sat, 21 Mar 2020 01:45:34 +0000 Subject: [PATCH] 'main': Support the 'env' precommand. --- changelog.md | 2 ++ highlighters/main/main-highlighter.zsh | 2 ++ highlighters/main/test-data/multiline-array-assignment1.zsh | 2 +- 3 files changed, 5 insertions(+), 1 deletion(-) diff --git a/changelog.md b/changelog.md index d975a76..496b4a8 100644 --- a/changelog.md +++ b/changelog.md @@ -71,6 +71,8 @@ - Highlight directories in command position correctly, including `AUTO_CD` support [#669] +- Recognize `env` as a precommand (e.g., `env FOO=bar ls`) + # Changes in version 0.7.1 - Remove out-of-date information from the 0.7.0 changelog. diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index 263b0be..456e3e7 100644 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -347,6 +347,8 @@ _zsh_highlight_highlighter_main_paint() 'catchsegv' '' 'nohup' '' 'setsid' :wc + 'env' u:i + # As of OpenSSH 8.1p1 'ssh-agent' aEPt:csDd:k # suckless-tools v44 diff --git a/highlighters/main/test-data/multiline-array-assignment1.zsh b/highlighters/main/test-data/multiline-array-assignment1.zsh index 3734c7a..2926d93 100644 --- a/highlighters/main/test-data/multiline-array-assignment1.zsh +++ b/highlighters/main/test-data/multiline-array-assignment1.zsh @@ -35,5 +35,5 @@ expected_region_highlight=( '6 6 commandseparator' # \n '7 9 default' # bar '10 10 assign' # ) - '12 14 command' # env + '12 14 precommand' # env )