Skip to content

__fish_complete_path does not behave like normal path completions would #9285

@ModProg

Description

@ModProg

I would expect:

complete -x -c my_app -a "(__fish_complete_path (commandline --current-token))"

and

complete -F -c my_app

To produce the same results, they differ strongly in capability, as __fish_complete_path does not support:

  • globbing i.e. completing src/*/fi to src/*/fish.rs
  • non prefix-substrings i.e. completing rc to src
  • multi layer path completions i.e. completing sr/sh/fi to src/shell/fish.rs

Obviously it doesn't make sense to use it as a replacement of -F, but I think it should be capable of returning the same matches as you e.g. might want to change the base dir for completions to start.

In case there are any concerns about it changing the way it functions, we could just have an option to enable this or a separate command.

Metadata

Metadata

Assignees

No one assigned

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions