Skip to content

Disable "automatic auto-complete" for some commands #572

@L30Bola

Description

@L30Bola
[leonardo.godoy@(⎈|N/A:N/A) 10:07:22 ~]:$ ble summary
GNU bash, version 5.2.37(1)-release (aarch64-apple-darwin24.2.0)
ble.sh, version 0.4.0-devel4+d4c812b (noarch) [git 2.49.0, GNU Make 4.4.1, GNU Awk 5.3.1, API 4.0, (GNU MPFR 4.2.2, GNU MP 6.3.0)]
bash-completion, version 2.16.0 (hash:480ffcc6a751e55621ec526eb5dea7a0d86d9e72, 17877 bytes) (noarch)
fzf key-bindings, (hash:8b0ef76c65a55e74cde19e726bf076349e680fe3, 5635 bytes) (noarch) (integration: on)
fzf completion, (hash:48f1a547dc867990b3765881ce374575acd8c9d6, 18422 bytes) (noarch) (integration: on)
bash-preexec (.iterm2_shell_integration.bash), (hash:dca112d748a6adb32dd0b33e831db6cf86f536a0, 24692 bytes) (noarch)
atuin, version 18.4.0 (/opt/homebrew/bin/atuin)
locale: LC_COLLATE=en_US.UTF-8 LANG=en_US.UTF-8 LC_ADDRESS=en_US.UTF-8 LC_CTYPE=en_US.UTF-8 LC_IDENTIFICATION=en_US.UTF-8 LC_MEASUREMENT=pt_BR.UTF-8 LC_MESSAGES=en_US.UTF-8 LC_MONETARY=pt_BR.UTF-8 LC_NAME=en_US.UTF-8 LC_NUMERIC=en_US.UTF-8 LC_PAPER=pt_BR.UTF-8 LC_TELEPHONE=en_US.UTF-8 LC_TERMINAL=iTerm2 LC_TERMINAL_VERSION=3.5.12 LC_TIME=en_US.UTF-8
terminal: TERM=xterm-256color wcwidth=15.0-west/16.0-2+ri, xterm:2500 (64;2500;0)
options: +extglob +histappend -hostcomplete +histverify +inherit_errexit +login_shell

Is there a way to disable auto-complete feature but only for specified commands? Like, I love that feature, but I would like, if possible, to disable its automatic execution for commands like kubectl. I'm usually managing multiple Kubernetes clusters that are available on different regions around the world. The problem is that when my kubectl context is on a faraway cluster (for example, on Asia; I live in Brazil), it will try to auto-complete but kubectl auto-completion actually make requests to the current-context cluster. Since that is a "hanging operation", my shell "gets stuck" for 400-600ms (sometimes more) until the whole request is finished. It can be kinda boring to wait (and it's awkward when I'm pairing/sharing screen with someone, haha).

Metadata

Metadata

Assignees

No one assigned

    Labels

    duplicateDuplicate / Already fixedquestionQuestion / Mis-usage

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions