@@ -1332,7 +1332,21 @@ def allow_style_type(value: str) -> ru.AllowStyle:
13321332 )
13331333 self .add_settable (Settable ("debug" , bool , "Show full traceback on exception" , self ))
13341334 self .add_settable (Settable ("echo" , bool , "Echo command issued into output" , self ))
1335- self .add_settable (Settable ("editor" , str , "Program used by 'edit'" , self ))
1335+
1336+ editor_description = Text .assemble (
1337+ "Program used by " ,
1338+ ("'edit'" , Style (bold = True )),
1339+ " command" ,
1340+ )
1341+ self .add_settable (
1342+ Settable (
1343+ "editor" ,
1344+ str ,
1345+ ru .rich_text_to_string (editor_description ),
1346+ self ,
1347+ )
1348+ )
1349+
13361350 self .add_settable (
13371351 Settable (
13381352 "max_completion_table_items" ,
@@ -1354,6 +1368,20 @@ def allow_style_type(value: str) -> ru.AllowStyle:
13541368 self .add_settable (Settable ("timing" , bool , "Report execution times" , self ))
13551369 self .add_settable (Settable ("traceback_show_locals" , bool , "Display local variables in tracebacks" , self ))
13561370
1371+ traceback_width_description = Text .assemble (
1372+ "Maximum display width for tracebacks. Set to " ,
1373+ ("None" , Style (bold = True )),
1374+ " (case-insensitive) to fill entire terminal width." ,
1375+ )
1376+ self .add_settable (
1377+ Settable (
1378+ "traceback_width" ,
1379+ utils .optional_int ,
1380+ ru .rich_text_to_string (traceback_width_description ),
1381+ self ,
1382+ )
1383+ )
1384+
13571385 @property
13581386 def allow_style (self ) -> ru .AllowStyle :
13591387 """Property needed to support do_set when it reads allow_style."""
@@ -1380,6 +1408,22 @@ def traceback_show_locals(self, value: bool) -> None:
13801408 """Setter property needed to support do_set when it updates traceback_show_locals."""
13811409 self .traceback_kwargs ["show_locals" ] = value
13821410
1411+ @property
1412+ def traceback_width (self ) -> int | None :
1413+ """Property needed to support do_set when it reads traceback_width."""
1414+ if "width" in self .traceback_kwargs :
1415+ return cast (int | None , self .traceback_kwargs ["width" ])
1416+
1417+ # If setting is not present, then return its default value.
1418+ traceback_sig = inspect .signature (Traceback .__init__ )
1419+ width = traceback_sig .parameters ["width" ].default
1420+ return cast (int | None , width )
1421+
1422+ @traceback_width .setter
1423+ def traceback_width (self , value : int | None ) -> None :
1424+ """Setter property needed to support do_set when it updates traceback_width."""
1425+ self .traceback_kwargs ["width" ] = value
1426+
13831427 @property
13841428 def visible_prompt (self ) -> str :
13851429 """Read-only property to get the visible prompt with any ANSI style sequences stripped.
0 commit comments