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
20.31k stars 1.33k forks source link

how do I disabled the underline? #573

Closed n11dmeo closed 6 years ago

n11dmeo commented 6 years ago

how do I disabled the underline? image

danielshahaf commented 6 years ago

Add the following to your .zshrc:

(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
mlmarius commented 4 years ago

I'm also having this issue. I've added the above solution to my zsh file but that gives an error on the first line. Where am I supposed to add that in order to remove the underlining ?

Later edit. To whoever reaches this point, make sure to add the above lines AFTER antigen apply

danielshahaf commented 4 years ago

I've edited my previous comment so it'd work anywhere in the zshrc file. Thanks for the bug report :-)

tysun commented 3 years ago

@danielshahaf This works great. Thank you. Since the underline was removed, the text now ends up white when the right arrow key is pressed to accept the suggestion. I have changed the default suggestion text colour to fg=215 in the line typeset -g ZSH_AUTOSUGGEST_HIGHLIGHT_STYLE='fg=215'. But does anyone know where to use that same colour so that when I press the right arrow to accept the suggest the final text is the same as the colour for the suggestion fg=215 and not white? Would that be placed in the # Widgets that accept the entire suggestion block? If so, how so?

Thanks

danielshahaf commented 3 years ago

@tysun Ask the zsh-autosuggestions support channels. https://github.com/zsh-users/zsh-autosuggestions/

danielshahaf commented 3 years ago

Aside: given the number of :+1:'s and :heart:'s on the first reply on this issue, it seems we should add that information to the FAQ. Would anyone like to do the honours? Just open a PR and cross-reference it to this issue. Thanks!

dodona2 commented 3 years ago

Add the following to your .zshrc:

(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none

works for me. Thanks a lot!

rookieeew commented 1 year ago

Add the following to your .zshrc:

(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none

Thanks guys! It works forme !!!

hoshython commented 10 months ago

what about sudo? There is still a line under sudo

phy1729 commented 10 months ago

sudo is colored using the precommand style.

amaddio commented 3 months ago

Together with phy1729 suggestion it would be:

(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
ZSH_HIGHLIGHT_STYLES[precommand]=none

Thanks. Looking good!

bluekeybo commented 1 month ago

If the path separator slash still shows the underline, add it as well:

(( ${+ZSH_HIGHLIGHT_STYLES} )) || typeset -A ZSH_HIGHLIGHT_STYLES
ZSH_HIGHLIGHT_STYLES[path]=none
ZSH_HIGHLIGHT_STYLES[path_pathseparator]=none
ZSH_HIGHLIGHT_STYLES[path_prefix]=none
ZSH_HIGHLIGHT_STYLES[path_prefix_pathseparator]=none
ZSH_HIGHLIGHT_STYLES[precommand]=none