Skip to content

[DX] Shell completion is supported but not documented or wired up #23

@FZ2000

Description

@FZ2000

Problem

APC is built on Click, which has built-in shell completion support. However:

  1. There is no documentation about how to enable shell completions
  2. The pyproject.toml doesn't register a completion helper entry point
  3. New users are left tab-completing blindly

This is a significant DX gap for a CLI tool intended to be used daily.

Suggested Fix

Document shell completion setup in the README (under Installation or a new section):

# Bash
echo 'eval "$(_APC_COMPLETE=bash_source apc)"' >> ~/.bashrc

# Zsh
echo 'eval "$(_APC_COMPLETE=zsh_source apc)"' >> ~/.zshrc

# Fish
_APC_COMPLETE=fish_source apc > ~/.config/fish/completions/apc.fish

Consider also adding a apc completion subcommand that prints the appropriate completion script based on the detected shell:

apc completion --shell bash >> ~/.bashrc
apc completion --shell zsh >> ~/.zshrc

Reference: https://click.palletsprojects.com/en/stable/shell-completion/

Metadata

Metadata

Assignees

No one assigned

    Labels

    documentationImprovements or additions to documentation

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions