FZF install script crashes "source ~/.bashrc "

Hello everybody,

I’ve been trying to install and configure some extra command line tools including FZF. It is installed by default and basic functionality works (typing fzf in terminal). But how do I enable key binding and auto-completion? I tried to clone the git repo and run the install script, saying yes to all options, but that causes sourcing my .bashrc to crash the terminal.

Any advice?

1 Like

Here is a sample zsh fzf implementation that garuda uses, which I adopted for my use.

1 Like

The first thing you should do is finding out what the install script did and undoing that. FZF should already be installed so you don’t need to install it again. If not you can install it with pacman -S fzf. I’d run that in any case to do a clean installation over pacman again after you have removed it with the git uninstall script.

After that try adding

source /usr/share/fzf/completion.bash && source /usr/share/fzf/key-bindings.bash

to you ~/.bashrc

Source (Arch Wiki)

This should probably be the first place to look if you have problems. I recommend to generally look at the arch wiki page of the packages you install if they have one as you sometimes need to do some manual configuration to set everything up correctly and that’s documented there pretty well.


I’m sorry, I wrote my original post late at night a didn’t do a very good job of describing exactly what I did try.
So here is a bit better run down.

I ran the pacman command to reinstall multiple times - no effect.
I investigated what the script did in my .bashrc and other places, not sure if I found everything, but there is also uninstall script, so no problem there.
I did have a look at Arch wiki and source those file myself, but the result was the same as using the script - sourcing .bashrc (or restarting my terminal) means cursor is on new line but no bash prompt, like it is working on something and after like 10 seconds it just crashes the terminal.

I would advice you to comment out those lines from the .bashrc before installing or reinstalling the package using pacman

I will try this myself to see if it crashes my shell too. If so it might be a bug in their script and you could report it on their GitHub page? Could you maybe share the content of your .bashrc and maybe both of the files you’re trying to source? Is it also crashing if you directly source the two files over the terminal or only if you do so over .bashrc?

Also just to be sure you’re still running bash and not something like zsh or fish, right?

Strike that question about it working when you source it over the terminal. If you remove it from the .bashrc and you can successfully source it after that, the problem should definitely be with the two scripts of FZF.

1 Like

I guess the uninstall script should remove those if you run it first. I took a small glance at the install script last night and it looks like it’s adding the same two source commands to the file.

Well, I am a bit confused and embarrassed here. I tried again today and it seems to be working OK. Pretty sure I did the same things as yesterday, but with positive results… I can source files manually no problem, I can put the command in .bashrc no problem. I probably did something wrong yesterday and didn’t catch it.

I do appreciate all the comments trying to help, thank you very much.

So to sum it up, most likely user error on my side script should work OK.

This topic was automatically closed 2 days after the last reply. New replies are no longer allowed.