Skip to content

Add shell completion (zsh) #1992

Open
Open
@blueyed

Description

@blueyed

Should we include/ship shell completion with pytest, e.g. in a contrib folder?

I have something for Zsh: https://github.com/zsh-users/zsh-completions/pull/454/files.

Added to my dotfiles: blueyed/oh-my-zsh@fd89b19 (2020-03-01)

Activity

added
type: enhancementnew feature or API change, should be merged into features branch
type: questiongeneral question, might be closed after 2 weeks of inactivity
on Oct 8, 2016
RonnyPfannschmidt

RonnyPfannschmidt commented on Oct 8, 2016

@RonnyPfannschmidt
Member

pytest already supports the argcomplete protocol

blueyed

blueyed commented on Oct 8, 2016

@blueyed
ContributorAuthor

Thanks!
I came across that before, but for zsh it requires bashcompinit (a wrapper to enable bash completions), and the completion itself is slow (it seems to be not cached at all), and does not support completing (c)tags after -k, which was my initial motivation to create a completion script for pytest, since this easily allows to complete test functions.

RonnyPfannschmidt

RonnyPfannschmidt commented on Oct 9, 2016

@RonnyPfannschmidt
Member

i see what you mean, i wonder if that can be done in a multi shell fashion

removed
type: questiongeneral question, might be closed after 2 weeks of inactivity
on Jan 23, 2018
changed the title [-]Add shell completion[/-] [+]Add shell completion (zsh)[/+] on Mar 1, 2020
Freed-Wu

Freed-Wu commented on Sep 17, 2022

@Freed-Wu

How about shtab? It is faster than argcomplete and pyzshcomplete. And it supports more shells.

7 remaining items

Loading
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    plugin: argcompleterelated to the argcomplete builtin plugintype: enhancementnew feature or API change, should be merged into features branch

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

      Development

      No branches or pull requests

        Participants

        @blueyed@RonnyPfannschmidt@The-Compiler@nicoddemus@Freed-Wu

        Issue actions

          Add shell completion (zsh) · Issue #1992 · pytest-dev/pytest