Skip to content

Argument completion in bash doesn't work for aliases with arguments #5377

@DemvSteinbrink

Description

@DemvSteinbrink

Description

For aliases, the bash completion is broken. It only completes one element and it's always completed to the first argument in the alias.

Steps to Reproduce the Problem

  1. Create an alias gp = ["git", "push"]
  2. source <(COMPLETE=bash jj)
  3. Type jj gp and then hit <Tab>

Expected Behavior

Completion behaves the same as if I had typed jj git push, i.e. it would add -- to my prompt.

Actual Behavior

The completion adds push to my prompt. It even replaces partial input with push, i.e. jj gp --he + <Tab> becomes jj gp push.

Specifications

  • Platform: Linux Debian Sid
  • Version: jj 0.25.0-041c4fecb77434dd6720e7d7f1ce48d9575ac5f7

Metadata

Metadata

Assignees

No one assigned

    Labels

    🐛bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions