diff --git a/CHANGELOG.md b/CHANGELOG.md
index 2e3a64c8..615e282d 100644
--- a/CHANGELOG.md
+++ b/CHANGELOG.md
@@ -19,6 +19,12 @@
     * Made optional arguments on the following completer methods keyword-only:
     `delimiter_complete`, `flag_based_complete`, `index_based_complete`. `path_complete`, `shell_cmd_complete`
     * Renamed history option from `--output-file` to `--output_file`
+    * Renamed `matches_sort_key` to `default_sort_key`. This value determines the default sort ordering of string
+    results like alias, command, category, macro, settable, and shortcut names. Unsorted tab-completion results
+    also are sorted with this key. Its default value (ALPHABETICAL_SORT_KEY) performs a case-insensitive alphabetical
+    sort, but it can be changed to a natural sort by setting the value to NATURAL_SORT_KEY.
+    * `StatementParser` now expects shortcuts to be passed in as dictionary. This eliminates the step of converting the
+    shortcuts dictionary into a tuple before creating `StatementParser`.
 
 ## 0.9.14 (June 29, 2019)
 * Enhancements
diff --git a/cmd2/argparse_completer.py b/cmd2/argparse_completer.py
index 737286c1..95ccf7b4 100644
--- a/cmd2/argparse_completer.py
+++ b/cmd2/argparse_completer.py
@@ -391,7 +391,7 @@ class AutoCompleter(object):
 
             # If the user has not already sorted the CompletionItems, then sort them before appending the descriptions
             if not self._cmd2_app.matches_sorted:
-                completions.sort(key=self._cmd2_app.matches_sort_key)
+                completions.sort(key=self._cmd2_app.default_sort_key)
                 self._cmd2_app.matches_sorted = True
 
             token_width = ansi_safe_wcswidth(action.dest)
diff --git a/cmd2/argparse_custom.py b/cmd2/argparse_custom.py
index 1cdb7840..5d8e76ef 100644
--- a/cmd2/argparse_custom.py
+++ b/cmd2/argparse_custom.py
@@ -74,7 +74,7 @@ Tab Completion:
     completer_method
         This is exactly like completer_function, but the function needs to be an instance method of a cmd2-based class.
         When AutoCompleter calls the method, it will pass the app instance as the self argument. cmd2 provides
-        a few completer methods for convenience (e.g. path_complete, delimiter_complete)
+        a few completer methods for convenience (e.g., path_complete, delimiter_complete)
 
         Example:
             This adds file-path completion to an argument
diff --git a/cmd2/cmd2.py b/cmd2/cmd2.py
index f094a9d7..0255d1ce 100644
--- a/cmd2/cmd2.py
+++ b/cmd2/cmd2.py
@@ -397,9 +397,6 @@ class Cmd(cmd.Cmd):
         self._py_history = []
         self.pyscript_name = 'app'
 
-        if shortcuts is None:
-            shortcuts = constants.DEFAULT_SHORTCUTS
-        shortcuts = sorted(shortcuts.items(), reverse=True)
         self.statement_parser = StatementParser(allow_redirection=allow_redirection,
                                                 terminators=terminators,
                                                 multiline_commands=multiline_commands,
@@ -468,11 +465,13 @@ class Cmd(cmd.Cmd):
         elif transcript_files:
             self._transcript_files = transcript_files
 
-        # The default key for sorting tab completion matches. This only applies when the matches are not
-        # already marked as sorted by setting self.matches_sorted to True. Its default value performs a
-        # case-insensitive alphabetical sort. If natural sorting preferred, then set this to NATURAL_SORT_KEY.
-        # Otherwise it can be set to any custom key to meet your needs.
-        self.matches_sort_key = ALPHABETICAL_SORT_KEY
+        # The default key for sorting string results. Its default value performs a case-insensitive alphabetical sort.
+        # If natural sorting is preferred, then set this to NATURAL_SORT_KEY.
+        # cmd2 uses this key for sorting:
+        #     command and category names
+        #     alias, macro, settable, and shortcut names
+        #     tab completion results when self.matches_sorted is False
+        self.default_sort_key = ALPHABETICAL_SORT_KEY
 
         ############################################################################################################
         # The following variables are used by tab-completion functions. They are reset each time complete() is run
@@ -501,8 +500,8 @@ class Cmd(cmd.Cmd):
         # quote matches that are completed in a delimited fashion
         self.matches_delimited = False
 
-        # Set to True before returning matches to complete() in cases where matches are sorted with custom ordering.
-        # If False, then complete() will sort the matches using self.matches_sort_key before they are displayed.
+        # Set to True before returning matches to complete() in cases where matches have already been sorted.
+        # If False, then complete() will sort the matches using self.default_sort_key before they are displayed.
         self.matches_sorted = False
 
         # Set the pager(s) for use with the ppaged() method for displaying output using a pager
@@ -1107,7 +1106,7 @@ class Cmd(cmd.Cmd):
             self.allow_closing_quote = False
 
         # Sort the matches before any trailing slashes are added
-        matches.sort(key=self.matches_sort_key)
+        matches.sort(key=self.default_sort_key)
         self.matches_sorted = True
 
         # Build display_matches and add a slash to directories
@@ -1553,8 +1552,8 @@ class Cmd(cmd.Cmd):
 
             # Sort matches if they haven't already been sorted
             if not self.matches_sorted:
-                self.completion_matches.sort(key=self.matches_sort_key)
-                self.display_matches.sort(key=self.matches_sort_key)
+                self.completion_matches.sort(key=self.default_sort_key)
+                self.display_matches.sort(key=self.default_sort_key)
                 self.matches_sorted = True
 
         try:
@@ -2326,8 +2325,7 @@ class Cmd(cmd.Cmd):
                 else:
                     self.perror("Alias '{}' not found".format(cur_name))
         else:
-            sorted_aliases = utils.alphabetical_sort(self.aliases)
-            for cur_alias in sorted_aliases:
+            for cur_alias in sorted(self.aliases, key=self.default_sort_key):
                 self.poutput("alias create {} {}".format(cur_alias, self.aliases[cur_alias]))
 
     # Top-level parser for alias
@@ -2507,8 +2505,7 @@ class Cmd(cmd.Cmd):
                 else:
                     self.perror("Macro '{}' not found".format(cur_name))
         else:
-            sorted_macros = utils.alphabetical_sort(self.macros)
-            for cur_macro in sorted_macros:
+            for cur_macro in sorted(self.macros, key=self.default_sort_key):
                 self.poutput("macro create {} {}".format(cur_macro, self.macros[cur_macro].value))
 
     # Top-level parser for macro
@@ -2692,10 +2689,10 @@ class Cmd(cmd.Cmd):
         """Show a list of commands which help can be displayed for.
         """
         # Get a sorted list of help topics
-        help_topics = utils.alphabetical_sort(self.get_help_topics())
+        help_topics = sorted(self.get_help_topics(), key=self.default_sort_key)
 
         # Get a sorted list of visible command names
-        visible_commands = utils.alphabetical_sort(self.get_visible_commands())
+        visible_commands = sorted(self.get_visible_commands(), key=self.default_sort_key)
 
         cmds_doc = []
         cmds_undoc = []
@@ -2730,7 +2727,7 @@ class Cmd(cmd.Cmd):
             # Categories found, Organize all commands by category
             self.poutput('{}'.format(str(self.doc_leader)))
             self.poutput('{}'.format(str(self.doc_header)), end="\n\n")
-            for category in sorted(cmds_cats.keys()):
+            for category in sorted(cmds_cats.keys(), key=self.default_sort_key):
                 self._print_topics(category, cmds_cats[category], verbose)
             self._print_topics('Other', cmds_doc, verbose)
 
@@ -2816,7 +2813,9 @@ class Cmd(cmd.Cmd):
     @with_argparser(ArgParser())
     def do_shortcuts(self, _: argparse.Namespace) -> None:
         """List available shortcuts"""
-        result = "\n".join('%s: %s' % (sc[0], sc[1]) for sc in sorted(self.statement_parser.shortcuts))
+        # Sort the shortcut tuples by name
+        sorted_shortcuts = sorted(self.statement_parser.shortcuts, key=lambda x: self.default_sort_key(x[0]))
+        result = "\n".join('{}: {}'.format(sc[0], sc[1]) for sc in sorted_shortcuts)
         self.poutput("Shortcuts for other commands:\n{}".format(result))
 
     @with_argparser(ArgParser(epilog=INTERNAL_COMMAND_EPILOG))
@@ -2903,7 +2902,7 @@ class Cmd(cmd.Cmd):
                 maxlen = max(maxlen, len(result[p]))
 
         if result:
-            for p in sorted(result):
+            for p in sorted(result, key=self.default_sort_key):
                 if args.long:
                     self.poutput('{} # {}'.format(result[p].ljust(maxlen), self.settable[p]))
                 else:
diff --git a/cmd2/parsing.py b/cmd2/parsing.py
index 2e94516a..dbfabc80 100644
--- a/cmd2/parsing.py
+++ b/cmd2/parsing.py
@@ -249,7 +249,7 @@ class StatementParser:
                  terminators: Optional[Iterable[str]] = None,
                  multiline_commands: Optional[Iterable[str]] = None,
                  aliases: Optional[Dict[str, str]] = None,
-                 shortcuts: Optional[Iterable[Tuple[str, str]]] = None) -> None:
+                 shortcuts: Optional[Dict[str, str]] = None) -> None:
         """Initialize an instance of StatementParser.
 
         The following will get converted to an immutable tuple before storing internally:
@@ -261,7 +261,7 @@ class StatementParser:
         :param terminators: iterable containing strings which should terminate multiline commands
         :param multiline_commands: iterable containing the names of commands that accept multiline input
         :param aliases: dictionary containing aliases
-        :param shortcuts: an iterable of tuples with each tuple containing the shortcut and the expansion
+        :param shortcuts: dictionary containing shortcuts
         """
         self.allow_redirection = allow_redirection
         if terminators is None:
@@ -276,10 +276,13 @@ class StatementParser:
             self.aliases = dict()
         else:
             self.aliases = aliases
+
         if shortcuts is None:
-            self.shortcuts = tuple()
-        else:
-            self.shortcuts = tuple(shortcuts)
+            shortcuts = constants.DEFAULT_SHORTCUTS
+
+        # Sort the shortcuts in descending order by name length because the longest match
+        # should take precedence. (e.g., @@file should match '@@' and not '@'.
+        self.shortcuts = tuple(sorted(shortcuts.items(), key=lambda x: len(x[0]), reverse=True))
 
         # commands have to be a word, so make a regular expression
         # that matches the first word in the line. This regex has three

diff --git a/tests/test_argparse_completer.py b/tests/test_argparse_completer.py
index 4ad4c560..19ec551b 100644
--- a/tests/test_argparse_completer.py
+++ b/tests/test_argparse_completer.py
@@ -263,7 +263,7 @@ def test_complete_help(ac_app, command, text, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 @pytest.mark.parametrize('command_and_args, text, completions', [
@@ -320,7 +320,7 @@ def test_autcomp_flag_completion(ac_app, command_and_args, text, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 @pytest.mark.parametrize('flag, text, completions', [
@@ -346,7 +346,7 @@ def test_autocomp_flag_choices_completion(ac_app, flag, text, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 @pytest.mark.parametrize('pos, text, completions', [
@@ -369,7 +369,7 @@ def test_autocomp_positional_choices_completion(ac_app, pos, text, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 @pytest.mark.parametrize('flag, text, completions', [
@@ -389,7 +389,7 @@ def test_autocomp_flag_completers(ac_app, flag, text, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 @pytest.mark.parametrize('pos, text, completions', [
@@ -410,7 +410,7 @@ def test_autocomp_positional_completers(ac_app, pos, text, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 def test_autocomp_blank_token(ac_app):
@@ -548,7 +548,7 @@ def test_autcomp_nargs(ac_app, args, completions):
     else:
         assert first_match is None
 
-    assert ac_app.completion_matches == sorted(completions, key=ac_app.matches_sort_key)
+    assert ac_app.completion_matches == sorted(completions, key=ac_app.default_sort_key)
 
 
 @pytest.mark.parametrize('command_and_args, text, is_error', [
diff --git a/tests/test_completion.py b/tests/test_completion.py
index 1411cc49..3cee1955 100644
--- a/tests/test_completion.py
+++ b/tests/test_completion.py
@@ -174,20 +174,20 @@ def test_complete_macro(base_app, request):
     assert first_match is not None and base_app.completion_matches == expected
 
 
-def test_matches_sort_key(cmd2_app):
+def test_default_sort_key(cmd2_app):
     text = ''
     line = 'test_sort_key {}'.format(text)
     endidx = len(line)
     begidx = endidx - len(text)
 
     # First do alphabetical sorting
-    cmd2_app.matches_sort_key = cmd2.cmd2.ALPHABETICAL_SORT_KEY
+    cmd2_app.default_sort_key = cmd2.cmd2.ALPHABETICAL_SORT_KEY
     expected = ['1', '11', '2']
     first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
     assert first_match is not None and cmd2_app.completion_matches == expected
 
     # Now switch to natural sorting
-    cmd2_app.matches_sort_key = cmd2.cmd2.NATURAL_SORT_KEY
+    cmd2_app.default_sort_key = cmd2.cmd2.NATURAL_SORT_KEY
     expected = ['1', '2', '11']
     first_match = complete_tester(text, line, begidx, endidx, cmd2_app)
     assert first_match is not None and cmd2_app.completion_matches == expected
diff --git a/tests/test_history.py b/tests/test_history.py
index add93ea6..88f38172 100644
--- a/tests/test_history.py
+++ b/tests/test_history.py
@@ -276,7 +276,7 @@ def parser():
                  'l': '!ls -al',
                  'anothermultiline': 'multiline',
                  'fake': 'run_pyscript'},
-        shortcuts=[('?', 'help'), ('!', 'shell')]
+        shortcuts={'?': 'help', '!': 'shell'}
     )
     return parser
 
diff --git a/tests/test_parsing.py b/tests/test_parsing.py
index 13a535c0..a629d9fa 100644
--- a/tests/test_parsing.py
+++ b/tests/test_parsing.py
@@ -21,7 +21,7 @@ def parser():
                  'l': '!ls -al',
                  'anothermultiline': 'multiline',
                  'fake': 'run_pyscript'},
-        shortcuts=[('?', 'help'), ('!', 'shell')]
+        shortcuts={'?': 'help', '!': 'shell'}
     )
     return parser
 

Change `matches_sort_key` to `default_sort_key`
Currently `matches_sort_key` only applies to the default order in which tab completions are sorted. Consider renaming it to `default_sort_key` and have it apply to how all strings are sorted when displayed. This would affect:
- command names in **help** output
- category ordering
- alias and macro lists
- settable value lists
tests/test_argparse_completer.py::test_complete_help[-mu-completions0] tests/test_argparse_completer.py::test_complete_help[music-cre-completions1] tests/test_argparse_completer.py::test_complete_help[music tests/test_argparse_completer.py::test_autcomp_flag_completion[flag---completions0] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag----completions1] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag--n-completions2] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag---n-completions3] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag tests/test_argparse_completer.py::test_autcomp_flag_completion[flag--r-completions5] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag---r-completions6] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag--s-completions9] tests/test_argparse_completer.py::test_autcomp_flag_completion[flag---s-completions10] tests/test_argparse_completer.py::test_autcomp_flag_completion[plus_flag-+-completions13] tests/test_argparse_completer.py::test_autcomp_flag_completion[plus_flag-++-completions14] tests/test_argparse_completer.py::test_autcomp_flag_completion[plus_flag tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[-l--completions0] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[--list-s-completions1] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[-f--completions2] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[--function-ch-completions3] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[-m--completions4] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[--method-m-completions5] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[-i--completions6] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[--int-1-completions7] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[--int---completions8] tests/test_argparse_completer.py::test_autocomp_flag_choices_completion[--int--1-completions9] tests/test_argparse_completer.py::test_autocomp_positional_choices_completion[1--completions0] tests/test_argparse_completer.py::test_autocomp_positional_choices_completion[1-s-completions1] tests/test_argparse_completer.py::test_autocomp_positional_choices_completion[2--completions2] tests/test_argparse_completer.py::test_autocomp_positional_choices_completion[2-ch-completions3] tests/test_argparse_completer.py::test_autocomp_positional_choices_completion[3--completions4] tests/test_argparse_completer.py::test_autocomp_positional_choices_completion[3-m-completions5] tests/test_argparse_completer.py::test_autocomp_flag_completers[-f--completions0] tests/test_argparse_completer.py::test_autocomp_flag_completers[--function-f-completions1] tests/test_argparse_completer.py::test_autocomp_flag_completers[-m--completions2] tests/test_argparse_completer.py::test_autocomp_flag_completers[--method-m-completions3] tests/test_argparse_completer.py::test_autocomp_positional_completers[1--completions0] tests/test_argparse_completer.py::test_autocomp_positional_completers[1-c-completions1] tests/test_argparse_completer.py::test_autocomp_positional_completers[2--completions2] tests/test_argparse_completer.py::test_autocomp_positional_completers[2-m-completions3] tests/test_argparse_completer.py::test_autcomp_nargs[--set_value-completions0] tests/test_argparse_completer.py::test_autcomp_nargs[--set_value tests/test_argparse_completer.py::test_autcomp_nargs[--one_or_more-completions4] tests/test_argparse_completer.py::test_autcomp_nargs[--one_or_more tests/test_argparse_completer.py::test_autcomp_nargs[--optional-completions6] tests/test_argparse_completer.py::test_autcomp_nargs[--optional tests/test_argparse_completer.py::test_autcomp_nargs[--range-completions8] tests/test_argparse_completer.py::test_autcomp_nargs[--range tests/test_argparse_completer.py::test_autcomp_nargs[--remainder-completions11] tests/test_argparse_completer.py::test_autcomp_nargs[--remainder tests/test_argparse_completer.py::test_autcomp_nargs[-- tests/test_argparse_completer.py::test_autcomp_nargs[-completions17] tests/test_argparse_completer.py::test_autcomp_nargs[positional-completions18] tests/test_argparse_completer.py::test_autcomp_nargs[positional tests/test_argparse_completer.py::test_autcomp_nargs[the tests/test_completion.py::test_default_sort_key tests/test_history.py::test_multiline_histitem tests/test_history.py::test_multiline_histitem_verbose tests/test_parsing.py::test_parse_empty_string tests/test_parsing.py::test_tokenize[command-tokens0] tests/test_parsing.py::test_tokenize[# tests/test_parsing.py::test_tokenize[not tests/test_parsing.py::test_tokenize[42 tests/test_parsing.py::test_tokenize[l-tokens4] tests/test_parsing.py::test_tokenize[termbare tests/test_parsing.py::test_tokenize[termbare; tests/test_parsing.py::test_tokenize[termbare& tests/test_parsing.py::test_tokenize[help|less-tokens9] tests/test_parsing.py::test_tokenize[l|less-tokens10] tests/test_parsing.py::test_parse_single_word[plainword] tests/test_parsing.py::test_parse_single_word["one tests/test_parsing.py::test_parse_single_word['one tests/test_parsing.py::test_parse_word_plus_terminator[termbare;-;] tests/test_parsing.py::test_parse_word_plus_terminator[termbare tests/test_parsing.py::test_parse_word_plus_terminator[termbare&-&] tests/test_parsing.py::test_parse_suffix_after_terminator[termbare; tests/test_parsing.py::test_parse_suffix_after_terminator[termbare tests/test_parsing.py::test_parse_suffix_after_terminator[termbare& tests/test_parsing.py::test_parse_command_with_args tests/test_parsing.py::test_parse_command_with_quoted_args tests/test_parsing.py::test_parse_command_with_args_terminator_and_suffix tests/test_parsing.py::test_parse_comment tests/test_parsing.py::test_parse_embedded_comment_char tests/test_parsing.py::test_parse_simple_pipe[simple tests/test_parsing.py::test_parse_simple_pipe[simple|piped] tests/test_parsing.py::test_parse_double_pipe_is_not_a_pipe tests/test_parsing.py::test_parse_complex_pipe tests/test_parsing.py::test_parse_redirect[help tests/test_parsing.py::test_parse_redirect[help>out.txt->] tests/test_parsing.py::test_parse_redirect[help>>out.txt->>] tests/test_parsing.py::test_parse_redirect_with_args tests/test_parsing.py::test_parse_redirect_with_dash_in_path tests/test_parsing.py::test_parse_redirect_append tests/test_parsing.py::test_parse_pipe_then_redirect tests/test_parsing.py::test_parse_multiple_pipes tests/test_parsing.py::test_redirect_then_pipe tests/test_parsing.py::test_append_then_pipe tests/test_parsing.py::test_append_then_redirect tests/test_parsing.py::test_redirect_then_append tests/test_parsing.py::test_redirect_to_quoted_string tests/test_parsing.py::test_redirect_to_single_quoted_string tests/test_parsing.py::test_redirect_to_empty_quoted_string tests/test_parsing.py::test_redirect_to_empty_single_quoted_string tests/test_parsing.py::test_parse_output_to_paste_buffer tests/test_parsing.py::test_parse_redirect_inside_terminator tests/test_parsing.py::test_parse_multiple_terminators[multiline tests/test_parsing.py::test_parse_unfinished_multiliine_command tests/test_parsing.py::test_parse_basic_multiline_command tests/test_parsing.py::test_parse_multiline_command_ignores_redirectors_within_it[multiline tests/test_parsing.py::test_parse_multiline_terminated_by_empty_line tests/test_parsing.py::test_parse_multiline_with_embedded_newline[multiline tests/test_parsing.py::test_parse_multiline_ignores_terminators_in_quotes tests/test_parsing.py::test_parse_command_with_unicode_args tests/test_parsing.py::test_parse_unicode_command tests/test_parsing.py::test_parse_redirect_to_unicode_filename tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[helpalias-help-] tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[helpalias tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[42-theanswer-] tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[42 tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[!ls-shell-ls] tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[!ls tests/test_parsing.py::test_parse_alias_and_shortcut_expansion[l-shell-ls tests/test_parsing.py::test_parse_alias_on_multiline_command tests/test_parsing.py::test_parse_alias_redirection[helpalias tests/test_parsing.py::test_parse_alias_redirection[helpalias>out.txt->] tests/test_parsing.py::test_parse_alias_redirection[helpalias>>out.txt->>] tests/test_parsing.py::test_parse_alias_pipe[helpalias tests/test_parsing.py::test_parse_alias_pipe[helpalias|less] tests/test_parsing.py::test_parse_alias_terminator_no_whitespace[helpalias;] tests/test_parsing.py::test_parse_alias_terminator_no_whitespace[helpalias;;] tests/test_parsing.py::test_parse_alias_terminator_no_whitespace[helpalias;; tests/test_parsing.py::test_parse_alias_terminator_no_whitespace[helpalias tests/test_parsing.py::test_parse_command_only_command_and_args tests/test_parsing.py::test_parse_command_only_strips_line tests/test_parsing.py::test_parse_command_only_expands_alias tests/test_parsing.py::test_parse_command_only_expands_shortcuts tests/test_parsing.py::test_parse_command_only_quoted_args tests/test_parsing.py::test_parse_command_only_specialchars[helpalias tests/test_parsing.py::test_parse_command_only_specialchars[helpalias>out.txt->out.txt] tests/test_parsing.py::test_parse_command_only_specialchars[helpalias>>out.txt->>out.txt] tests/test_parsing.py::test_parse_command_only_specialchars[help|less-|less] tests/test_parsing.py::test_parse_command_only_specialchars[helpalias;-;] tests/test_parsing.py::test_parse_command_only_specialchars[help tests/test_parsing.py::test_parse_command_only_specialchars[help; tests/test_parsing.py::test_parse_command_only_empty[] tests/test_parsing.py::test_parse_command_only_empty[;] tests/test_parsing.py::test_parse_command_only_empty[;;] tests/test_parsing.py::test_parse_command_only_empty[;; tests/test_parsing.py::test_parse_command_only_empty[&] tests/test_parsing.py::test_parse_command_only_empty[& tests/test_parsing.py::test_parse_command_only_empty[ tests/test_parsing.py::test_parse_command_only_empty[>] tests/test_parsing.py::test_parse_command_only_empty['] tests/test_parsing.py::test_parse_command_only_empty["] tests/test_parsing.py::test_parse_command_only_empty[|] tests/test_parsing.py::test_parse_command_only_multiline tests/test_parsing.py::test_is_valid_command_invalid tests/test_parsing.py::test_is_valid_command_valid
tests/test_argparse_completer.py::test_help[music] tests/test_argparse_completer.py::test_help[music tests/test_argparse_completer.py::test_autocomp_blank_token tests/test_argparse_completer.py::test_completion_items[1-False] tests/test_argparse_completer.py::test_completion_items[5-True] tests/test_argparse_completer.py::test_completion_items[100-False] tests/test_argparse_completer.py::test_unfinished_flag_error[hint tests/test_argparse_completer.py::test_unfinished_flag_error[nargs tests/test_argparse_completer.py::test_completion_items_default_header tests/test_argparse_completer.py::test_autocomp_hint[hint--True] tests/test_argparse_completer.py::test_autocomp_hint[hint tests/test_argparse_completer.py::test_autocomp_hint[nargs tests/test_argparse_completer.py::test_autocomp_hint[hint---False] tests/test_argparse_completer.py::test_autocomp_hint_multiple_lines tests/test_argparse_completer.py::test_autocomp_hint_no_help_text tests/test_argparse_completer.py::test_single_prefix_char tests/test_argparse_completer.py::test_looks_like_flag tests/test_argparse_completer.py::test_complete_command_no_tokens tests/test_argparse_completer.py::test_complete_command_help_no_tokens tests/test_completion.py::test_cmd2_command_completion_single tests/test_completion.py::test_complete_command_single tests/test_completion.py::test_complete_empty_arg tests/test_completion.py::test_complete_bogus_command tests/test_completion.py::test_complete_exception tests/test_completion.py::test_complete_macro tests/test_completion.py::test_cmd2_command_completion_multiple tests/test_completion.py::test_cmd2_command_completion_nomatch tests/test_completion.py::test_cmd2_help_completion_single tests/test_completion.py::test_cmd2_help_completion_multiple tests/test_completion.py::test_cmd2_help_completion_nomatch tests/test_completion.py::test_shell_command_completion_shortcut tests/test_completion.py::test_shell_command_completion_doesnt_match_wildcards tests/test_completion.py::test_shell_command_completion_multiple tests/test_completion.py::test_shell_command_completion_nomatch tests/test_completion.py::test_shell_command_completion_doesnt_complete_when_just_shell tests/test_completion.py::test_shell_command_completion_does_path_completion_when_after_command tests/test_completion.py::test_shell_commmand_complete_in_path tests/test_completion.py::test_path_completion_single_end tests/test_completion.py::test_path_completion_multiple tests/test_completion.py::test_path_completion_nomatch tests/test_completion.py::test_default_to_shell_completion tests/test_completion.py::test_path_completion_no_text tests/test_completion.py::test_path_completion_no_path tests/test_completion.py::test_path_completion_cwd_is_root_dir tests/test_completion.py::test_path_completion_doesnt_match_wildcards tests/test_completion.py::test_path_completion_complete_user tests/test_completion.py::test_path_completion_user_path_expansion tests/test_completion.py::test_path_completion_directories_only tests/test_completion.py::test_basic_completion_single tests/test_completion.py::test_basic_completion_multiple tests/test_completion.py::test_basic_completion_nomatch tests/test_completion.py::test_delimiter_completion tests/test_completion.py::test_flag_based_completion_single tests/test_completion.py::test_flag_based_completion_multiple tests/test_completion.py::test_flag_based_completion_nomatch tests/test_completion.py::test_flag_based_default_completer tests/test_completion.py::test_flag_based_callable_completer tests/test_completion.py::test_index_based_completion_single tests/test_completion.py::test_index_based_completion_multiple tests/test_completion.py::test_index_based_completion_nomatch tests/test_completion.py::test_index_based_default_completer tests/test_completion.py::test_index_based_callable_completer tests/test_completion.py::test_tokens_for_completion_quoted tests/test_completion.py::test_tokens_for_completion_unclosed_quote tests/test_completion.py::test_tokens_for_completion_redirect tests/test_completion.py::test_tokens_for_completion_quoted_redirect tests/test_completion.py::test_tokens_for_completion_redirect_off tests/test_completion.py::test_add_opening_quote_basic_no_text tests/test_completion.py::test_add_opening_quote_basic_nothing_added tests/test_completion.py::test_add_opening_quote_basic_quote_added tests/test_completion.py::test_add_opening_quote_basic_single_quote_added tests/test_completion.py::test_add_opening_quote_basic_text_is_common_prefix tests/test_completion.py::test_add_opening_quote_delimited_no_text tests/test_completion.py::test_add_opening_quote_delimited_nothing_added tests/test_completion.py::test_add_opening_quote_delimited_quote_added tests/test_completion.py::test_add_opening_quote_delimited_text_is_common_prefix tests/test_completion.py::test_add_opening_quote_delimited_space_in_prefix tests/test_completion.py::test_no_completer tests/test_completion.py::test_quote_as_command tests/test_completion.py::test_redirect_complete[fake-RedirCompType.DEFAULT] tests/test_completion.py::test_redirect_complete[fake tests/test_completion.py::test_cmd2_subcommand_completion_single_end tests/test_completion.py::test_cmd2_subcommand_completion_multiple tests/test_completion.py::test_cmd2_subcommand_completion_nomatch tests/test_completion.py::test_cmd2_help_subcommand_completion_single tests/test_completion.py::test_cmd2_help_subcommand_completion_multiple tests/test_completion.py::test_cmd2_help_subcommand_completion_nomatch tests/test_completion.py::test_subcommand_tab_completion tests/test_completion.py::test_subcommand_tab_completion_with_no_completer tests/test_completion.py::test_subcommand_tab_completion_space_in_text tests/test_completion.py::test_cmd2_subcmd_with_unknown_completion_single_end tests/test_completion.py::test_cmd2_subcmd_with_unknown_completion_multiple tests/test_completion.py::test_cmd2_subcmd_with_unknown_completion_nomatch tests/test_completion.py::test_cmd2_help_subcommand_completion_single_scu tests/test_completion.py::test_cmd2_help_subcommand_completion_multiple_scu tests/test_completion.py::test_cmd2_help_subcommand_completion_with_flags_before_command tests/test_completion.py::test_complete_help_subcommand_with_no_command tests/test_completion.py::test_cmd2_help_subcommand_completion_nomatch_scu tests/test_completion.py::test_subcommand_tab_completion_scu tests/test_completion.py::test_subcommand_tab_completion_with_no_completer_scu tests/test_completion.py::test_subcommand_tab_completion_space_in_text_scu tests/test_history.py::test_readline_remove_history_item tests/test_history.py::test_history_class_span tests/test_history.py::test_persisted_history_span tests/test_history.py::test_history_class_get tests/test_history.py::test_history_str_search tests/test_history.py::test_history_regex_search tests/test_history.py::test_history_max_length_zero tests/test_history.py::test_history_max_length_negative tests/test_history.py::test_history_max_length tests/test_history.py::test_history_item_instantiate tests/test_history.py::test_history_item_properties tests/test_history.py::test_base_history tests/test_history.py::test_history_script_format tests/test_history.py::test_history_with_string_argument tests/test_history.py::test_history_expanded_with_string_argument tests/test_history.py::test_history_expanded_with_regex_argument tests/test_history.py::test_history_with_integer_argument tests/test_history.py::test_history_with_integer_span tests/test_history.py::test_history_with_span_start tests/test_history.py::test_history_with_span_end tests/test_history.py::test_history_with_span_index_error tests/test_history.py::test_history_output_file tests/test_history.py::test_history_bad_output_file tests/test_history.py::test_history_edit tests/test_history.py::test_history_run_all_commands tests/test_history.py::test_history_run_one_command tests/test_history.py::test_history_clear tests/test_history.py::test_history_verbose_with_other_options tests/test_history.py::test_history_verbose tests/test_history.py::test_history_script_with_invalid_options tests/test_history.py::test_history_script tests/test_history.py::test_history_expanded_with_invalid_options tests/test_history.py::test_history_expanded tests/test_history.py::test_history_script_expanded tests/test_history.py::test_base_help_history tests/test_history.py::test_exclude_from_history tests/test_history.py::test_history_file_is_directory tests/test_history.py::test_history_file_permission_error tests/test_history.py::test_history_file_conversion_no_truncate_on_init tests/test_history.py::test_history_populates_readline tests/test_history.py::test_persist_history_ensure_no_error_if_no_histfile tests/test_history.py::test_persist_history_permission_error tests/test_parsing.py::test_parse_empty_string_default tests/test_parsing.py::test_tokenize_default[command-tokens0] tests/test_parsing.py::test_tokenize_default[#comment-tokens1] tests/test_parsing.py::test_tokenize_default[not tests/test_parsing.py::test_tokenize_default[termbare tests/test_parsing.py::test_tokenize_default[termbare; tests/test_parsing.py::test_tokenize_default[termbare& tests/test_parsing.py::test_tokenize_default[help|less-tokens7] tests/test_parsing.py::test_tokenize_unclosed_quotes tests/test_parsing.py::test_command_and_args[tokens0--] tests/test_parsing.py::test_command_and_args[tokens1-command-] tests/test_parsing.py::test_command_and_args[tokens2-command-arg1 tests/test_parsing.py::test_parse_unclosed_quotes tests/test_parsing.py::test_empty_statement_raises_exception tests/test_parsing.py::test_statement_initialization tests/test_parsing.py::test_statement_is_immutable tests/test_parsing.py::test_macro_normal_arg_pattern tests/test_parsing.py::test_macro_escaped_arg_pattern