Hacker News new | past | comments | ask | show | jobs | submit login

The OP has mentioned this in his article "Depending on your shell and configuration, the matching text might even be highlighted."

I use gnome-terminal and I don't see any highlighting there. But it seems to work in zsh for OP. (Probably oh-my-zsh is providing it.)




OP here. My zsh configuration, done through oh-my-zsh, contains the following line:

zle_highlight=(region:standout special:standout suffix:bold isearch:bold,underline,fg=yellow,bg=red)

As you can see, one of the items here is "isearch", and it's both bold and underlined, with a yellow foreground and red background. I set that up as part of a custom theme that I wrote for oh-my-zsh.

I'm not sure if zle_highlight is part of the standard zsh package. I'm sure that there is a way to get bash to do something similar, but I don't know what it would be. (I switched from bash to zsh about 4-5 years ago, and have only good things to say.)


Thanks, but it seems you cannot do it in bash since it uses readline. More details here: http://unix.stackexchange.com/a/131395/29539




Join us for AI Startup School this June 16-17 in San Francisco!

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: