fish-shell icon indicating copy to clipboard operation
fish-shell copied to clipboard

gem related commands breaks the Terminal

Open miguelopezv opened this issue 10 years ago • 3 comments

whenever I use a command related to gem that is not in history it will break the terminal.

Reproduction Steps:

  1. Open Terminal
  2. Write a command related to gem that you haven't used before i.e. 'gem check'.
  3. Add options to a previously used coomand i.e. 'gem update -s'.

Expected behavior:

run the desired command, return the outdated gems or update them.

Observed behavior:

This output repeats in an infinite loop:

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'

Additional information:

This happens since the first time I started to use Fish, two days ago.


Fish version: fish, version 2.2.0

Operating system: OSX 10.11.4 El Capitan - fish installed via Homebrew

Terminal or terminal emulator: OSX Terminal

miguelopezv avatar Apr 16 '16 23:04 miguelopezv

Thanks for filing this! Looks like a dup of #2775. What does functions which output? Any idea where this which function might have come from?

ridiculousfish avatar Apr 16 '16 23:04 ridiculousfish

This is one I caused when I had which as an alias of type.

I had gotten the idea from the mailing list,

https://github.com/fish-shell/fish-shell/issues/2775

Try this patch.

floam avatar Apr 16 '16 23:04 floam

@ridiculousfish as @floam pointed out is an alias for type -all $argv; seems like I wasn't very careful when I moved everything from bash_profile to config.fish.

For know I comment that alias and everything's working as expected. gonna try the patch and see if it works. Thanks!

miguelopezv avatar Apr 17 '16 00:04 miguelopezv