forked from kiss-community/kiss
kiss: use dd for prompt (#106)
use dd for prompt since it will always exit upon receiving SIGINT signal, unlike the read builtin, which, as permitted by POSIX, can ignore this signal. Reviewed-on: https://codeberg.org/kiss-community/kiss/pulls/106 Co-authored-by: illiliti <illiliti@protonmail.com> Co-committed-by: illiliti <illiliti@protonmail.com>
This commit is contained in:
parent
a27fcec564
commit
3309146e61
6
kiss
6
kiss
@ -93,10 +93,8 @@ tmp_file_copy() {
|
||||
prompt() {
|
||||
null "$1" || log "$1"
|
||||
|
||||
log "Continue?: Press Enter to continue or Ctrl+D to abort"
|
||||
|
||||
# korn-shell does not exit on interrupt of read.
|
||||
equ "$KISS_PROMPT" 0 || read -r _ || exit 1
|
||||
log "Continue?: Press Enter to continue or Ctrl+C to abort"
|
||||
equ "$KISS_PROMPT" 0 || dd ibs=1 count=1 >/dev/null 2>&1 || exit 1
|
||||
}
|
||||
|
||||
mkcd() {
|
||||
|
Loading…
Reference in New Issue
Block a user