35

I started using Fish (and oh-my-fish) a couple of weeks ago and one of the things that I find somewhat visually hard is the default background color of the autocomplete options (see the purple background in the image). I tried looking in the Fish page, but couldn't find anything related to that. I'd like to know how that background color can be changed. In case you're wondering, I'm using LXTerminal in LUbuntu (a Ubuntu distro with LXDE).

enter image description here

Roberto S.
  • 1,262
  • 1
  • 14
  • 19

4 Answers4

52

it's more convenient to setup all color configuration via fish web UI, which can be done from cli:

fish_config colors, which launches the config server of fish, and there are already tons of predefined color suggestion

For more info, check out The Fish Shell

Oda Mitsuru
  • 704
  • 1
  • 6
  • 5
24

I found it, after checking these docs, and doing some trial and error with different environment variables that might be responsible for that feature. The environment variable is fish_color_search_match

and the solution is changing the variable like:

$ set fish_color_search_match --background='333'

Where '333' is the color code. It is also possible to use predefined colors like cyan, green, blue, etc. that are available.

Also, I'm aware that maybe this belongs better in Unix&Linux StackExchange (which might have been the reason for the downvote?)

Edit: Take into account that colors will not look correctly if your terminal is not using 256 colors.

Roberto S.
  • 1,262
  • 1
  • 14
  • 19
8

Adding to top voted answer. The command fish_config colors has been removed and you should instead use the following:

$ fish_config browse
1

The following also do the trick

$ fish_config

Reference: https://fishshell.com/docs/current/cmds/fish_config.html

Liawi
  • 46
  • 3