Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Theme installation error #698

Closed
devster31 opened this issue Apr 30, 2019 · 3 comments · Fixed by #711
Closed

Theme installation error #698

devster31 opened this issue Apr 30, 2019 · 3 comments · Fixed by #711

Comments

@devster31
Copy link

I just updated OMF using omf update and tried to install a new theme.

Environment report

Oh My Fish version:   6
OS type:              Darwin
Fish version:         fish, version 3.0.2
Git version:          git version 2.21.0
Git core.autocrlf:    input
Your shell is ready to swim.
omf install pure
Updating https://github.com/oh-my-fish/packages-main master... Done!
Installing package pure
✔ pure successfully installed.
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/devster/.config/omf/themes/bobthefish /Users/devster/.local/share/omf/themes/bobthefish /Users/devster/.config/omf/themes/bobthefish/functions /Users/devster/.local/share/omf/themes/bobthefish/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/devster/.config/omf/themes/bobthefish /Users/devster/.local/share/omf/themes/bobthefish /Users/devster/.config/omf/themes/bobthefish/functions /Users/devster/.local/share/omf/themes/bobthefish/functions'

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

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

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 'install pure'


       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
@genzj
Copy link

genzj commented May 15, 2019

got same problem. I guess there should be quotation marks around $function_indexes and $complete_indexes.

@devster31 you may want to try following patch for sure. It's working in my env.

--- a/lib/autoload.fish
+++ b/lib/autoload.fish
@@ -45,8 +45,8 @@ function __autoload_erase
       or  set function_indexes $function_indexes (contains -i $path $fish_function_path)
   end;
   test -n "$function_indexes"
-    and set -e fish_function_path[$function_indexes]
+    and set -e fish_function_path["$function_indexes"]
   test -n "$complete_indexes"
-    and set -e fish_complete_path[$complete_indexes]
+    and set -e fish_complete_path["$complete_indexes"]
   return 0
 end;

@devster31
Copy link
Author

It does indeed seem to solve the problem.
Maybe you could submit a pull request?

@genzj
Copy link

genzj commented May 17, 2019

Great to know it's working. I'll submit a PR once I make sure the patch won't hurt fish 2.x.

Thanks a lot 👍

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants