LoginSignup
3
1

More than 5 years have passed since last update.

oh my fishをインストールしたら「Do you have an accidental infinite loop? and __original_fish_user_key_bindings」というエラーがでた

Posted at

エラー内容

The function call stack limit has been exceeded. Do you have an accidental infinite loop?
    and __original_fish_user_key_bindings
        ^
in function '__original_fish_user_key_bindings'
    called on standard input

in function '__original_fish_user_key_bindings'
    called on standard input

# これが永遠に続く

結論

どうやらinit.fishが2回呼ばれてしまって、ループが起きている模様。
.config/fish/config.fish に書いてあるinit.fishを削除することで解決。

手順

1つめ.config/fish/config.fish

# Path to Oh My Fish install.
set -gx OMF_PATH $HOME/.local/share/omf

# Customize Oh My Fish configuration path.
#set -gx OMF_CONFIG $HOME/.config/omf

# Load oh-my-fish configuration.
source $OMF_PATH/init.fish # <-ここ

set fish_theme agnoster

2つめ .config/fish/conf.d/omf.fish

# Path to Oh My Fish install.
set -q XDG_DATA_HOME
  and set -gx OMF_PATH "$XDG_DATA_HOME/omf"
  or set -gx OMF_PATH "$HOME/.local/share/omf"

# Load Oh My Fish configuration.
source $OMF_PATH/init.fish

確かに2回initされている。

ここを見ると、.config/fish/conf.d/omf.fishがおすすめのやり方で、.config/fish/config.fishはもう必要ないとのことだった。
.config/fish/config.fishのinit.fishの部分を消したところ解決。

参考

3
1
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
1