1
0
mirror of https://github.com/Morantron/tmux-fingers.git synced 2024-06-29 07:50:56 +02:00
tmux-fingers/scripts/debug.sh
2020-01-03 18:55:30 +01:00

24 lines
411 B
Bash
Executable File

#!/usr/bin/env bash
# Source this file and call `tail -f fingers.log` when you don't know WTF is
# going on.
CURRENT_DIR="$( cd "$( dirname "${BASH_SOURCE[0]}" )" && pwd )"
function current_ms() {
echo $(($(date +%s%N)/1000000))
}
function log() {
echo "$1" >> "$CURRENT_DIR/../fingers.log"
}
function log_array() {
declare -a arg_arr=(${!1})
for i in "${arg_arr[@]}"
do
log "> $i"
done
}