oh-my-fish: OMF commands saying: `set_color: Unknown color '^'`

I’m getting issues with OMF commands, including omf doctor, returning set_color: Unknown color '^' (twice in a row).

This seems to be happening with most OMF commands, and I suspect it may be an incompatibility with fish 3.3.1 and fixed in OMF 7, but omf update is plagued with this issue and doesn’t seem to be working…

omf update omf
fatal: bad revision '^'
set_color: Unknown color '^'
set_color: Unknown color '^'

set_color: Unknown color '^'
set_color: Unknown color '^'

set_color: Unknown color '^'
set_color: Unknown color '^'

Updating https://github.com/oh-my-fish/packages-main master... Done!

Is there a way to do a manual update? I can try that first…

Environment report

Oh My Fish version:   6
OS type:              Darwin
Fish version:         fish, version 3.3.1
Git version:          git version 2.33.0
Git core.autocrlf:    input
set_color: Unknown color '^'
set_color: Unknown color '^'

About this issue

  • Original URL
  • State: open
  • Created 3 years ago
  • Comments: 17 (7 by maintainers)

Commits related to this issue

Most upvoted comments

Yeah, I saw this coming. Some old version of Oh My Fish encounters a new version of Fish. Not matter how loud that could have got telegraphed, this would happen regardlessly.

So, your options:

  1. Update Oh My Fish manually
git -C $HOME/.local/share/omf remote update
git -C $HOME/.local/share/omf reset origin/master --hard
omf reload  # or `exec fish` if `omf reload` fails
  1. Downgrade Fish, update Oh My Fish, upgrade Fish
# That depends on your setup

Do you see any other option, @faho?

Simply start fish with the ^ redirections reenabled:

fish --features no-stderr-nocaret

Then do the update.

deactivate kitty shell integration set -e KITTY_SHELL_INTEGRATION

Thanks for this temporary work around it works with kitty 0.24.0.

@scorphus I really appreciate you helping me out here, just wanted to say that before we continue here are the outputs

_ksi_start_prompt

function _ksi_start_prompt
            set --local cmd_status "$status"
            if test "$_ksi_prompt_state" != "postexec" -a "$_ksi_prompt_state" != "first-run"
                _ksi_mark "D"
            end
            set --global _ksi_prompt_state "prompt_start"
            _ksi_mark "A"
            return "$cmd_status" # preserve the value of $status
        
end

_ksi_end_prompt

function _ksi_end_prompt
            set --local cmd_status "$status"
            # fish trims one trailing newline from the output of fish_prompt, so
            # we need to do the same. See https://github.com/kovidgoyal/kitty/issues/4032
            set --local op (_ksi_original_fish_prompt) # op is an array because fish splits on newlines in command substitution
            if set -q op[2]
                printf '%s\n' $op[1..-2] # print all but last element of array, each followed by a new line
            end
            printf '%s' $op[-1] # print the last component without a newline
            set --global _ksi_prompt_state "prompt_end"
            _ksi_mark "B"
            return "$cmd_status" # preserve the value of $status
        
end