Skip to content

Commit 588e1a9

Browse files
committed
fix: Actually use the new separator configuration
1 parent fc23ff4 commit 588e1a9

File tree

2 files changed

+11
-0
lines changed

2 files changed

+11
-0
lines changed

README.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -36,6 +36,14 @@ shortcuts:
3636

3737
You can use `/` to filter the list of instances. For more shortcuts, press `h`.
3838

39+
## Container name separator
40+
41+
CCManager tries to lookup CloudControl environments by the name of their typical containers. These names are
42+
usually in the form of <project><separator><service><separator><counter>.
43+
44+
The default separator is "-", but may be different in the container engine you're using. You can define the
45+
separator using the environment variable `CCMANAGER_SEP`.
46+
3947
## Development
4048

4149
CCmanager is based on [Go](https://go.dev),

cmd/ccmanager.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ import (
99
"github.com/alexflint/go-arg"
1010
"github.com/charmbracelet/bubbles/list"
1111
tea "github.com/charmbracelet/bubbletea"
12+
"github.com/docker/compose/v2/pkg/api"
1213
"os"
1314
)
1415

@@ -21,6 +22,8 @@ func main() {
2122

2223
var items []list.Item
2324

25+
api.Separator = args.ContainerSeparator
26+
2427
d := adapters.DockerAdapter{}
2528

2629
program := tea.NewProgram(models.NewMainModel(&d, args.BasePath, items))

0 commit comments

Comments
 (0)