Example #1
0
static inline void help() {
	#define CMD_HELP(CMDL, CMDS, MSG) printf("  %s, %s\t%s.\n", CMDS, CMDL, MSG);

	puts("Usage: mpdplayby [OPTIONS]\n");
	puts(" Options:");

	CMD_HELP("--title",	"-t",	"Match song titles");
	CMD_HELP("--artist",	"-r",	"Match song artists");
	CMD_HELP("--album",	"-b",	"Match song albums");
	CMD_HELP("--addr",	"-a",	"The MPD server address");
	CMD_HELP("--port",	"-p",	"The MPD server port");
	CMD_HELP("--secret",	"-s",	"The MPD password");
	CMD_HELP("--help",	"-h",	"Show this help");

	puts("");
}
Example #2
0
static inline void help(void) {
	#define CMD_HELP(CMDL, CMDS, MSG) printf("  %s, %-15s \t%s.\n", COLOR_YELLOW CMDS, CMDL COLOR_OFF, MSG);

	printf(COLOR_RED "Usage: " COLOR_OFF);
	printf(COLOR_GREEN "pflask " COLOR_OFF);
	puts("[OPTIONS] [COMMAND [ARGS...]]\n");

	puts(COLOR_RED " Options:" COLOR_OFF);

	CMD_HELP("--mount", "-m",
		"Create a new mount point inside the container");
	CMD_HELP("--netif", "-n",
		"Create a new network namespace and optionally move a network interface inside it");

	CMD_HELP("--user",  "-u",
		"Run the command as the specified user inside the container");

	CMD_HELP("--chroot",  "-r",
		"Use the specified directory as root inside the container");
	CMD_HELP("--chdir", "-c",
		"Change to the specified directory inside the container");

	CMD_HELP("--detach", "-d",
		"Detach from terminal");
	CMD_HELP("--attach", "-a",
		"Attach to the specified detached process");

	CMD_HELP("--setenv", "-s",
		"Set additional environment variables");

	puts("");

	CMD_HELP("--no-userns",  "-U", "Disable user namespace support");
	CMD_HELP("--no-mountns", "-M", "Disable mount namespace support");
	CMD_HELP("--no-netns",   "-N", "Disable net namespace support");
	CMD_HELP("--no-ipcns",   "-I", "Disable IPC namespace support");
	CMD_HELP("--no-utsns",   "-H", "Disable UTS namespace support");
	CMD_HELP("--no-pidns",   "-P", "Disable PID namespace support");

	puts("");
}