hastinbe / theme-kawasaki

kawasaki is a fish theme that emphasizes a simple and useful prompt without useless cluttter.
MIT License
24 stars 8 forks source link

set_color: Unknown color 'brblack' & set_color: Unknown color 'brwhite' #1

Closed Bastes closed 7 years ago

Bastes commented 7 years ago

I just installed kawasaki on a fresh omf install -actually, kawasaki is the very first plugin I plug in- and am getting:

set_color: Unknown color 'brblack'
set_color: Unknown color 'brblack'
set_color: Unknown color 'brwhite'
set_color: Unknown color 'brblack'
set_color: Unknown color 'brwhite'

as I activate it.

I am using fish on an Ubuntu 16.10 ; I'll look into the code for references to these colors and try to set my preferences instead, but I thought you might be interested to know they aren't necessarily set on all systems.

Bastes commented 7 years ago

I'm still having these messages even when I configure $OMF_CONFIG/init.fish

Here's the config I tried:

## Enable the time to be displayed.
set -g theme_display_time yes

## Disable playing the user's current group.
set -g theme_display_group no

set -g theme_color_error         red
set -g theme_color_superuser     red
set -g theme_color_user          white
set -g theme_color_group         666666
set -g theme_color_host          brgreen
set -g theme_color_separator     black
set -g theme_color_bracket       brblue
set -g theme_color_normal        normal
set -g theme_color_time          666666
set -g theme_color_path          white
set -g theme_color_prompt        white
set -g theme_color_virtualenv    bryellow
set -g theme_color_status_prefix brblue
set -g theme_color_status_jobs   brgreen
set -g theme_color_status_rw     white

Hope it helps ^^

hastinbe commented 7 years ago

What is the output of tput colors

Bastes commented 7 years ago

Sorry for the delay ^^°

It says:

256
hastinbe commented 7 years ago

Execute fish -d2 and paste the data it shows on startup

Bastes commented 7 years ago

(again, sorry for the delay ^^° ; and thanks a bunch for helping troubleshoot the problem)

It says:

$ fish -d2
fish: handle_curses() called in response to 'TERM' changing
fish: curses var TERM='xterm-256color'
fish: handle_locale() called in response to 'LANGUAGE' changing
fish: locale var LANGUAGE='fr_FR'
fish: handle_locale() setlocale(): 'fr_FR.UTF-8'
fish: handle_locale() called in response to 'LANG' changing
fish: locale var LANG='fr_FR.UTF-8'
fish: handle_locale() setlocale(): 'fr_FR.UTF-8'
fish: sourcing /usr/share/fish/config.fish
fish: sourcing /etc/fish/config.fish
fish: not sourcing /home/michel/.config/fish/config.fish (not readable or does not exist)
Bienvenue dans fish, le shell amical et interactif
Tapez help pour des instructions sur l'utilisation de fish
fish: handle_locale() called in response to 'LC_ALL' changing
fish: locale var LC_ALL='C'
fish: handle_locale() setlocale(): 'C'
fish: changing message locale from '' to 'C'
fish: handle_locale() called in response to 'LC_ALL' changing
fish: locale var LC_ALL=''
fish: handle_locale() setlocale(): 'fr_FR.UTF-8'
fish: changing message locale from 'C' to 'fr_FR.UTF-8'
fish: handle_locale() called in response to 'LC_ALL' changing
fish: locale var LC_ALL='C'
fish: handle_locale() setlocale(): 'C'
fish:
fish: handle_locale() called in response to 'LC_ALL' changing
fish: locale var LC_ALL=''
fish: handle_locale() setlocale(): 'fr_FR.UTF-8'
fish: changing message locale from 'C' to 'fr_FR.UTF-8'
hastinbe commented 7 years ago

Fish version?

The named colors brwhite and brblack were added in fish 2.4b1. Ubuntu 16.10 has version 2.3.1-1 in their repo. If your version is < 2.3.1-1 then you could either use 808080 for brblack and FFFFFF for brwhite, or upgrade by adding their PPA

Bastes commented 7 years ago

fish, version 2.3.1 indeed ^^ thanks for this fix, I'm trying the ppa right away ^^d

Bastes commented 7 years ago

Well, after trying, I've got weird interactions with the rbenv plugin:

⋊> ~ omf install kawasaki                                                                        16:14:30
Installing theme kawasaki
✔ theme kawasaki successfully installed.
__theme_reset_color : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_reset_color
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_time : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_time
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_userhost : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_userhost
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_pwd : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_pwd
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_git_status : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_git_status
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_jobs : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_jobs
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_pwd_rw : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_pwd_rw
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_virtualenv : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_virtualenv
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_prompt_char : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_prompt_char
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

Which crashed the command line, repeating

__theme_reset_color : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_reset_color
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_time : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_time
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_userhost : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_userhost
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_pwd : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_pwd
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_git_status : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_git_status
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_jobs : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_jobs
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_pwd_rw : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_pwd_rw
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_virtualenv : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_virtualenv
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

__theme_print_prompt_char : commande introuvable
~/.config/fish/functions/fish_prompt.fish (line 1): __theme_print_prompt_char
                                                    ^
dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

dans la substitution de commande
    called on line 102 of file ~/.config/fish/functions/fish_prompt.fish

in function 'fish_prompt'
    called on standard input

dans la substitution de commande
    called on standard input

after each subsequent command.

Restarting my console, I can see the kawasaki prompt, but before the prompt I get:

~/.local/share/omf/pkg/rbenv/init.fish (line 9):   if command rbenv init - | grep --quiet "function"
                                                              ^
from sourcing file ~/.local/share/omf/pkg/rbenv/init.fish
    called during startup

in function 'require'
    called on line 22 of file ~/.local/share/omf/init.fish
    avec la liste de paramètres '--path /home/michel/.local/share/omf/pkg/direnv /home/michel/.local/share/omf/pkg/fish-spec /home/michel/.local/share/omf/pkg/omf /home/michel/.local/share/omf/pkg/rbenv'

from sourcing file ~/.local/share/omf/init.fish
    called on line 7 of file ~/.config/fish/conf.d/omf.fish

from sourcing file ~/.config/fish/conf.d/omf.fish
    called on line 212 of file /usr/share/fish/config.fish

from sourcing file /usr/share/fish/config.fish
    called during startup

Which is kind of annoying. I guess I'm gonna stop annoying you with this, I guess I'm the only one encountering these and there are still other pompts I could use instead.

Thanks for your help, and I'll be sure to try and re-install your theme sometimes ^^

hastinbe commented 7 years ago

Thanks for the report. This turns out to be an issue with omf not updating the fish function path when setting a theme. It affects themes which use their own functions/ directory (most don't). Reloading the shell would fix the problem. I'm going to modify the theme so that it will work without having to reload. And I will open an issue for omf in-case this behavior was not intended. Go ahead and omf remove kawasaki and omf install kawasaki again

Bastes commented 7 years ago

Sorry for the long wait, but I can confirm it now seems to work a treat ^^d thanks for the great theme.