Test your terminal
Paste this command into the terminal that you want to test.
# prints "supported" if your terminal answers the 7501 query
sh -c 'old=$(stty -g); stty raw -echo min 0 time 5
printf "\033]7501;?\033\\\033[c" >/dev/tty
r=$(dd bs=256 count=1 </dev/tty 2>/dev/null); stty "$old"
case $r in *7501*) echo supported;; *) echo "not yet";; esac'