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

[Bash in Linux] Incompatibility between gitstatus and fzf-tab-completion utilities, terminal exits #383

Closed
bluz71 opened this issue Apr 24, 2023 · 3 comments

Comments

@bluz71
Copy link

bluz71 commented Apr 24, 2023

Hello @romkatv,

Long-time user of gitstatus via my bash-seafly-prompt script.

A couple days ago I wanted to use fzf-tab-completion in my Bash configuration.

No good, there is a bad interaction between gitstatus and fzf-tab-completion when doing Bash tab completion; basically the terminal GUI window (Alacritty & GNOME-Terminal) will close upon hitting ENTER after a completion.

I can repeat the issue with this minimal ~/.bashrc file:

_command_prompt() {
    if ! hash gitstatus_query 2>/dev/null || ! gitstatus_query -p; then
        return
    fi
}

if [[ -r ~/.gitstatus/gitstatus.plugin.sh ]]; then
    source ~/.gitstatus/gitstatus.plugin.sh
    gitstatus_stop && gitstatus_start -c 0 -d 0
fi

PROMPT_COMMAND=_command_prompt

. ~/fzf-tab-completion/bash/fzf-bash-completion.sh
bind -x '"\t": fzf_bash_completion'

I installed fzf-tab-completion via git clone https://github.com/lincheney/fzf-tab-completion in the home directory. The fzf utility needs to be installed somewhere in the $PATH.

Then do cd <TAB>, select a directory from the fzf list followed by ENTER to execute the cd command. BOOM, the window will close.

Maybe fzf-tab-completion is at fault, I don't know, but I have come here first. Hopefully an easy fix either here, or at fzf-tab-completion or possibly even my bash-seafly-prompt script.

Regards.

@romkatv
Copy link
Owner

romkatv commented Apr 24, 2023

I'm afraid I won't commit to debugging this.

@bluz71
Copy link
Author

bluz71 commented Apr 24, 2023

Ok, sad for me, but life goes on.

@bluz71
Copy link
Author

bluz71 commented Apr 26, 2023

@lincheney, author of fzf-tab-completion implemented a fix for this issue.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants