Skip to content

Unexpected filename completion behavior with carapace #2035

Open
@lzybkr

Description

@lzybkr

Request

I'm using carapace on Windows with PowerShell, not sure if the issues I'm seeing are relevant elsewhere.

Filename completion works inconsistently when using carapace versus not.

Example:

notepad c:\winTab

Versus:

nvim c:\winTab

The former will complete to C:\Windows whereas the later doesn't complete anything.

Proposed solution

carapace should try to match the shell's native completion matching.

In general, if the completion is expecting a filename but the only valid matches are directories, carapace should complete directories.
On Windows, filenames are case insensitive so carapce should ignore case.

Maybe not the best option but for many commands like nvim where carapace may get in the way of returning useful results, just return nothing and let the default PowerShell completion fallback take over.

For other commands like git, this might not be a great option and result in an inconsistent experience, so I would at least consider trying to match the shell's behavior somewhat.

Anything else?

No response

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementNew feature or request

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions