Skip to content

Cancel reading from stdin on Ctrl-C

Erik Seliger requested to merge mrn/handle-ctrl-c-batch-preview into main

Created by: mrnugget

This is essentially a copy-paste implementation of the ideas presented in this comment here: https://github.com/golang/go/issues/20280#issuecomment-655588450

It fixes #775 (closed) and helps with the issue described in https://github.com/sourcegraph/src-cli/pull/793#issuecomment-1163310725. Not sure if it has unintended side-effects.

screenshot_2022-06-23_10 26 51@2x

Test plan

  • Manually tested only the src batch preview -f - case, not the other cases.

Merge request reports

Loading