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

Syntax highlighting is not reset after "cd fo<tab><enter>" #310

Closed
blueyed opened this issue May 9, 2016 · 4 comments
Closed

Syntax highlighting is not reset after "cd fo<tab><enter>" #310

blueyed opened this issue May 9, 2016 · 4 comments
Labels

Comments

@blueyed
Copy link

blueyed commented May 9, 2016

After cd fo<tab><enter>, where cd fo<tab> displays multiple options with " -- directory in cdpath --" the syntax highlighting is not reset, and the "cd: no such file or directory: fo" is displayed in grey, just like / similar to the (new?) part that highlights the already typed text.

This only happens after the first call to this in a new shell, afterwards it works.
But there are differences, e.g. with cd b<tab><enter> it seemed to be triggered always?!

Hopefully this is enough to reproduce, otherwise I'd be happy to bisect and/or provide more information.

% setopt
alwaystoend
autocd
autopushd
completeinword
correct
extendedglob
extendedhistory
noflowcontrol
noglobalrcs
globcomplete
histexpiredupsfirst
histignoredups
histignorespace
incappendhistorytime
interactive
interactivecomments
longlistjobs
mailwarning
monitor
numericglobsort
printeightbit
pushdignoredups
pushdminus
pushdsilent
rcexpandparam
shinstdin
zle
@danielshahaf
Copy link
Member

I cannot reproduce this.

Could you provide a self-contained reproduction recipe (starting from zsh -f and creating its own directory tree for testing)?

Does #288 fix this?

Are you using latest master?

Feel free to join #zsh-syntax-highlighting on freenode.

@blueyed
Copy link
Author

blueyed commented May 9, 2016

#288 does not fix it.
I am using master.

I've feared that it might be related to some custom settings/config. Would need to investigate further, but cannot at the moment.

@blueyed
Copy link
Author

blueyed commented May 11, 2016

Sorry for the confusion, this happened because of my theme.

I've started using %F{19} for coloring (instead of the $fg-style vars), but have not added %f.
It's a bit weird though why it did not happen always.

It had the nice side effect of using a different style for (parts of) the already typed text after completion was triggered, which I've thought was a new feature after also upgrading z-sy-h at the same time.. :)
(so you could see what was there before the completion was done)

@blueyed blueyed closed this as completed May 11, 2016
@danielshahaf
Copy link
Member

We don't have a feature for highlighting the just-added-by-completion text differently, however, there are the show-ambiguity and list-colors styles, which are independently useful...

I use zstyle -e :completion:\* list-colors 'reply=( "=(#b)(${(b)PREFIX})(?)([^ ]#)*=0=33=34=33" )', changing the second 33 to 34 gives a markedly different UX.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants