Skip to content

gum choose --ordered not working anymore #687

@MrLuje

Description

@MrLuje

Describe the bug

gum choose --ordered used to work but not anymore

To Reproduce
Steps to reproduce the behavior:

  1. run the following script
#!/usr/bin/env bash

touch values.yaml
touch values-dev.yaml
touch values-dev-2.yaml

echo $(gum choose $(ls values*.yaml) --ordered --no-limit)
  1. result is always values-dev-2.yaml values-dev.yaml values.yaml whatever the order

Expected behavior
Per gum completion : "Maintain the order of the selected options"

Screenshots
If applicable, add screenshots to help explain your problem.

Desktop (please complete the following information):

  • OS: Windows WSL2
  • Version 0.14.5

Additional context
I looked at the source code, there is no reference anymore to Ordered flag, apart from its definition:

Ordered bool `help:"Maintain the order of the selected options" env:"GUM_CHOOSE_ORDERED"`

The code handling the order disappeared with this commit : 44906e2

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions