shithub: x

ref: 830794964190b930e753533a4631573eda128c78
dir: /vt/

View raw version
#!/bin/rc
rfork e
. /sys/lib/x/lib.rc
usage = '
	x/vt [command]
'

rpath=`{x/path -P}
cmd=`{awk 'BEGIN{
	x = ENVIRON["*"]
	if(length(x) == 0)
		x = "$SHELL"
	printf("$SHELL -c ''cd %s; %s''",
		ENVIRON["rpath"], x)
}'}
vt ssh -r `{x/path -l} $"cmd