mirror of
https://github.com/zsh-users/zsh-syntax-highlighting.git
synced 2025-01-30 09:47:13 +08:00
WIP: 'main': Add some in_param/in_alias checks by code inspection
This commit is contained in:
parent
78f40ee2b6
commit
d0a11ba837
@ -1141,6 +1141,9 @@ _zsh_highlight_main_highlighter_check_assign()
|
|||||||
|
|
||||||
_zsh_highlight_main_highlighter_highlight_path_separators()
|
_zsh_highlight_main_highlighter_highlight_path_separators()
|
||||||
{
|
{
|
||||||
|
if (( in_param || in_alias )); then
|
||||||
|
return
|
||||||
|
fi
|
||||||
local pos style_pathsep
|
local pos style_pathsep
|
||||||
style_pathsep=$1_pathseparator
|
style_pathsep=$1_pathseparator
|
||||||
reply=()
|
reply=()
|
||||||
@ -1386,7 +1389,7 @@ _zsh_highlight_main_highlighter_highlight_argument()
|
|||||||
done
|
done
|
||||||
|
|
||||||
if (( path_eligible )); then
|
if (( path_eligible )); then
|
||||||
if (( in_redirection )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
|
if (( in_redirection && ! in_param )) && [[ $last_arg == *['<>']['&'] && $arg[$1,-1] == (<0->|p|-) ]]; then
|
||||||
if [[ $arg[$1,-1] == (p|-) ]]; then
|
if [[ $arg[$1,-1] == (p|-) ]]; then
|
||||||
base_style=redirection
|
base_style=redirection
|
||||||
else
|
else
|
||||||
|
Loading…
Reference in New Issue
Block a user