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

feat: Quit REPL when Ctrl-D is pressed on an empty prompt #1674

Merged
merged 1 commit into from Jul 4, 2023

Conversation

haines
Copy link
Member

@haines haines commented Jul 4, 2023

This PR allows the REPL to be stopped by hitting Ctrl-D with an empty prompt, as well as the :q/:quit/:exit directives.

It also allows Ctrl-C to abort a partially-completed multiline prompt.

Signed-off-by: Andrew Haines <haines@cerbos.dev>
@codecov
Copy link

codecov bot commented Jul 4, 2023

Codecov Report

Merging #1674 (595c9d7) into main (891c211) will increase coverage by 0.15%.
The diff coverage is 0.00%.

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main    #1674      +/-   ##
==========================================
+ Coverage   53.02%   53.17%   +0.15%     
==========================================
  Files         131      131              
  Lines       15303    15314      +11     
==========================================
+ Hits         8114     8143      +29     
+ Misses       6483     6465      -18     
  Partials      706      706              
Impacted Files Coverage Δ
cmd/cerbos/repl/internal/repl.go 47.24% <0.00%> (-1.13%) ⬇️

... and 5 files with indirect coverage changes

@oguzhand95 oguzhand95 self-requested a review July 4, 2023 12:54
Copy link
Member

@oguzhand95 oguzhand95 left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM

@haines haines merged commit 49faf0a into cerbos:main Jul 4, 2023
19 checks passed
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.

None yet

2 participants