每当我使用与历史不存在的宝石相关的命令时,它都会破坏终端。在这个例子中,我打算写'gem check',这是第一次发生这种情况:
Miguel@MacBook-Pro ~> gem ch
The function call stack limit has been exceeded. do you have an accidental infinite loop?
- (line 1): type -all $argv;
^
in function 'which'
called on line 4 of file /usr/local/Cellar/fish/2.2.0/share/fish/functions/type.fish
with parameter list '-a -- -all'
in command substitution
called on line 2 of file /usr/local/Cellar/fish/2.2.0/share/fish/functions/type.fish
in function 'type'
called on line 1 of file -
with parameter list '-all -a -- -all'
此输出在无限循环中反复重复。
如果我在prevoius used命令之后写了其他内容,也会发生这种情况。即:gem update -s,-s部分将获得相同的行为
答案 0 :(得分:2)
此处的问题是您有一个名为which
的别名,可以调用type
。由于type
是一个函数,在某些路径中(当使用“-a”调用时)调用which
,这会导致“无限”循环。
在下一个鱼版本中,将通过调用command which
函数中的type
来解决此问题。目前,解决方案是删除别名或将其称为其他内容。