Support backslash continuations

This commit is contained in:
Daniel Shahaf
2015-01-26 15:17:49 +00:00
parent 667495bfb7
commit 23cacb12fe
2 changed files with 37 additions and 1 deletions

View File

@@ -102,7 +102,7 @@ _zsh_highlight_main_highlighter()
local substr_color=0
local style_override=""
[[ $start_pos -eq 0 && $arg = 'noglob' ]] && highlight_glob=false
((start_pos+=${#buf[$start_pos+1,-1]}-${#${buf[$start_pos+1,-1]##[[:space:]]#}}))
((start_pos+=${#buf[$start_pos+1,-1]}-${#${buf[$start_pos+1,-1]##([[:space:]]|\\[[:space:]])#}}))
((end_pos=$start_pos+${#arg}))
# Parse the sudo command line
if $sudo; then