add _is_function

This commit is contained in:
Kay Marquardt (Gnadelwartz) 2019-04-23 20:37:15 +02:00
parent 56a45aa883
commit 03f22c90c0

View File

@ -10,7 +10,7 @@
# This file is public domain in the USA and all free countries.
# Elsewhere, consider it to be WTFPLv2. (wtfpl.net/txt/copying)
#
#### $$VERSION$$ v0.70-dev2-13-gca73be8
#### $$VERSION$$ v0.70-dev2-14-g56a45aa
#
# Exit Codes:
# - 0 sucess (hopefully)
@ -516,6 +516,10 @@ inproc() {
tmux send-keys -t "$copname" "${MESSAGE[0]} ${URLS[*]}
"
}
_is_function()
{
[ "$(LC_ALL=C type -t "$1")" = "function" ]
}
process_updates() {
MAX_PROCESS_NUMBER=$(echo "$UPDATE" | sed '/\["result",[0-9]*\]/!d' | tail -1 | sed 's/\["result",//g;s/\].*//g')
for ((PROCESS_NUMBER=0; PROCESS_NUMBER<=MAX_PROCESS_NUMBER; PROCESS_NUMBER++)); do