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).
fish is empty by default. To create a custom prompt create a file ~/. config/fish/functions/fish_prompt. fish and fill it with your prompt.
Simply run fish_config to open the web client. From there, you can choose the themes, colors, prompts, inspect the FSH functions and variables, and see the history of commands used. Changes are, in turn, stored in the ~/. config/fish folder and can be accessed and edited there to dodge the optional web configuration.
To give a variable to an external command, it needs to be “exported”. Unlike other shells, fish does not have an export command. Instead, a variable is exported via an option to set , either --export or just -x .
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
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.
Adding to top voted answer. The command fish_config colors
has been removed and you should instead use the following:
$ fish_config browse
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With