lincheney / fzf-tab-completion

Tab completion using fzf
GNU General Public License v3.0
623 stars 40 forks source link

Feature: Add support for "no_empty_cmd_completion" #88

Closed systemmonkey42 closed 5 months ago

systemmonkey42 commented 7 months ago

The function fzf_bash_completion() should honor the bash/readline setting no_empty_cmd_completion

for example

fzf_bash_completion() {
    if [[ -z "${READLINE_LINE}" ]] && shopt -q no_empty_cmd_completion; then
        return 1
    fi
    ...

This helps prevent tab on an empty line triggering completion of every command in the path. (which for me can take up to 15 seconds)

(Pressing at least one letter then tab will still complete commands.)

lincheney commented 5 months ago

implemented in 4dbb200c3cd448eb71b7ef9b275a9d84726a5063