summaryrefslogtreecommitdiff
path: root/cmd2/cmd2.py
diff options
context:
space:
mode:
authorKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-06 13:22:41 -0400
committerKevin Van Brunt <kmvanbrunt@gmail.com>2019-07-06 13:22:41 -0400
commit53f6c07559f2c15656423dbbb92471758e8c6d20 (patch)
tree6066617c2d692ab386ad9b4a4f3206875a4a257a /cmd2/cmd2.py
parent67445d49af8db72f9e27a8d47449d0b5ed1e6b9c (diff)
downloadcmd2-git-53f6c07559f2c15656423dbbb92471758e8c6d20.tar.gz
Added ability to limit how many CompletionItems display at a time
Diffstat (limited to 'cmd2/cmd2.py')
-rw-r--r--cmd2/cmd2.py5
1 files changed, 5 insertions, 0 deletions
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index 46d996ea..e6d4ae47 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -468,6 +468,11 @@ class Cmd(cmd.Cmd):
# Otherwise it can be set to any custom key to meet your needs.
self.matches_sort_key = ALPHABETICAL_SORT_KEY
+ # The maximum number of CompletionItems to display during tab completion. If the number of possible
+ # completions exceeds this number, suggestions will be displayed in the typical columnized format and
+ # will not include the description value of the CompletionItems.
+ self.max_completion_items = 50
+
############################################################################################################
# The following variables are used by tab-completion functions. They are reset each time complete() is run
# in reset_completion_defaults() and it is up to completer functions to set them before returning results.