Closed adoyle-h closed 1 year ago
I'm using https://github.com/lincheney/fzf-tab-completion . When pressed
ls<Tab>
,
I tried that setting with bind -x '"\t": fzf_bash_completion'
but cannot reproduce the problem. How did you set up fzf-tab-completion
?
the ble.sh prints
[ble: press RET to continue]
This message is supposed to be only printed when the redirection of stderr
is failing due to some setup issues or due to the crash of ble.sh. Since your setup in #303 seems to have some problems with the redirections of stderr
and stdout
, I suspect that affects the behavior of the fzf-tab-completion binding. How do you source ble.sh currently?
Load below content with 1> >(...)
and 2> >(...)
redirections mentioned in #303 .
source fzf-tab-completion/bash/fzf-bash-completion.sh
bind -x '"\t": fzf_bash_completion'
_fzf_bash_completion_loading_msg() {
printf '%b%s \n' "${PS1@P}" "${READLINE_LINE}" | tail -n 1
}
The _fzf_bash_completion_loading_msg is used for keeping the origin PS1 prompt. Otherwise the fzf-tab-completion will print Loading matches ...
when completing.
source ble/share/blesh/ble.sh &> "$(tty)"
_fzf_bash_completion_loading_msg() { printf '%b%s \n' "${PS1@P}" "${READLINE_LINE}" | tail -n 1 }
Ah, so you are outputting PS1
. The variable PS1
is set to a different value [ble: press RET to continue]
while the user inputs are processed. So far, I haven't think users might want to access PS1
through keybindings.
If you just wanted to disable it, you could remove the above "${PS1@P}"
(and the corresponding %b
in the format string).
In commit 2eadcd5b, I changed PS1
to be restored to the user's value while running bind -x
commands. Could you check the behavior?
It get fixed in 2eadcd5. I appreciate your help.
I need to use PS1
because fzf_bash_completion erase the cursorline to print _fzf_bash_completion_loading_msg
. So I need to refill the PS1
text.
Thanks for checking!
I'm using https://github.com/lincheney/fzf-tab-completion . When pressed
ls<Tab>
, the ble.sh prints[ble: press RET to continue]
. I want to disable this prompt.