diff --git a/xclip.c b/xclip.c index d55029a..62f6177 100644 --- a/xclip.c +++ b/xclip.c @@ -35,7 +35,7 @@ #include "xclib.h" /* command line option table for XrmParseCommand() */ -XrmOptionDescRec opt_tab[18]; +XrmOptionDescRec opt_tab[20]; int opt_tab_size; /* Options that get set on the command line */ @@ -802,7 +802,6 @@ main(int argc, char *argv[]) /* Declare variables */ Window win; /* Window */ int exit_code; - /* As a convenience to command-line users, default to -o if stdin * is a tty. Will be overridden by -i or if user specifies a * filename as input. @@ -841,6 +840,13 @@ main(int argc, char *argv[]) opt_tab[i].value = (XPointer) NULL; i++; + /* selection option shortcut */ + opt_tab[i].option = xcstrdup("-s"); + opt_tab[i].specifier = xcstrdup(".selection"); + opt_tab[i].argKind = XrmoptionSepArg; + opt_tab[i].value = (XPointer) NULL; + i++; + /* filter option entry */ opt_tab[i].option = xcstrdup("-filter"); opt_tab[i].specifier = xcstrdup(".filter"); @@ -869,6 +875,13 @@ main(int argc, char *argv[]) opt_tab[i].value = (XPointer) xcstrdup("V"); i++; + /* version option shortcut*/ + opt_tab[i].option = xcstrdup("-v"); + opt_tab[i].specifier = xcstrdup(".print"); + opt_tab[i].argKind = XrmoptionNoArg; + opt_tab[i].value = (XPointer) xcstrdup("V"); + i++; + /* help option entry */ opt_tab[i].option = xcstrdup("-help"); opt_tab[i].specifier = xcstrdup(".print"); diff --git a/xcprint.c b/xcprint.c index a16947f..03ed71b 100644 --- a/xcprint.c +++ b/xcprint.c @@ -38,7 +38,7 @@ prhelp(char *name) " -i, -in read text into X selection from stdin or files [DEFAULT]\n" " -f, -filter text piped in to selection will also be printed out\n" " -o, -out prints the selection to standard out\n" -" -selection primary [DEFAULT], clipboard, secondary, or buffer-cut\n" +" -s, -selection primary [DEFAULT], clipboard, secondary, or buffer-cut (p, c, s or b)\n" " -t, -target specify target atom: image/jpeg, UTF8_STRING [DEFAULT]\n" " -alt-text specify text representation for STRING target\n" " -silent errors only, (run in background) [DEFAULT]\n" @@ -51,7 +51,7 @@ prhelp(char *name) " -noutf8 don't treat text as utf-8, use old unicode\n" " -r, -rmlastnl remove the last newline character if present\n" " -d, -display X display to connect to (eg localhost:0\")\n" -" -version version information\n" +" -v -version version information\n" " -h, -help this usage information\n" "\n" "Report bugs to \n", name); exit(EXIT_SUCCESS);