Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Escaped variable-declaring reserved words are builtins #701

Open
danielshahaf opened this issue Mar 17, 2020 · 1 comment · May be fixed by #702
Open

Escaped variable-declaring reserved words are builtins #701

danielshahaf opened this issue Mar 17, 2020 · 1 comment · May be fixed by #702

Comments

@danielshahaf
Copy link
Member

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

@danielshahaf
Copy link
Member Author

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'
⋮

danielshahaf added a commit to danielshahaf/zsh-syntax-highlighting that referenced this issue Mar 17, 2020
danielshahaf added a commit to danielshahaf/zsh-syntax-highlighting that referenced this issue Mar 17, 2020
@danielshahaf danielshahaf added this to the 0.8.0 milestone Mar 17, 2020
@danielshahaf danielshahaf linked a pull request Mar 17, 2020 that will close this issue
danielshahaf added a commit to danielshahaf/zsh-syntax-highlighting that referenced this issue Mar 19, 2020
danielshahaf added a commit to danielshahaf/zsh-syntax-highlighting that referenced this issue Mar 19, 2020
@danielshahaf danielshahaf removed this from the 0.8.0 milestone May 22, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant