gwsw / less

Less - text pager
http://greenwoodsoftware.com/less
Other
575 stars 88 forks source link

How to set the prompt's color to the terminal's reverse? #594

Closed 097115 closed 2 hours ago

097115 commented 3 hours ago

I have these default settings:

export LESS='--mouse -i -e -F -R -M -X --use-color -Dd+y$-Du+r'

And would like to set the prompt's colors to the terminal's reverse ones: i.e., to use the terminal's background as the prompt's foreground and vice versa.

I tried experimenting with something as [probably] erroneous as -DP-~-~, and some other variations, but with no luck, unfortunately. Would be grateful for a hint :)

OS: Ubuntu 22.04 TERM: xterm-256color / tmux-256color terminal: xterm, kitty, alacritty

gwsw commented 2 hours ago

I would think that -DP-~ would do it. Does that not work for you?

097115 commented 2 hours ago

I would think that -DP-~ would do it. Does that not work for you?

Ah, with the latest version it does!

My Ubuntu has less 590, so I build 668 now, and with it everything works OK (590 was showing just the regular colors, non-reversed).

Thanks!