8000 Completions not erasing with `complete -c <command> -e` · Issue #6716 · fish-shell/fish-shell · GitHub
[go: up one dir, main page]

Skip to content

Completions not erasing with complete -c <command> -e #6716

@donkopotamus

Description

@donkopotamus

I have been investigating a large slowdown in git completions in 3.1 on Windows (running under msys2), where completion times have ballooned out to between 3-10 seconds for some commands.

In doing so I have noticed that I seem unable to erase completion rules in a shell until they have actually been used. For example, in a fresh shell

$ sh -c 'env HOME=$(mktemp -d) fish'

Welcome to fish, the friendly interactive shell
Type `help` for instructions on how to use fish
$ fish --version
fish, version 3.1.0

# we think we are erasing the completion rules
$ complete -c git -e

# but this generates a tonne of completions (and is *very* slow)
$ complete -C"git checkout " | wc -l
1524

# try erasing again
$ complete -c git -e

# now it behaves as expected
$ complete -C"git checkout " | wc -l
56

I've observed the same behaviour, in terms of rules not being erased until having somehow been used, in 3.0.2 on RHEL7.5. This does not feel like "expected" behaviour.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0