From 0788514cbd3e6165a498cf64ddfae50fd0834b54 Mon Sep 17 00:00:00 2001 From: Daniel Shahaf Date: Fri, 25 Sep 2015 21:36:20 +0000 Subject: [PATCH] back-dollar-quoted-argument: Correct octal escape syntax. MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit A leading zero, as in '\0NNN', is permitted by 'echo' but not by 'print', and «$''» follows 'print'. --- highlighters/main/main-highlighter.zsh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/highlighters/main/main-highlighter.zsh b/highlighters/main/main-highlighter.zsh index bf76e98..483d285 100755 --- a/highlighters/main/main-highlighter.zsh +++ b/highlighters/main/main-highlighter.zsh @@ -317,7 +317,7 @@ _zsh_highlight_main_highlighter_highlight_dollar_string() AA=$arg[$i+1,$c-1] # Matching for HEX and OCT values like \0xA6, \xA6 or \012 if [[ "$AA" =~ "^(x|X)[0-9a-fA-F]{1,2}" - || "$AA" =~ "^0[0-7]{1,3}" + || "$AA" =~ "^[0-7]{1,3}" || "$AA" =~ "^u[0-9a-fA-F]{1,4}" || "$AA" =~ "^U[0-9a-fA-F]{1,8}" ]]; then