Potential refactor

This commit is contained in:
pfych 2025-08-01 08:38:52 +10:00
parent 3e3212d81c
commit 235ce2c16b

View file

@ -2,6 +2,9 @@
NOW=$(date +%s)
# TODO: Consider refactoring to return via stdout for POSIX compatibility
# instead of using nameref (local -n) which isn't POSIX-compatible
# eg. MOUSE_STRING=$(debounce MOUSE_STRING 3600 "get_mouse_text" "fallback")
debounce () {
local -n VAR_REFERENCE=$1 # Funky Bash Pass-by-reference here!
VAR_NAME="$1"