shithub: x

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