back-dollar-quoted-argument: Correct octal escape syntax.

A leading zero, as in '\0NNN', is permitted by 'echo' but not by 'print',
and «$''» follows 'print'.
This commit is contained in:
Daniel Shahaf 2015-09-25 21:36:20 +00:00
parent 8a43bd2cd9
commit 0788514cbd

View File

@ -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