function runHook -S -a name message
    if type -q "$name"
        if test -n "$message"
            echo "$message"
        end

        "$name"
        or exit
    else
        return 1
    end
end