Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

When breaking out of choose --no-limit any selections are passed along #30

Closed
nbfritz opened this issue Jul 29, 2022 · 2 comments
Closed

Comments

@nbfritz
Copy link

nbfritz commented Jul 29, 2022

While writing up a helper to remove selected branches from git, I discovered that if you break out of a single-item choose list, gum returns nothing, but if you do break out of a multi-item choose, any selected options at the time the ctrl-c was received are returned.

Is this intentional? It was surprising, in that I was expecting to be able to cancel the action by breaking out and it instead proceed with the removal of my test branches.

gum choose <<EOF
Option A
Option B
Option C
EOF

CTRL-C returns nothing

gum choose <<EOF --no-limit
Option A
Option B
Option C
EOF

CTRL-C returns anything you might have selected before breaking.

@maaslalani
Copy link
Member

I think you're right, Ctrl+C should be a cancelation action 👍

@maaslalani
Copy link
Member

Fixed: c17387b

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants