Blob Blame History Raw
#include "ptycon_driver_impl.h"
#include "argv/argv.h"

const struct argv_option ptyc_default_options[] = {
	{"version",		'v',TAG_VERSION,ARGV_OPTARG_NONE,0,0,0,
				"show version information"},

	{"help",		'h',TAG_HELP,ARGV_OPTARG_OPTIONAL,0,"short|long",0,
				"show usage information [listing %s options only]"},

	{"-exec",		0,TAG_EXEC,ARGV_OPTARG_REQUIRED,
				ARGV_OPTION_HYBRID_ONLY | ARGV_OPTION_HYBRID_SPACE,
				0,"<cmd> ... [argv] ...",
				"execute %s; default is /bin/sh."},

	{"e",			0,TAG_EXEC,ARGV_OPTARG_REQUIRED,
				ARGV_OPTION_HYBRID_ONLY | ARGV_OPTION_HYBRID_SPACE,
				0,0,"synonym for --exec."},

	{"sysroot",		0,TAG_SYSROOT,ARGV_OPTARG_REQUIRED,0,0,"<dir>",
				"pass a handle to %s to the spawned child process, "
				"and set it to be the child's intial root directory."},

	{"daemon",		0,TAG_DAEMON,ARGV_OPTARG_OPTIONAL,0,"default|always|never",0,
				"create a daemon thread and handle signals sent by the "
				"application's own controlling terminal. The default is "
				"to create a daemon thread when ptycon runs as a stand-alone "
				"program, and defer the task to the main utility in all other "
				"cases."},

	{"debug", 		'd',TAG_DEBUG,ARGV_OPTARG_OPTIONAL,0,
				"event|oven|raw",0,
				"start an internal thread for debugging purposes. "
				"event: display trace information for low-level console "
				"events; oven|raw: start a pseudo client using a pty handle "
				"in [cooked|raw] mode. default is 'event'."},

	{"bell",		0,TAG_BELL,ARGV_OPTARG_OPTIONAL,0,"on|off",0,
				"turn bell %s."},

	{"cat",			'c',TAG_CAT,ARGV_OPTARG_REQUIRED,0,0,"<file>",
				"send %s to the terminal via the pty layer."},

	{"wait",		0,TAG_WAIT,ARGV_OPTARG_NONE,0,0,0,
				"wait on a dummy event upon invocation of ptycon_start(); "
				"this option has the sole purpose of rendering debub "
				"sessions with foreign debuggers more convenient, "
				"and must be the first command-line argument "
				"passed to the utility."},

	{0,0,0,0,0,0,0,0}
};