back-dollar-quoted-argument: Don't consider \0xHH a hex escape sequence.

A leading zero is not permitted in the '\xHH' syntax.
This commit is contained in:
Daniel Shahaf 2015-09-25 21:36:20 +00:00
parent 78ad649d47
commit 98366ade11

View File

@ -316,7 +316,7 @@ _zsh_highlight_main_highlighter_highlight_dollar_string()
done done
AA=$arg[$i+1,$c-1] AA=$arg[$i+1,$c-1]
# Matching for HEX and OCT values like \0xA6, \xA6 or \012 # Matching for HEX and OCT values like \0xA6, \xA6 or \012
if [[ "$AA" =~ "^(0*(x|X)[0-9a-fA-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then if [[ "$AA" =~ "^((x|X)[0-9a-fA-F]{1,2})" || "$AA" =~ "^(0[0-7]{1,3})" ]];then
(( k += $#MATCH )) (( k += $#MATCH ))
(( i += $#MATCH )) (( i += $#MATCH ))
else else