zsh-syntax-highlighting icon indicating copy to clipboard operation
zsh-syntax-highlighting copied to clipboard

Defining a function without the keyword `function` highlights its identifier as unknown/error

Open Iskustvo opened this issue 1 year ago • 2 comments

Steps to reproduce:

  • Start the zsh in new terminal emulator, without any configuration
    termite -e 'zsh -dfi'
    
  • Source z-sy-h from where it's installed, and use only main highlighter
    source "/usr/share/zsh/plugins/zsh-syntax-highlighting/zsh-syntax-highlighting.zsh"
    ZSH_HIGHLIGHT_HIGHLIGHTERS=(main)
    
  • Compare the highlighting of the function identifier with and without preceding keyword function 2022-08-14-225152_1920x1080_scrot 2022-08-14-225318_1920x1080_scrot

Versions:

zsh - 5.9-1
zsh-syntax-highlighting - 0.7.1-1

Iskustvo avatar Aug 14 '22 20:08 Iskustvo

Duplicate of https://github.com/zsh-users/zsh-syntax-highlighting/issues/223. (Though to be fair, I remembered that issue was labeled needs:lookahead, so it was easy for me to find it.)

danielshahaf avatar Aug 19 '22 09:08 danielshahaf

Duplicate of #223. (Though to be fair, I remembered that issue was labeled needs:lookahead, so it was easy for me to find it.)

Fair enough. Why not close this one then?

Iskustvo avatar Aug 20 '22 22:08 Iskustvo