Skip to content

Conversation

@kmvanbrunt
Copy link
Member

Fixes #711

  • 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.

  • Moved the sorting of shortcuts into StatementParser which allows users to pass in a dictionary instead of a tuple for shortcuts

@kmvanbrunt kmvanbrunt requested review from kotfu and tleonhardt July 16, 2019 15:03
@codecov
Copy link

codecov bot commented Jul 16, 2019

Codecov Report

Merging #721 into master will decrease coverage by <.01%.
The diff coverage is 100%.

Impacted file tree graph

@@            Coverage Diff             @@
##           master     #721      +/-   ##
==========================================
- Coverage   97.15%   97.15%   -0.01%     
==========================================
  Files          13       13              
  Lines        3377     3373       -4     
==========================================
- Hits         3281     3277       -4     
  Misses         96       96
Impacted Files Coverage Δ
cmd2/argparse_custom.py 93.79% <ø> (ø) ⬆️
cmd2/parsing.py 100% <100%> (ø) ⬆️
cmd2/cmd2.py 96.45% <100%> (-0.01%) ⬇️
cmd2/argparse_completer.py 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update 1707ab8...ddb7b92. Read the comment docs.

tleonhardt
tleonhardt previously approved these changes Jul 16, 2019
@kmvanbrunt kmvanbrunt self-assigned this Jul 16, 2019
@kmvanbrunt kmvanbrunt merged commit 15b043c into master Jul 16, 2019
@kmvanbrunt kmvanbrunt deleted the default_sort_key branch July 16, 2019 18:14
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Change matches_sort_key to default_sort_key

3 participants