shithub: x

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