about summary refs log tree commit diff stats
diff options
context:
space:
mode:
authorCase Duckworth2021-02-25 17:01:10 -0600
committerCase Duckworth2021-02-25 17:01:10 -0600
commit3b5b17792231ae923d3029f6d82e5a2937d1f2de (patch)
tree6cdca0199ca6148af71dfe96a503d409e5f329ab
parentUpdate README (diff)
downloadbollux-3b5b17792231ae923d3029f6d82e5a2937d1f2de.tar.gz
bollux-3b5b17792231ae923d3029f6d82e5a2937d1f2de.zip
Trap SIGINT: fixes #3
-rwxr-xr-xbollux3
1 files changed, 3 insertions, 0 deletions
diff --git a/bollux b/bollux index db47e9d..51ca597 100755 --- a/bollux +++ b/bollux
@@ -25,6 +25,7 @@ END
25} 25}
26 26
27run() { # run COMMAND... 27run() { # run COMMAND...
28 trap bollux_quit SIGINT
28 log debug "$*" 29 log debug "$*"
29 "$@" 30 "$@"
30} 31}
@@ -151,6 +152,8 @@ bollux_quit() {
151 printf '\e[1m%s\e[0m:\t\e[3m%s\e[0m\n' "$PRGN" "$BOLLUX_BYEMSG" 152 printf '\e[1m%s\e[0m:\t\e[3m%s\e[0m\n' "$PRGN" "$BOLLUX_BYEMSG"
152 exit 153 exit
153} 154}
155# trap C-c
156trap bollux_quit SIGINT
154 157
155# set the terminal title 158# set the terminal title
156set_title() { # set_title STRING 159set_title() { # set_title STRING