Skip to content

Latest commit

 

History

History
99 lines (56 loc) · 1.9 KB

utils.rst

File metadata and controls

99 lines (56 loc) · 1.9 KB

cmd2.utils

Settings

cmd2.utils.Settable

__init__

Quote Handling

cmd2.utils.is_quoted

cmd2.utils.quote_string

cmd2.utils.quote_string_if_needed

cmd2.utils.strip_quotes

cmd2.utils.quote_specific_tokens

cmd2.utils.unquote_specific_tokens

IO Handling

cmd2.utils.StdSim

cmd2.utils.ByteBuf

cmd2.utils.ProcReader

Tab Completion

cmd2.utils.CompletionMode

NONE

Tab completion will be disabled during read_input() call. Use of custom up-arrow history supported.

COMMANDS

read_input() will tab complete cmd2 commands and their arguments. cmd2's command line history will be used for up arrow if history is not provided. Otherwise use of custom up-arrow history supported.

CUSTOM

read_input() will tab complete based on one of its following parameters (choices, choices_provider, completer, parser). Use of custom up-arrow history supported

cmd2.utils.CustomCompletionSettings

__init__

Text Alignment

cmd2.utils.TextAlignment

cmd2.utils.align_text

cmd2.utils.align_left

cmd2.utils.align_right

cmd2.utils.align_center

cmd2.utils.truncate_line

Miscellaneous

cmd2.utils.str_to_bool

cmd2.utils.categorize

cmd2.utils.remove_duplicates

cmd2.utils.alphabetical_sort

cmd2.utils.natural_sort