function wait -d "Run commands and wait with a spin" set -l option set -l commands set -l spinners set -l time 0.03 set -l log set -l format "@\r" getopts $argv | while read -l 1 2 switch "$1" case - case _ set commands $commands ";$2" case s spin spinner{,s} style set spinners $spinners $2 case t time set time $2 case l log set log $2 case f format set format $2 case help set option help case h printf "usage: wait [--spin=