* chore(deps): bump bubbletea to v2.0.10, drop the uncloud fork
v2.0.10 carries the upstream fix for terminal capability replies leaking into
the shell (charmbracelet/bubbletea#1801). It skips every query that expects a
reply when input is disabled: the startup probe for synchronized output and
Unicode core, clipboard reads, background, foreground and cursor colour
requests, cursor position reports, and terminal version and termcap queries.
That supersedes the unlabs-dev fork, whose patch covered only the startup
probe, so the replace directive goes away and uncloud tracks upstream again.
The bump on its own does not fix the leak. Bubble Tea skips the queries only
when a program declares that it has no input, and nothing in uncloud declares
that yet. Measured: this tree still leaks "^[[?2026;2$y^[[?2027;0$y" under a
PTY harness. The next commit is what makes the spinners declare it.
Refs: #286, charmbracelet/bubbletea#1801
* Allow for argument completion
This shows for a single command on how to complete service names in the
cluster: `uc inspect <TAB>` will complete using ListServices
See: #307
Signed-off-by: Miek Gieben <miek@miek.nl>
* All cluster interactions can be completed
Signed-off-by: Miek Gieben <miek@miek.nl>
* Machines -m flag completion
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add completion for "ctx use"
Signed-off-by: Miek Gieben <miek@miek.nl>
* Complete from compose file too
Signed-off-by: Miek Gieben <miek@miek.nl>
* Allow for argument completion
This shows for a single command on how to complete service names in the
cluster: `uc inspect <TAB>` will complete using ListServices
See: #307
Signed-off-by: Miek Gieben <miek@miek.nl>
* All cluster interactions can be completed
Signed-off-by: Miek Gieben <miek@miek.nl>
* Machines -m flag completion
Signed-off-by: Miek Gieben <miek@miek.nl>
* Add completion for "ctx use"
Signed-off-by: Miek Gieben <miek@miek.nl>
* Complete from compose file too
Signed-off-by: Miek Gieben <miek@miek.nl>
* Move to better place
Signed-off-by: Miek Gieben <miek@miek.nl>
* Adjust imports
Signed-off-by: Miek Gieben <miek@miek.nl>
* prefix match for context too
Signed-off-by: Miek Gieben <miek@miek.nl>
---------
Signed-off-by: Miek Gieben <miek@miek.nl>
This runs:
```
go run golang.org/x/tools/gopls/internal/analysis/modernize/cmd/modernize@latest -fix ./...
```
over the codebase, as this is using go 1.26, it can also use the new
new() functionallity so AsPtr and boolPtr is are needed anymore.
Signed-off-by: Miek Gieben <miek@miek.nl>
* fix: Store machine id on connection entries so it can be removed when machine is
* Add "GetContextOverrideOrCurrent" helper method to cli and use in `uc machine rm` to clean up connections
* Make `--context` flag a global option and remove duplication
* Remove unused dns showOptions struct
* First pass of refactoring "active context" determination and validation
* Undo some refactoring in cli.go to keep diff more focused
* feat: Interactive uc command to select preferred cluster connection
https://github.com/psviderski/uncloud/issues/125
* Simplify connection selection and reordering by using the index instead of a pointer
* Move connection reordering logic to a new SetDefaultConnection on context
* Add SSHCLIRemote type with buildSSHArgs
Implement's Executor interface (Run, Stream, Close)
* Add UseSSHCLI field to RemoteMachine struct
Allow us to differentiate regular ssh from ssh+cli.
* Parse ssh+cli:// scheme on machine init/add
* Support SSH CLI when provisioning
* Update docs to reflect ssh+cli:// support
* Revert removal of `init` examples
Fixes copy & pasta mistake when documenting the new ssh+cli connection
methods.