Skip to content

Commit af83fdf

Browse files
committed
Updated basic_completion.py example to use MULTI_COLUMN style completion
1 parent 2bb52e2 commit af83fdf

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

examples/basic_completion.py

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,8 @@
1313

1414
import functools
1515

16+
from prompt_toolkit.shortcuts import CompleteStyle
17+
1618
import cmd2
1719

1820
# List of strings used with completion functions
@@ -30,8 +32,8 @@
3032

3133

3234
class BasicCompletion(cmd2.Cmd):
33-
def __init__(self, *args, **kwargs) -> None:
34-
super().__init__(*args, **kwargs)
35+
def __init__(self) -> None:
36+
super().__init__(complete_style=CompleteStyle.MULTI_COLUMN)
3537

3638
def do_flag_based(self, statement: cmd2.Statement) -> None:
3739
"""Tab completes arguments based on a preceding flag using flag_based_complete

0 commit comments

Comments
 (0)