Home > Mobile >  Why does typing $ in fish shell show the error "Unknown command: bind_dollar"?
Why does typing $ in fish shell show the error "Unknown command: bind_dollar"?

Time:12-24

I am running fishshell 3.5.1 on MacOS Monterey 12.5.1 I can work most all commands just fine but whenever I try to type in the dollar sign (even before pressing Return) I get the error: "Unknown command: bind_dollar"

I've tried:

  • Reinstalling w/Homebrew
  • Confirming that fish is in PATH
  • Deleting my fish.config

Below is the output of my issue and setup:

This happens as soon as I type a dollar sign:

$ fish: Unknown command: bind_dollar

Fish config directory:

~/.config/fish
$ ls
completions/    conf.d/         config.fish     fish_variables  functions/

Using /bin/sh to examine my $PATH:

$ /bin/sh
sh-3.2$ echo $PATH
/usr/local/bin:/usr/local/git/bin:/usr/bin:/bin:/usr/sbin:/sbin:/usr/local/go/bin

Ensuring fish is located in PATH:

sh-3.2$ whereis fish
fish: /usr/local/bin/fish

Viewing the contents of my fish.config (which is the default version):

sh-3.2$ cat config.fish
if status is-interactive
    # Commands to run in interactive sessions can go here
end

CodePudding user response:

Thanks to Glenn's comment, I was able to track down the issue:

Running:

grep -r bind_dollar ~/.config/fish

Returned:

~/.config/fish/functions/fish_user_key_bindings.fish

Which contained:

function fish_user_key_bindings
      ### bang-bang ###
      bind ! bind_bang
      bind $ bind_dollar # <-- removing this line fixed the issue
      ### bang-bang ###
  end

Removing the "bind_dollar" line fixed the issue.

  • Related