Add int and term trap calls
This commit is contained in:
@@ -80,10 +80,14 @@ function showQuestions() {
|
|||||||
|
|
||||||
function module_main() {
|
function module_main() {
|
||||||
local cmdName=${1:t}
|
local cmdName=${1:t}
|
||||||
|
local -A traps=()
|
||||||
shift
|
shift
|
||||||
autoloadZShLib || return
|
autoloadZShLib || return
|
||||||
checkHelpPrerequisites || return
|
checkHelpPrerequisites || return
|
||||||
configureLogging
|
configureLogging
|
||||||
|
trap 'traps call int; return 70' INT
|
||||||
|
trap 'traps call term; return 80' TERM
|
||||||
|
trap 'traps call exit' EXIT
|
||||||
eval "`getUsage $cmdName | docopts -f -V - -h - : "$@"`"
|
eval "`getUsage $cmdName | docopts -f -V - -h - : "$@"`"
|
||||||
checkQuestionsPrerequisites || return
|
checkQuestionsPrerequisites || return
|
||||||
[ "${show_questions}" = true ] && { showQuestions; return }
|
[ "${show_questions}" = true ] && { showQuestions; return }
|
||||||
|
|||||||
Reference in New Issue
Block a user