X-Git-Url: https://git.realraum.at/?a=blobdiff_plain;f=tuerctlsh;fp=tuerctlsh;h=f41cb5f7923725b1c48fc6e68ec8c33b6cb58a2d;hb=f0141bab0c6dfd2d1ea930c2b4e0be4731f16438;hp=12dcde50a0fc612695951e7a5af4460abcfd7681;hpb=6b947883f656cb7ce7b1ca263f1a1663405f28aa;p=svn42.git diff --git a/tuerctlsh b/tuerctlsh index 12dcde5..f41cb5f 100755 --- a/tuerctlsh +++ b/tuerctlsh @@ -5,6 +5,7 @@ # # tuerctl ALL=(tuer) NOPASSWD: /flash/tuer/tuer_socat.sh +setopt histsubstpattern local TUERCHAN="sudo -u tuer /flash/tuer/tuer_socat.sh" [[ $1 == "-c" ]] && shift @@ -12,8 +13,7 @@ if [[ -z $1 ]]; then ${(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