package server import ( "strings" ) func echo(r *request, args ...string) { expand := false if len(args) > 0 && args[0] == "-e" { expand = true args = args[1:] } s := strings.Join(args, " ") if expand { s = r.c.s.env.Expand(s) } r.Print(s) } func init() { handle("echo", echo, "[args]") }