Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Defragment readline history for multiline commands. #1324

Merged
merged 1 commit into from
Sep 19, 2024

Conversation

kmvanbrunt
Copy link
Member

@kmvanbrunt kmvanbrunt commented Sep 18, 2024

Fixes #1297

Combine individual lines of a multiline command into a single line for readline history.
Spaces and newlines in quotes are preserved so those strings will span multiple lines.
Non-verbose cmd2 history uses the same format as readline history entries.

Copy link

codecov bot commented Sep 18, 2024

Codecov Report

Attention: Patch coverage is 98.07692% with 1 line in your changes missing coverage. Please review.

Project coverage is 98.53%. Comparing base (ff46021) to head (6960092).
Report is 6 commits behind head on master.

Files with missing lines Patch % Lines
cmd2/cmd2.py 96.66% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##           master    #1324      +/-   ##
==========================================
+ Coverage   97.72%   98.53%   +0.80%     
==========================================
  Files          22       22              
  Lines        5753     5790      +37     
==========================================
+ Hits         5622     5705      +83     
+ Misses        131       85      -46     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@kmvanbrunt kmvanbrunt marked this pull request as ready for review September 18, 2024 17:35
@kmvanbrunt kmvanbrunt added this to the 2.5.0 milestone Sep 18, 2024
@kmvanbrunt kmvanbrunt self-assigned this Sep 18, 2024
@kmvanbrunt kmvanbrunt force-pushed the defragment_multiline_history branch 3 times, most recently from 44e77b2 to 88b1657 Compare September 18, 2024 22:35
…r readline history.

Spaces and newlines in quotes are preserved so those strings will span multiple lines.
Non-verbose cmd2 history uses the same format as readline history entries.
@kmvanbrunt kmvanbrunt merged commit 4bc3727 into master Sep 19, 2024
32 of 42 checks passed
@kmvanbrunt kmvanbrunt deleted the defragment_multiline_history branch September 19, 2024 17:24
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.

readline history is fragmented when using multiline commands
1 participant