From 588e1a9c54ddbe79aa60ad66ce0acc47690c4710 Mon Sep 17 00:00:00 2001 From: Dennis Ploeger Date: Fri, 16 May 2025 08:00:26 +0200 Subject: [PATCH] fix: Actually use the new separator configuration --- README.md | 8 ++++++++ cmd/ccmanager.go | 3 +++ 2 files changed, 11 insertions(+) diff --git a/README.md b/README.md index fea48e3..d0bcdee 100644 --- a/README.md +++ b/README.md @@ -36,6 +36,14 @@ shortcuts: You can use `/` to filter the list of instances. For more shortcuts, press `h`. +## Container name separator + +CCManager tries to lookup CloudControl environments by the name of their typical containers. These names are +usually in the form of . + +The default separator is "-", but may be different in the container engine you're using. You can define the +separator using the environment variable `CCMANAGER_SEP`. + ## Development CCmanager is based on [Go](https://go.dev), diff --git a/cmd/ccmanager.go b/cmd/ccmanager.go index 4a32644..d76cce9 100644 --- a/cmd/ccmanager.go +++ b/cmd/ccmanager.go @@ -9,6 +9,7 @@ import ( "github.com/alexflint/go-arg" "github.com/charmbracelet/bubbles/list" tea "github.com/charmbracelet/bubbletea" + "github.com/docker/compose/v2/pkg/api" "os" ) @@ -21,6 +22,8 @@ func main() { var items []list.Item + api.Separator = args.ContainerSeparator + d := adapters.DockerAdapter{} program := tea.NewProgram(models.NewMainModel(&d, args.BasePath, items))