Skip to content

Arch Linux: Interrupted Tab Completion Hangs the Shell #1487

Open
@SchrodingerZhu

Description

@SchrodingerZhu

This is an issue migrated from PowerShell/PowerShell#12475.

Steps to reproduce

On linux, type anything that may show the candidates list and then press tab and Ctrl-C

syst<tab>
🕙[ 10:22:44 ] λ systemctl
systemctl                       systemd-hwdb                    systemd-run
systemd-analyze                 systemd-id128                   systemd-socket-activate
systemd-ask-password            systemd-inhibit                 systemd-stdio-bridge
systemd-cat                     systemd-machine-id-setup        systemd-sysusers
systemd-cgls                    systemd-mount                   systemd-tmpfiles
systemd-cgtop                   systemd-notify                  systemd-tty-ask-password-agent
systemd-delta                   systemd-nspawn                  systemd-umount
systemd-detect-virt             systemd-path                    systemmonitor
systemd-escape                  systemd-repart                  systemsettings5
systemd-firstboot               systemd-resolve                 systool

/usr/bin/systemctl

Then the candidates list disappears (which is expected) but the whole shell hangs.

version

PowerShell 7.1.0-preview.1 and PowerShell 7.1.0-preview.2

profile

# Shows navigable menu of all options when hitting Tab 

Set-PSReadlineKeyHandler -Key Tab -Function MenuComplete

 # Autocompletion for arrow keys

Set-PSReadlineKeyHandler -Key UpArrow -Function HistorySearchBackward 
Set-PSReadlineKeyHandler -Key DownArrow -Function HistorySearchForward

Notice

Original issue mentioned about starship, but the problem can be reproduced without it, hence I removed descriptions about starship.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Area-StabilityLabel for tracking stability IssuesNeeds-Triage 🔍It's a new issue that core contributor team needs to triage.Not-Planned

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions