Skip to content

Escaped variable-declaring reserved words are builtins #701

Open
@danielshahaf

Description

@danielshahaf
Member

In BUFFER='\local a=( /* )', the word local is highlighted as a reserved word where it's in fact a builtin.

Activity

danielshahaf

danielshahaf commented on Mar 17, 2020

@danielshahaf
MemberAuthor

Trace with current master (9ceb7c6)::

⋮
+_zsh_highlight_main_highlighter_highlight_list:177> _zsh_highlight_main__type '\local' 1                                                                                                                           
+_zsh_highlight_main__type:1> integer -r aliases_allowed=1                                                                                                                                                          
+_zsh_highlight_main__type:7> integer may_cache=1                                                                                                                                                                   
+_zsh_highlight_main__type:10> ((  1  ))                                                                                                                                                                            
+_zsh_highlight_main__type:11> REPLY=none                                                                                                                                                                           
+_zsh_highlight_main__type:12> [[ -n none ]]                                                                                                                                                                        
+_zsh_highlight_main__type:13> return                                                                                                                                                                               
+_zsh_highlight_main_highlighter_highlight_list:178> local res=none                                                                                                                                                 
+_zsh_highlight_main_highlighter_highlight_list:179> [[ none == alias ]]                                                                                                                                            
+_zsh_highlight_main_highlighter_highlight_list:208> _zsh_highlight_main_highlighter_expand_path '\local'
+_zsh_highlight_main_highlighter_expand_path:2> ((  1 == 1  ))        
+_zsh_highlight_main_highlighter_expand_path:5> setopt localoptions nonomatch
+_zsh_highlight_main_highlighter_expand_path:6> unset REPLY         
+_zsh_highlight_main_highlighter_expand_path:7> : local         
+_zsh_highlight_main_highlighter_highlight_list:209> _zsh_highlight_main__type local 0                                                                                                                             
+_zsh_highlight_main__type:1> integer -r aliases_allowed=0        
+_zsh_highlight_main__type:7> integer may_cache=1   
+_zsh_highlight_main__type:10> ((  1  ))                     
+_zsh_highlight_main__type:11> REPLY=reserved                
+_zsh_highlight_main__type:12> [[ -n reserved ]]                         
+_zsh_highlight_main__type:13> return                                  
+_zsh_highlight_main_highlighter_highlight_list:210> res=reserved                   
+_zsh_highlight_main_highlighter_highlight_list:215> _zsh_highlight_main__is_redirection '\local'
⋮
added this to the 0.8.0 milestone on Mar 17, 2020
linked a pull request that will close this issue on Mar 17, 2020
removed this from the 0.8.0 milestone on May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      Participants

      @danielshahaf

      Issue actions

        Escaped variable-declaring reserved words are builtins · Issue #701 · zsh-users/zsh-syntax-highlighting