Skip to content

Add the ability to selectively enable/disable autocompletion for specific commands through whitelist/blacklist configuration. #776

@palemoky

Description

@palemoky

What do you want?

Add whitelist/blacklist mode for command completion to selectively enable/disable autocompletion for specific commands.

Why do you want this?

When using zsh-autocomplete, there are scenarios where autocompletion is not always desired for every command. For example, I want to disable autocompletion for simple commands like ls where suggestions are not necessary, while keeping it enabled for commands like curl where autocompletion is helpful for complex URLs and options.

Who else would benefit from this?

  • Power users who want to optimize their shell experience by reducing unnecessary completions
  • Users with specific workflows who want to customize completion behavior per command
  • Users on slower systems who want to improve performance by limiting autocompletion to only necessary commands
  • Users who find certain command completions distracting but want to keep others

How should it work?

Given the following situation:

  • User has zsh-autocomplete installed and working
  • User wants to customize which commands should trigger autocompletion
  • User prefers a simple configuration syntax in their .zshrc file
# Example configuration
zsh_autocomplete_whitelist=(curl git docker kubectl)
# OR
zsh_autocomplete_blacklist=(ls cd pwd)

When I perform the following steps:

  1. Add configuration to .zshrc to specify completion preferences for commands
  2. Use commands in terminal that are either whitelisted or blacklisted
  3. Type command arguments that would normally trigger completion

Then I expect the following to happen:

  • Commands in whitelist mode: only specified commands should trigger autocompletion
  • Commands in blacklist mode: all commands except specified ones should trigger autocompletion
  • Configuration should be easily toggleable through a single variable in .zshrc
  • Changes should take effect immediately after source .zshrc without requiring plugin reload
  • Completion behavior should be consistent and predictable based on the configuration

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions