Skip to content

Missing dynamic completions for arguments containing shell expansions #6069

@krobelus

Description

@krobelus

Repro (using Jujutsu CLI, I can provide a minimal repro later):

$ bash
$ COMPLETE=bash jj __this-command-does-not-exist >? tmp.sh
$ . ./tmp.sh
$ jj --config-file ~/<Tab>

There are no completions. Same on jj --config-file $HOME/ etc.

Two options to resolve this:

  1. Don't compute any completions for AnyPath args but tell the shell to
    complete as if there were no custom completions. This is what Cobra does.
  2. Try to expand and unexpand shell syntax ourselves, so we can actually compute completions.

This is quite tricky.
I wonder if we want 1 as "temporary" measure.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions