shithub: x

ref: d9e9581806619108c84f7974ad529dda8769ec9b
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