Skip to content

shell completion '-t' for extensions prompt #2195

@Freed-Wu

Description

@Freed-Wu

Now, the shell completion -t(e.g. zsh) is as following:

❯ rg -t<Tab>
file type
agda          cabal         csv           fidl          hbs           license       minified      po            robot         sv            typoscript    z
...

In the code, it truncate :* of the output of rg --type-list

❯ rg --type-list|head -n1
agda: *.agda, *.lagda

How about adding the extension information? Like this:

❯ rg -t<Tab>
file type
agda     *.agda,*.lagda
aidl     *.aidl
...

It should can be realized, because zsh use (agda aidl) to provide the completion without prompt information, and use (agda\:*.agda,*.lagda aidl\:*.aidl) to provide the completion with prompt information.

Metadata

Metadata

Assignees

No one assigned

    Labels

    enhancementAn enhancement to the functionality of the software.help wantedOthers are encouraged to work on this issue.rollupA PR that has been merged with many others in a rollup.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions