diff options
| -rw-r--r-- | st.1 | 38 | ||||
| -rw-r--r-- | st.c | 24 |
2 files changed, 33 insertions, 29 deletions
| @@ -3,47 +3,43 @@ | |||
| 3 | st \- simple terminal | 3 | st \- simple terminal |
| 4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
| 5 | .B st | 5 | .B st |
| 6 | .RB [ \-a ] | 6 | .RB [ \-aiv ] |
| 7 | .RB [ \-c | 7 | .RB [ \-c |
| 8 | .IR class ] | 8 | .IR class ] |
| 9 | .RB [ \-f | 9 | .RB [ \-f |
| 10 | .IR font ] | 10 | .IR font ] |
| 11 | .RB [ \-g | 11 | .RB [ \-g |
| 12 | .IR geometry ] | 12 | .IR geometry ] |
| 13 | .RB [ \-i ] | ||
| 14 | .RB [ \-o | 13 | .RB [ \-o |
| 15 | .IR file ] | 14 | .IR iofile ] |
| 16 | .RB [ \-t | ||
| 17 | .IR title ] | ||
| 18 | .RB [ \-T | 15 | .RB [ \-T |
| 19 | .IR title ] | 16 | .IR title ] |
| 17 | .RB [ \-t | ||
| 18 | .IR title ] | ||
| 20 | .RB [ \-l | 19 | .RB [ \-l |
| 21 | .IR line ] | 20 | .IR line ] |
| 22 | .RB [ \-w | 21 | .RB [ \-w |
| 23 | .IR windowid ] | 22 | .IR windowid ] |
| 24 | .RB [ \-v ] | 23 | .RB [[ \-e ] |
| 25 | .RB [ \-e | 24 | .IR command |
| 26 | .IR command ...] | 25 | .RI [ arguments ...]] |
| 27 | .RI [ commands ...] | ||
| 28 | .PP | 26 | .PP |
| 29 | .B st | 27 | .B st |
| 30 | .RB [ \-a ] | 28 | .RB [ \-aiv ] |
| 31 | .RB [ \-c | 29 | .RB [ \-c |
| 32 | .IR class ] | 30 | .IR class ] |
| 33 | .RB [ \-f | 31 | .RB [ \-f |
| 34 | .IR font ] | 32 | .IR font ] |
| 35 | .RB [ \-g | 33 | .RB [ \-g |
| 36 | .IR geometry ] | 34 | .IR geometry ] |
| 37 | .RB [ \-i ] | ||
| 38 | .RB [ \-o | 35 | .RB [ \-o |
| 39 | .IR file ] | 36 | .IR iofile ] |
| 40 | .RB [ \-t | ||
| 41 | .IR title ] | ||
| 42 | .RB [ \-T | 37 | .RB [ \-T |
| 43 | .IR title ] | 38 | .IR title ] |
| 39 | .RB [ \-t | ||
| 40 | .IR title ] | ||
| 44 | .RB [ \-w | 41 | .RB [ \-w |
| 45 | .IR windowid ] | 42 | .IR windowid ] |
| 46 | .RB [ \-v ] | ||
| 47 | .RB \-l | 43 | .RB \-l |
| 48 | .IR line | 44 | .IR line |
| 49 | .RI [ stty_args ...] | 45 | .RI [ stty_args ...] |
| @@ -78,14 +74,14 @@ writes all the I/O to | |||
| 78 | This feature is useful when recording st sessions. A value of "-" means | 74 | This feature is useful when recording st sessions. A value of "-" means |
| 79 | standard output. | 75 | standard output. |
| 80 | .TP | 76 | .TP |
| 81 | .BI \-t " title" | 77 | .BI \-T " title" |
| 82 | defines the window title (default 'st'). | 78 | defines the window title (default 'st'). |
| 83 | .TP | 79 | .TP |
| 84 | .BI \-T " title" | 80 | .BI \-t " title" |
| 85 | defines the window title (default 'st'). | 81 | defines the window title (default 'st'). |
| 86 | .TP | 82 | .TP |
| 87 | .BI \-w " windowid" | 83 | .BI \-w " windowid" |
| 88 | embeds st within the window identified by | 84 | embeds st within the window identified by |
| 89 | .I windowid | 85 | .I windowid |
| 90 | .TP | 86 | .TP |
| 91 | .BI \-l " line" | 87 | .BI \-l " line" |
| @@ -111,9 +107,9 @@ for more arguments and cases. | |||
| 111 | .B \-v | 107 | .B \-v |
| 112 | prints version information to stderr, then exits. | 108 | prints version information to stderr, then exits. |
| 113 | .TP | 109 | .TP |
| 114 | .BI \-e " program " [ " arguments " "... ]" | 110 | .BI \-e " command " [ " arguments " "... ]" |
| 115 | st executes | 111 | st executes |
| 116 | .I program | 112 | .I command |
| 117 | instead of the shell. If this is used it | 113 | instead of the shell. If this is used it |
| 118 | .B must be the last option | 114 | .B must be the last option |
| 119 | on the command line, as in xterm / rxvt. | 115 | on the command line, as in xterm / rxvt. |
| @@ -486,6 +486,7 @@ static void *xrealloc(void *, size_t); | |||
| 486 | static char *xstrdup(char *); | 486 | static char *xstrdup(char *); |
| 487 | 487 | ||
| 488 | static void usage(void); | 488 | static void usage(void); |
| 489 | static void version(void); | ||
| 489 | 490 | ||
| 490 | static void (*handler[LASTEvent])(XEvent *) = { | 491 | static void (*handler[LASTEvent])(XEvent *) = { |
| 491 | [KeyPress] = kpress, | 492 | [KeyPress] = kpress, |
| @@ -4331,14 +4332,19 @@ run(void) | |||
| 4331 | void | 4332 | void |
| 4332 | usage(void) | 4333 | usage(void) |
| 4333 | { | 4334 | { |
| 4334 | die("%s " VERSION " (c) 2010-2016 st engineers\n" | 4335 | die("usage: %s [-aiv] [-c class] [-f font] [-g geometry]" |
| 4335 | "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n" | 4336 | " [-o file] [-T title]\n" |
| 4336 | " [-i] [-t title] [-T title] [-w windowid] [-e command ...]" | 4337 | " [-t title] [-w windowid] [[-e] command [args ...]]\n" |
| 4337 | " [command ...]\n" | 4338 | " %s [-aiv] [-c class] [-f font] [-g geometry]" |
| 4338 | " st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n" | 4339 | " [-o file] [-T title]\n" |
| 4339 | " [-i] [-t title] [-T title] [-w windowid] -l line" | 4340 | " [-t title] [-w windowid] -l line [stty_args ...]\n", |
| 4340 | " [stty_args ...]\n", | 4341 | argv0, argv0); |
| 4341 | argv0); | 4342 | } |
| 4343 | |||
| 4344 | void | ||
| 4345 | version(void) | ||
| 4346 | { | ||
| 4347 | die("%s " VERSION " (c) 2010-2016 st engineers\n", argv0); | ||
| 4342 | } | 4348 | } |
| 4343 | 4349 | ||
| 4344 | int | 4350 | int |
| @@ -4385,6 +4391,8 @@ main(int argc, char *argv[]) | |||
| 4385 | opt_embed = EARGF(usage()); | 4391 | opt_embed = EARGF(usage()); |
| 4386 | break; | 4392 | break; |
| 4387 | case 'v': | 4393 | case 'v': |
| 4394 | version(); | ||
| 4395 | break; | ||
| 4388 | default: | 4396 | default: |
| 4389 | usage(); | 4397 | usage(); |
| 4390 | } ARGEND; | 4398 | } ARGEND; |
