oh-my-fish: Getting errors on when setting omf theme

Operating system: Ubuntu 18.04.1 LTS (WSL) Fish version: 2.7.1-1538 OMF version: 6 Git version: 2.17.1

I have tried removing and reinstalling OMF and packages, but I still get this output when I execute omf theme {theme_name}:

dev ❯ omf theme bobthefish
set --erase: Expected 1 args, got 2
~/.local/share/omf/lib/autoload.fish (line 85):
    and set -e fish_function_path[$function_indexes]
        ^
in function “__autoload_erase”
        called on line 6 of file ~/.local/share/omf/lib/autoload.fish
        with parameter list “/c/Users/me/.config/omf/themes/pure /c/Users/me/.local/share/omf/themes/pure /c/Users/me/.config/omf/themes/pure/functions /c/Users/me/.local/share/omf/themes/pure/functions”

in function “autoload”
        called on line 25 of file ~/.local/share/omf/pkg/omf/functions/themes/omf.theme.set.fish
        with parameter list “-e /c/Users/me/.config/omf/themes/pure /c/Users/me/.local/share/omf/themes/pure /c/Users/me/.config/omf/themes/pure/functions /c/Users/me/.local/share/omf/themes/pure/functions”

in function “omf.theme.set”
        called on line 18 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.theme.fish
        with parameter list “bobthefish”

in function “omf.cli.theme”
        called on line 3 of file -
        with parameter list “bobthefish”

in function “__omf_last_command”
        called on line 51 of file ~/.local/share/omf/pkg/omf/functions/omf.fish

in function “omf”
        called on standard input
        with parameter list “theme bobthefish”


       set - display and change shell variables.

   Synopsis
       set [SCOPE_OPTIONS]
       set [OPTIONS] VARIABLE_NAME VALUES...
       set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
       set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES...
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
       set ( -S | --show ) [SCOPE_OPTIONS] [VARIABLE_NAME]...

set: Type “help set” for related documentation

Everything seems to work OK, but it’s annoying to get this message. I don’t know if it’s specific to my config or not.

Ultimately I’m hoping to be able to set the theme in my config.fish depending on certain parameters, such as SSH_CONNECTION. If there’s a better way to do it, I’m all ears!

Thank you, Nick

About this issue

  • Original URL
  • State: closed
  • Created 6 years ago
  • Reactions: 2
  • Comments: 26 (5 by maintainers)

Most upvoted comments

Seems like we should still fix this on master ahead of the dev branch though so that people who install the stable default version aren’t greeted with immediate failures. Could be very off putting for a first install to fail.

EDIT NOTE To be clear I am mentioning this for the path of using curl from brew fish, as it autoselects master branch ( tag v6 ) and not develop. I would open a PR but have nowhere to suggest merging it into? Inclination is to open a branch based on the v6 tag as the destination for a hot fix merge? Also, I found one remaining issue even on master that I submitted a PR for.

I got rid of errors by editing <omf>/lib/autoload.fish, on or about line 47 to

test -n "$function_indexes"
    # and set -e fish_function_path[$function_indexes]
	and for x in fish_function_path[$function_indexes]; set -e x; end
  test -n "$complete_indexes"
    # and set -e fish_complete_path[$complete_indexes]
	and for x in fish_complete_path[$complete_indexes]; set -e x; end
  return 0

but the theme still does not change until fish is restarted

➜ omf doctor                                                                                                     (aws)  (371ms)
Oh My Fish version:   6
OS type:              Darwin
Fish version:         fish, version 3.0.2
Git version:          git version 2.18.0
Git core.autocrlf:    input
Your shell is ready to swim.

same here omf theme default results with

set --erase: Expected 1 args, got 2
~/.local/share/omf/lib/autoload.fish (line 85):
    and set -e fish_function_path[$function_indexes]
        ^
in function '__autoload_erase'
	called on line 6 of file ~/.local/share/omf/lib/autoload.fish
	with parameter list '/Users/rsladek/.config/omf/themes/spacefish /Users/rsladek/.local/share/omf/themes/spacefish /Users/rsladek/.config/omf/themes/spacefish/functions /Users/rsladek/.local/share/omf/themes/spacefish/functions'

in function 'autoload'
	called on line 25 of file ~/.local/share/omf/pkg/omf/functions/themes/omf.theme.set.fish
	with parameter list '-e /Users/rsladek/.config/omf/themes/spacefish /Users/rsladek/.local/share/omf/themes/spacefish /Users/rsladek/.config/omf/themes/spacefish/functions /Users/rsladek/.local/share/omf/themes/spacefish/functions'

in function 'omf.theme.set'
	called on line 18 of file ~/.local/share/omf/pkg/omf/functions/cli/omf.cli.theme.fish
	with parameter list 'default'

in function 'omf.cli.theme'
	called on line 3 of file -
	with parameter list 'default'

in function '__omf_last_command'
	called on line 51 of file ~/.local/share/omf/pkg/omf/functions/omf.fish

in function 'omf'
	called on standard input
	with parameter list 'theme default'


       set - display and change shell variables.

   Synopsis
       set [SCOPE_OPTIONS]
       set [OPTIONS] VARIABLE_NAME VALUES...
       set [OPTIONS] VARIABLE_NAME[INDICES]... VALUES...
       set ( -q | --query ) [SCOPE_OPTIONS] VARIABLE_NAMES...
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME
       set ( -e | --erase ) [SCOPE_OPTIONS] VARIABLE_NAME[INDICES]...
       set ( -S | --show ) [SCOPE_OPTIONS] [VARIABLE_NAME]...

set: Type 'help set' for related documentation

omf doctor

output

Oh My Fish version:   6
OS type:              Darwin
Fish version:         fish, version 3.0.2
Git version:          git version 2.23.0
Git core.autocrlf:    input
Your shell is ready to swim.