zsh-users / zsh-syntax-highlighting

Fish shell like syntax highlighting for Zsh.
github.com/zsh-users/zsh-syntax-highlighting
BSD 3-Clause "New" or "Revised" License
20k stars 1.33k forks source link

How do I allow a certain command? #925

Closed Lyton505 closed 1 year ago

Lyton505 commented 1 year ago

Typing the following:

git clone git@github.com:aleixrodriala/wa-tunnel.git

gives a red font colour for the git@github.com:aleixrodriala/wa-tunnel.git part. How can I change this?

danielshahaf commented 1 year ago

Typing the following:

git clone ***@***.***:aleixrodriala/wa-tunnel.git

gives a red font colour for the @.***:aleixrodriala/wa-tunnel.git` part. How can I change this?

Sounds like another plugin's work, unless you have some (possibly global) aliases in play.

Does it reproduce under zsh -f + source /path/to/zsh-syntax-highlighting.zsh?

Do any of the three space-separated words appear in the LHS of anything in the output of alias -L?

Lyton505 commented 1 year ago

sorry for the late reply. The red font colour disappears when I run

zsh -f

followed by:

source /path/to/zsh-syntax-highlighting.zsh

This seems to suggest that it probably is another plugin causing this.

Do any of the three space-separated words appear in the LHS of anything in the output of alias -L?

Which 3 space-separated words are you referring to? Running:

alias -L | grep clone

shows me:

alias gcl='git clone --recurse-submodules'

Lyton505 commented 1 year ago

It has now disappeared. I think zsh -f did the trick