3 ms·
Would be interested to know, if there is a way of highlighting text in bash while using ^R.
by psibi 12y ago
Would be interested to know, if there is a way of highlighting text in bash while using ^R.
- voltagex_ 12y agoHighlighting? How so? Are you in a graphical term emulator or using something like gpm?
- psibi 12y agoThe 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.)
- reuven 12y agoOP 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.)
- psibi 12y agoThanks, but it seems you cannot do it in bash since it uses readline. More details here: http://unix.stackexchange.com/a/131395/29539 http://unix.stackexchange.com/a/131395/29539