main: Expand aliases before looking for redirections
This commit is contained in:
parent
e43e4fd2c7
commit
05a55108c9
@ -498,16 +498,6 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
continue
|
continue
|
||||||
fi
|
fi
|
||||||
|
|
||||||
# Analyse the current word.
|
|
||||||
if _zsh_highlight_main__is_redirection $arg ; then
|
|
||||||
if (( in_redirection )); then
|
|
||||||
_zsh_highlight_main_add_region_highlight $start_pos $end_pos unknown-token
|
|
||||||
already_added=1
|
|
||||||
else
|
|
||||||
in_redirection=2
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
# Expand aliases.
|
# Expand aliases.
|
||||||
# TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x'
|
# TODO: this should be done iteratively, e.g., 'alias x=y y=z z=w\n x'
|
||||||
# And then the entire 'alias' branch of the 'case' statement should
|
# And then the entire 'alias' branch of the 'case' statement should
|
||||||
@ -529,6 +519,16 @@ _zsh_highlight_main_highlighter_highlight_list()
|
|||||||
}
|
}
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Analyse the current word.
|
||||||
|
if _zsh_highlight_main__is_redirection $arg ; then
|
||||||
|
if (( in_redirection )); then
|
||||||
|
_zsh_highlight_main_add_region_highlight $start_pos $end_pos unknown-token
|
||||||
|
already_added=1
|
||||||
|
else
|
||||||
|
in_redirection=2
|
||||||
|
fi
|
||||||
|
fi
|
||||||
|
|
||||||
# Expand parameters.
|
# Expand parameters.
|
||||||
#
|
#
|
||||||
# ### For now, expand just '$foo' or '${foo}', possibly with braces, but with
|
# ### For now, expand just '$foo' or '${foo}', possibly with braces, but with
|
||||||
|
Loading…
Reference in New Issue
Block a user