shithub: x

ref: 7760194f148720cc9d9432d47090ad4f1954a297
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