@@ -42,21 +42,22 @@ type composeOptions struct {
42
42
43
43
type upOptions struct {
44
44
* composeOptions
45
- Detach bool
46
- noStart bool
47
- noDeps bool
48
- cascadeStop bool
49
- exitCodeFrom string
50
- noColor bool
51
- noPrefix bool
52
- attachDependencies bool
53
- attach []string
54
- noAttach []string
55
- timestamp bool
56
- wait bool
57
- waitTimeout int
58
- watch bool
59
- navigationMenu bool
45
+ Detach bool
46
+ noStart bool
47
+ noDeps bool
48
+ cascadeStop bool
49
+ exitCodeFrom string
50
+ noColor bool
51
+ noPrefix bool
52
+ attachDependencies bool
53
+ attach []string
54
+ noAttach []string
55
+ timestamp bool
56
+ wait bool
57
+ waitTimeout int
58
+ watch bool
59
+ navigationMenu bool
60
+ navigationMenuChanged bool
60
61
}
61
62
62
63
func (opts upOptions ) apply (project * types.Project , services []string ) (* types.Project , error ) {
@@ -88,6 +89,7 @@ func upCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service, ex
88
89
PreRunE : AdaptCmd (func (ctx context.Context , cmd * cobra.Command , args []string ) error {
89
90
create .pullChanged = cmd .Flags ().Changed ("pull" )
90
91
create .timeChanged = cmd .Flags ().Changed ("timeout" )
92
+ up .navigationMenuChanged = cmd .Flags ().Changed ("menu" )
91
93
return validateFlags (& up , & create )
92
94
}),
93
95
RunE : p .WithServices (dockerCli , func (ctx context.Context , project * types.Project , services []string ) error {
@@ -129,12 +131,8 @@ func upCommand(p *ProjectOptions, dockerCli command.Cli, backend api.Service, ex
129
131
flags .BoolVar (& up .wait , "wait" , false , "Wait for services to be running|healthy. Implies detached mode." )
130
132
flags .IntVar (& up .waitTimeout , "wait-timeout" , 0 , "Maximum duration to wait for the project to be running|healthy" )
131
133
flags .BoolVarP (& up .watch , "watch" , "w" , false , "Watch source code and rebuild/refresh containers when files are updated." )
132
- composeMenu := true
133
- composeMenuEnv , err := utils .GetEnvBool (ComposeMenu )
134
- if err != nil {
135
- composeMenu = composeMenuEnv
136
- }
137
- flags .BoolVar (& up .navigationMenu , "menu" , composeMenu , "While running in attach mode, enable helpful shortcuts." )
134
+ flags .BoolVar (& up .navigationMenu , "menu" , false , "Enable interactive shortcuts when running attached (Experimental). Incompatible with --detach." )
135
+ flags .MarkHidden ("menu" ) //nolint:errcheck
138
136
139
137
return upCmd
140
138
}
@@ -168,7 +166,7 @@ func runUp(
168
166
ctx context.Context ,
169
167
dockerCli command.Cli ,
170
168
backend api.Service ,
171
- _ * experimental.State ,
169
+ experimentals * experimental.State ,
172
170
createOptions createOptions ,
173
171
upOptions upOptions ,
174
172
buildOptions buildOptions ,
@@ -188,6 +186,9 @@ func runUp(
188
186
if err != nil {
189
187
return err
190
188
}
189
+ if ! upOptions .navigationMenuChanged {
190
+ upOptions .navigationMenu = SetUnchangedOption (ComposeMenu , experimentals .NavBar ())
191
+ }
191
192
192
193
var build * api.BuildOptions
193
194
if ! createOptions .noBuild {
0 commit comments