diff options
author | Case Duckworth | 2021-02-25 17:01:10 -0600 |
---|---|---|
committer | Case Duckworth | 2021-02-25 17:01:10 -0600 |
commit | 3b5b17792231ae923d3029f6d82e5a2937d1f2de (patch) | |
tree | 6cdca0199ca6148af71dfe96a503d409e5f329ab | |
parent | Update README (diff) | |
download | bollux-3b5b17792231ae923d3029f6d82e5a2937d1f2de.tar.gz bollux-3b5b17792231ae923d3029f6d82e5a2937d1f2de.zip |
Trap SIGINT: fixes #3
-rwxr-xr-x | bollux | 3 |
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 | ||
27 | run() { # run COMMAND... | 27 | run() { # 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 | ||
156 | trap bollux_quit SIGINT | ||
154 | 157 | ||
155 | # set the terminal title | 158 | # set the terminal title |
156 | set_title() { # set_title STRING | 159 | set_title() { # set_title STRING |