Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

.fzf.bash breaks git/bash completions #72

Closed
lithammer opened this issue Jul 1, 2014 · 3 comments
Closed

.fzf.bash breaks git/bash completions #72

lithammer opened this issue Jul 1, 2014 · 3 comments
Assignees

Comments

@lithammer
Copy link

Whichever of these two that gets sourced first stops working. If .fzf.bash is first, the vim ~/**<TAB> stuff will stop working, and if the other way around git <TAB> will stop working.

.bash_profile

# Add tab completion for many Bash commands
if [ -f "$(brew --prefix)/etc/bash_completion" ]; then
    source "$(brew --prefix)/etc/bash_completion"
fi

# Enable fzf
if [ -e "$HOME/.fzf.bash" ]; then
    source "$HOME/.fzf.bash"
fi
@lithammer lithammer changed the title .fzf.bash breaks git/bash completions (and more?) .fzf.bash breaks git/bash completions Jul 1, 2014
@junegunn
Copy link
Owner

junegunn commented Jul 1, 2014

Nice find. It's a tricky situation. Both scripts are overriding previously defined completions. I'll see if I could make fzf-completion script behave in a more civilized manner.

@junegunn
Copy link
Owner

junegunn commented Jul 4, 2014

Hey, I've updated fzf completion to fail back to the original completion function when trigger sequence is not found. Please update and check if it helps the situation. Of course this only works when .fzf.bash is sourced after /etc/bash_completion.

@junegunn
Copy link
Owner

I believe this is fixed in the recent version. Please reopen the issue if you still see the problem.

tmuehlbacher added a commit to tmuehlbacher/nixpkgs that referenced this issue Apr 21, 2024
put all of fzf initialization after the bash-completions initialization
in bashrc, as the upstream project suggests in
junegunn/fzf#72

Fixes: NixOS#303195
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants