Documentation ¶
Overview ¶
Program jcl is a client program for the demonstration shell-server defined in jsh.go.
It implements a trivial command-line reader and dispatcher that sends commands via JSON-RPC to the server and prints the responses. Unlike a real shell there is no job control or input redirection; command lines are read directly from stdin and packaged as written.
If a line ends in "\" the backslash is stripped off and the next line is concatenated to the current line.
If the last token on the command line is "<<" the reader accumulates all subsequent lines until a "." on a line by itself as input for the command. Escape a plain "." by doubling it "..".
Use the command ":stderr" to toggle reporting of stderr from commands.
Usage:
go build bitbucket.org/creachadair/jrpc2/cmd/examples/jcl ./jcl -server :8080
See also cmd/examples/jsh/jsh.go.