forked from kiss-community/kiss
kiss: use Ctrl+D to abort prompt (#105)
EOF is defined by POSIX to cause read to return an error, and works with every shell while SIGINT (Ctrl+C) does not (eg. with yash). Co-authored-by: phoebos <ben@bvnf.space> Reviewed-on: https://codeberg.org/kiss-community/kiss/pulls/105 Co-authored-by: phoebos <phoebos@noreply.codeberg.org> Co-committed-by: phoebos <phoebos@noreply.codeberg.org>
This commit is contained in:
parent
8a1a88e0d3
commit
a27fcec564
2
kiss
2
kiss
@ -93,7 +93,7 @@ tmp_file_copy() {
|
|||||||
prompt() {
|
prompt() {
|
||||||
null "$1" || log "$1"
|
null "$1" || log "$1"
|
||||||
|
|
||||||
log "Continue?: Press Enter to continue or Ctrl+C to abort"
|
log "Continue?: Press Enter to continue or Ctrl+D to abort"
|
||||||
|
|
||||||
# korn-shell does not exit on interrupt of read.
|
# korn-shell does not exit on interrupt of read.
|
||||||
equ "$KISS_PROMPT" 0 || read -r _ || exit 1
|
equ "$KISS_PROMPT" 0 || read -r _ || exit 1
|
||||||
|
Loading…
Reference in New Issue
Block a user