@@ -351,7 +351,7 @@ def __init__(
351351 :param include_py: should the "py" command be included for an embedded Python shell
352352 :param intro: introduction to display at startup
353353 :param max_column_completion_items: The maximum number of completion results to display in a single column,
354- used to provide the initial value for a settable with the same name.
354+ used to provide the initial value for a settable with the same name
355355 :param multiline_commands: list of commands allowed to accept multi-line input
356356 :param persistent_history_file: file path to load a persistent cmd2 command history from
357357 :param persistent_history_length: max number of history items to write
@@ -478,6 +478,7 @@ def _(event: Any) -> None: # pragma: no cover
478478 try :
479479 self .session : PromptSession [str ] = PromptSession (
480480 auto_suggest = self .auto_suggest ,
481+ bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
481482 complete_in_thread = True ,
482483 complete_style = complete_style ,
483484 complete_while_typing = False ,
@@ -492,6 +493,7 @@ def _(event: Any) -> None: # pragma: no cover
492493 # where isatty() is True but there is no real console.
493494 self .session = PromptSession (
494495 auto_suggest = self .auto_suggest ,
496+ bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
495497 complete_in_thread = True ,
496498 complete_style = complete_style ,
497499 complete_while_typing = False ,
@@ -3409,29 +3411,29 @@ def get_prompt() -> ANSI | str:
34093411 history_to_use .append_string (item )
34103412
34113413 temp_session1 : PromptSession [str ] = PromptSession (
3414+ complete_style = self .session .complete_style ,
3415+ complete_while_typing = self .session .complete_while_typing ,
34123416 history = history_to_use ,
34133417 input = self .session .input ,
3414- output = self .session .output ,
34153418 lexer = self .lexer ,
3416- complete_style = self .session .complete_style ,
3417- complete_while_typing = self .session .complete_while_typing ,
3419+ output = self .session .output ,
34183420 )
34193421
34203422 return temp_session1 .prompt (
34213423 prompt_to_use ,
3424+ bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
34223425 completer = completer_to_use ,
34233426 lexer = self .lexer ,
34243427 pre_run = self .pre_prompt ,
3425- bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
34263428 )
34273429
34283430 # history is None
34293431 return self .session .prompt (
34303432 prompt_to_use ,
3433+ bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
34313434 completer = completer_to_use ,
34323435 lexer = self .lexer ,
34333436 pre_run = self .pre_prompt ,
3434- bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
34353437 )
34363438
34373439 # Otherwise read from self.stdin
@@ -3446,24 +3448,24 @@ def get_prompt() -> ANSI | str:
34463448 )
34473449 line = temp_session2 .prompt (
34483450 prompt ,
3449- pre_run = self .pre_prompt ,
34503451 bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
3452+ pre_run = self .pre_prompt ,
34513453 )
34523454 if len (line ) == 0 :
34533455 raise EOFError
34543456 return line .rstrip ('\n ' )
34553457 else :
34563458 # not a tty, just read the line
34573459 temp_session3 : PromptSession [str ] = PromptSession (
3458- input = self .session .input ,
3459- output = self .session .output ,
3460- lexer = self .lexer ,
34613460 complete_style = self .session .complete_style ,
34623461 complete_while_typing = self .session .complete_while_typing ,
3462+ input = self .session .input ,
3463+ lexer = self .lexer ,
3464+ output = self .session .output ,
34633465 )
34643466 line = temp_session3 .prompt (
3465- pre_run = self .pre_prompt ,
34663467 bottom_toolbar = self .get_bottom_toolbar if self .bottom_toolbar else None ,
3468+ pre_run = self .pre_prompt ,
34673469 )
34683470 if len (line ) == 0 :
34693471 raise EOFError
0 commit comments