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

Allow auto-select for stackID when only finding one stack #265

Merged
merged 2 commits into from
Oct 8, 2024

Conversation

tomasmik
Copy link
Contributor

@tomasmik tomasmik commented Sep 27, 2024

➜  empty git:(diff) ✗ /Users/tomas/spacelift-io/spacectl/build/aa stack show
Enable auto-selection by setting SPACECTL_SKIP_STACK_PROMPT=true
Use the arrow keys to navigate: ↓ ↑ → ←  and / toggles search
? Found 1 stacks, select one:
  ▸ doublestack
2024/09/27 14:49:35 ^C
➜  empty git:(diff) ✗ SPACECTL_SKIP_STACK_PROMPT=true
➜  empty git:(diff) ✗ /Users/tomas/spacelift-io/spacectl/build/aa stack show

Provider   | GitHub
Repository | empty
Branch     | master

closes: #259

```
➜  empty git:(diff) ✗ /Users/tomas/spacelift-io/spacectl/build/aa stack show
Enable auto-selection by setting SPACECTL_SKIP_STACK_PROMPT=true
Use the arrow keys to navigate: ↓ ↑ → ←  and / toggles search
? Found 1 stacks, select one:
  ▸ doublestack
2024/09/27 14:49:35 ^C
➜  empty git:(diff) ✗ SPACECTL_SKIP_STACK_PROMPT=true
➜  empty git:(diff) ✗ /Users/tomas/spacelift-io/spacectl/build/aa stack show

Provider   | GitHub
Repository | empty
Branch     | master
```
internal/cmd/stack/stack_selector.go Outdated Show resolved Hide resolved
internal/cmd/stack/stack_selector.go Outdated Show resolved Hide resolved
internal/cmd/stack/stack_selector.go Outdated Show resolved Hide resolved
@tomasmik tomasmik merged commit 48da190 into main Oct 8, 2024
9 checks passed
@tomasmik tomasmik deleted the auto-select branch October 8, 2024 08:20
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

Successfully merging this pull request may close these issues.

Don't select stack with commands, if there is only one stack
3 participants