Skip to content

Long lag when completing the command argument of ssh #926

Closed
@szsam

Description

@szsam

Describe the bug

There is a long lag (30 seconds) when completing the command argument of ssh.

To reproduce

Type 'ssh user@host ', then hit tab. The shell will freeze for 30 seconds.

Expected behavior

The completion should be fast. The 30-second lag is unacceptable.

Versions (please complete the following information)

  • Operating system name/distribution and version: Ubuntu 20.04.5, WSL2
  • bash version, echo "$BASH_VERSION": 5.0.17(1)-release
  • bash-completion version, (IFS=.; echo "${BASH_COMPLETION_VERSINFO[*]}"): 2.10

Additional context

It is the following line that takes 30 seconds, where cur is "". The output of the compgen -c -- '' command contains 10k+ lines on my system.

COMPREPLY+=($(compgen -c -- "$cur"))

Debug trace

bash_completion_log.txt

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions