Fish RVM 使用错误

编程入门 行业动态 更新时间:2024-10-26 04:23:42
本文介绍了Fish RVM 使用错误的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧! 问题描述

所以我安装了fish和oh-my-fish,当我想使用rvm时出现这个错误:

So I installed fish and oh-my-fish, and when i want to use rvm I get this error:

➜ avalancha git:(services) ✗ rvm use 2.1.0 Using /home/matias/.rvm/gems/ruby-2.1.0 fish: The '$' character begins a variable name. The character '{', which directly followed a '$', is not allowed as a part of a variable name, and variable names may not be zero characters long. To learn more about variable expansion in fish, type 'help expand-variable'. /home/matias/.config/fish/functions/rvm.fish (line 2): begin; set -xg rvm_bin_path "/home/matias/.rvm/bin" ; set -xg GEM_HOME "/home/matias/.rvm/gems/ruby-2.1.0" ; set -xg XDG_SESSION_PATH "/org/freedesktop/DisplayManager/Session0" ; set -xg rvm_path "/home/matias/.rvm" ; set -xg XDG_SEAT_PATH "/org/freedesktop/DisplayManager/Seat0" ; set -xg DEFAULTS_PATH "/usr/share/gconf/ubuntu.default.path" ; set -xg rvm_prefix "/home/matias" ; set -xg PATH "/home/matias/.rvm/gems/ruby-2.1.0/bin" "/home/matias/.rvm/gems/ruby-2.1.0@global/bin" "/home/matias/.rvm/rubies/ruby-2.1.0/bin" "/home/matias/.rvm/bin" "/usr/local/sbin" "/usr/local/bin" "/usr/sbin" "/usr/bin" "/sbin" "/bin" "/usr/games" "/usr/local/games" ; set -xg MANDATORY_PATH "/usr/share/gconf/ubuntu.mandatory.path" ; set -xg rvm_version "1.25.29 stable" ; set -xg rvm_ruby_string "ruby-2.1.0" ; set -xg GEM_PATH "/home/matias/.rvm/gems/ruby-2.1.0" "/home/matias/.rvm/gems/ruby-2.1.0@global" ; set -xg rvm_delete_flag "0" ; set -xg rvm_debug " { (( ${rvm_debug_flag:-0} )) || return 0;" ; ;end eval2_inner <&3 3<&- ^ in . (source) call of file '-', called on line 22 of file '/home/matias/.config/fish/functions/rvm.fish', in function 'rvm', called on standard input, with parameter list 'use 2.1.0' .: Error while reading file '-'

有人知道是什么吗?

推荐答案

我遇到了同样的问题.这是由 rvm_debug 变量的多行值引起的不兼容.我修补了该函数以通过进行一些小的更改来完全忽略此变量.

I had the same issue. It's an incompatibility caused by the multiline value of the rvm_debug variable. I patched the function to ignore this variable completely by making a small change.

打开 ~/.config/fish/functions/rvm.fish 并将第 7 行更改为:

and eval (grep '^rvm\|^[^=]*PATH\|^GEM_HOME' $env_file | grep -v '_clr=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')

进入这个:

and eval (grep '^rvm\|^[^=]*PATH\|^GEM_HOME' $env_file | grep -v '_clr=' | grep -v 'rvm_debug=' | sed '/^[^=]*PATH/s/:/" "/g; s/^/set -xg /; s/=/ "/; s/$/" ;/; s/(//; s/)//')

我不知道 rvm_debug 用于什么,但我的系统似乎没有它就可以工作.

I don't know what rvm_debug is being used for, but my system seems to work without it.

更多推荐

Fish RVM 使用错误

本文发布于:2023-06-08 06:34:06,感谢您对本站的认可!
本文链接:https://www.elefans.com/category/jswz/34/576191.html
版权声明:本站内容均来自互联网,仅供演示用,请勿用于商业和其他非法用途。如果侵犯了您的权益请与我们联系,我们将在24小时内删除。
本文标签:错误   Fish   RVM

发布评论

评论列表 (有 0 条评论)
草根站长

>www.elefans.com

编程频道|电子爱好者 - 技术资讯及电子产品介绍!