@@ -176,13 +176,13 @@ func setupAttachCmdFlags(attachCmd *cobra.Command) {
176176 Bool ("full-capture" , false , "Replay the entire raw capture buffer on attach instead of repainting the current screen" )
177177 _ = viper .BindPFlag (config .SB_ATTACH_FULL_CAPTURE .ViperKey , attachCmd .Flags ().Lookup ("full-capture" ))
178178 attachCmd .Flags ().
179- Bool ("clear-screen " , false , "Clear the terminal before repainting the session screen on attach (legacy behavior); the default paints below existing content. No effect with --full-capture, whose replay is raw history" )
180- _ = viper .BindPFlag (config .SB_ATTACH_CLEAR_SCREEN .ViperKey , attachCmd .Flags ().Lookup ("clear-screen " ))
179+ Bool ("clear-on-attach " , false , "Clear the terminal before repainting the session screen on attach (legacy behavior); the default paints below existing content. No effect with --full-capture, whose replay is raw history" )
180+ _ = viper .BindPFlag (config .SB_ATTACH_CLEAR_ON_ATTACH .ViperKey , attachCmd .Flags ().Lookup ("clear-on-attach " ))
181181 attachCmd .Flags ().
182- Bool ("clear-screen- on-detach" , false , "Erase the screen after detaching (^] twice or sb detach); the default leaves screen content untouched" )
182+ Bool ("clear-on-detach" , false , "Erase the screen after detaching (^] twice or sb detach); the default leaves screen content untouched" )
183183 _ = viper .BindPFlag (
184- config .SB_ATTACH_CLEAR_SCREEN_ON_DETACH .ViperKey ,
185- attachCmd .Flags ().Lookup ("clear-screen- on-detach" ),
184+ config .SB_ATTACH_CLEAR_ON_DETACH .ViperKey ,
185+ attachCmd .Flags ().Lookup ("clear-on-detach" ),
186186 )
187187}
188188
@@ -210,8 +210,8 @@ func run(
210210
211211 disableDetach := viper .GetBool (config .SB_ATTACH_DISABLE_DETACH_KEYSTROKE .ViperKey )
212212 fullCapture := viper .GetBool (config .SB_ATTACH_FULL_CAPTURE .ViperKey )
213- clearScreen := viper .GetBool (config .SB_ATTACH_CLEAR_SCREEN .ViperKey )
214- clearScreenOnDetach := viper .GetBool (config .SB_ATTACH_CLEAR_SCREEN_ON_DETACH .ViperKey )
213+ clearOnAttach := viper .GetBool (config .SB_ATTACH_CLEAR_ON_ATTACH .ViperKey )
214+ clearOnDetach := viper .GetBool (config .SB_ATTACH_CLEAR_ON_DETACH .ViperKey )
215215
216216 logger .DebugContext (
217217 ctx ,
@@ -222,10 +222,10 @@ func run(
222222 disableDetach ,
223223 "full_capture" ,
224224 fullCapture ,
225- "clear_screen " ,
226- clearScreen ,
227- "clear_screen_on_detach " ,
228- clearScreenOnDetach ,
225+ "clear_on_attach " ,
226+ clearOnAttach ,
227+ "clear_on_detach " ,
228+ clearOnDetach ,
229229 )
230230
231231 runErr := attach .Run (ctx , attach.Options {
@@ -235,8 +235,8 @@ func run(
235235 Stderr : os .Stderr ,
236236 DisableDetachKeystroke : disableDetach ,
237237 FullCapture : fullCapture ,
238- ClearScreen : clearScreen ,
239- ClearScreenOnDetach : clearScreenOnDetach ,
238+ ClearOnAttach : clearOnAttach ,
239+ ClearOnDetach : clearOnDetach ,
240240 Logger : logger ,
241241 })
242242 if runErr == nil || errors .Is (runErr , context .Canceled ) || errors .Is (runErr , errdefs .ErrContextDone ) {
0 commit comments