diff options
author | Aurélien Aptel <aurelien.aptel@gmail.com> | 2011-05-14 17:47:37 +0200 |
---|---|---|
committer | Aurélien Aptel <aurelien.aptel@gmail.com> | 2011-05-14 17:47:37 +0200 |
commit | cdd993c39ee72c426a6f02475928c0f03dc5a71d (patch) | |
tree | f2922a25996f343571e2fc6cfbb3a34ab0b9f72e | |
parent | a7f4af0139d6c0890007c7349b59ef94266ccea9 (diff) | |
download | st-patched-cdd993c39ee72c426a6f02475928c0f03dc5a71d.tar.bz2 st-patched-cdd993c39ee72c426a6f02475928c0f03dc5a71d.tar.xz st-patched-cdd993c39ee72c426a6f02475928c0f03dc5a71d.zip |
applied parts of Connor Lane Smith's cleanup patch.
-rw-r--r-- | st.1 | 26 | ||||
-rw-r--r-- | st.c | 14 |
2 files changed, 20 insertions, 20 deletions
@@ -1,4 +1,4 @@ | |||
1 | .TH ST 1 st-VERSION | 1 | .TH ST 1 st\-VERSION |
2 | .SH NAME | 2 | .SH NAME |
3 | st \- simple terminal | 3 | st \- simple terminal |
4 | .SH SYNOPSIS | 4 | .SH SYNOPSIS |
@@ -9,24 +9,24 @@ st \- simple terminal | |||
9 | .IR title ] | 9 | .IR title ] |
10 | .RB [ \-v ] | 10 | .RB [ \-v ] |
11 | .RB [ \-e | 11 | .RB [ \-e |
12 | .IR cmd ] | 12 | .IR command ...] |
13 | .SH DESCRIPTION | 13 | .SH DESCRIPTION |
14 | .B st | 14 | .B st |
15 | is a simple terminal emulator. | 15 | is a simple terminal emulator. |
16 | .SH OPTIONS | 16 | .SH OPTIONS |
17 | .TP | 17 | .TP |
18 | .B \-t title | 18 | .BI \-t " title" |
19 | Overrides the default title (st) | 19 | defines the window title (default 'st'). |
20 | .TP | 20 | .TP |
21 | .B \-c class | 21 | .BI \-c " class" |
22 | Overrides the default class ($TERM) | 22 | defines the window class (default $TERM). |
23 | .TP | 23 | .TP |
24 | .B \-v | 24 | .B \-v |
25 | Prints version information to standard output, then exits. | 25 | prints version information to stderr, then exits. |
26 | .TP | 26 | .TP |
27 | .B \-e cmd [arguments] | 27 | .BI \-e " program " [ " arguments " "... ]" |
28 | Execute cmd instead of the shell. Type your command as you would on your | 28 | st executes |
29 | shell. If this option is used, it | 29 | .I program |
30 | .BI "must be the last" | 30 | instead of the shell. If this is used it |
31 | on the command-line. This is the same behaviour as xterm/rxvt. | 31 | .B must be the last option |
32 | 32 | on the command line, as in xterm / rxvt. | |
@@ -34,8 +34,8 @@ | |||
34 | #endif | 34 | #endif |
35 | 35 | ||
36 | #define USAGE \ | 36 | #define USAGE \ |
37 | "st-" VERSION ", (c) 2010 st engineers\n" \ | 37 | "st-" VERSION ", (c) 2010-2011 st engineers\n" \ |
38 | "usage: st [-t title] [-c class] [-v] [-e cmd]\n" | 38 | "usage: st [-t title] [-c class] [-v] [-e command...]\n" |
39 | 39 | ||
40 | /* Arbitrary sizes */ | 40 | /* Arbitrary sizes */ |
41 | #define ESC_TITLE_SIZ 256 | 41 | #define ESC_TITLE_SIZ 256 |
@@ -1907,17 +1907,17 @@ main(int argc, char *argv[]) { | |||
1907 | case 'c': | 1907 | case 'c': |
1908 | if(++i < argc) opt_class = argv[i]; | 1908 | if(++i < argc) opt_class = argv[i]; |
1909 | break; | 1909 | break; |
1910 | case 'e': | 1910 | case 'e': |
1911 | /* eat every remaining arguments */ | ||
1911 | if(++i < argc) opt_cmd = &argv[i]; | 1912 | if(++i < argc) opt_cmd = &argv[i]; |
1912 | break; | 1913 | goto run; |
1913 | case 'v': | 1914 | case 'v': |
1914 | default: | 1915 | default: |
1915 | die(USAGE); | 1916 | die(USAGE); |
1916 | } | 1917 | } |
1917 | /* -e eats every remaining arguments */ | ||
1918 | if(opt_cmd) | ||
1919 | break; | ||
1920 | } | 1918 | } |
1919 | |||
1920 | run: | ||
1921 | setlocale(LC_CTYPE, ""); | 1921 | setlocale(LC_CTYPE, ""); |
1922 | tnew(80, 24); | 1922 | tnew(80, 24); |
1923 | ttynew(); | 1923 | ttynew(); |