#
# tuerctl ALL=(tuer) NOPASSWD: /flash/tuer/tuer_socat.sh
+setopt histsubstpattern
local TUERCHAN="sudo -u tuer /flash/tuer/tuer_socat.sh"
[[ $1 == "-c" ]] && shift
${(z)TUERCHAN}
else
echo "Usable commands are: open, close, toggle, reset, status"
- read -d $'\n'";,& " CMD #?"> "
- CMD=(${=${${${CMD/;/ }/&/ }/\// }})
- ${(z)TUERCHAN} <<< "${CMD[1]} ssh $1"
+ read -A CMD
+ ${(z)TUERCHAN} <<< "${${CMD[1]}:gs/[^a-zA-Z]//} ssh $1"
fi