Xinqi Bao's Git
projects
/
st.git
/ diff
summary
|
log
|
commit
|
diff
|
tree
raw
|
patch
|
inline
| side by side (parent:
5beae6a
)
applied parts of Connor Lane Smith's cleanup patch.
author
Aurélien Aptel <
[email protected]
>
Sat, 14 May 2011 15:47:37 +0000
(17:47 +0200)
committer
Aurélien Aptel <
[email protected]
>
Sat, 14 May 2011 15:47:37 +0000
(17:47 +0200)
st.1
diff
|
blob
|
history
st.c
diff
|
blob
|
history
diff --git
a/st.1
b/st.1
index
f1f41a7
..
69cfe86
100644
(file)
--- a/
st.1
+++ b/
st.1
@@
-1,4
+1,4
@@
-.TH ST 1 st-VERSION
+.TH ST 1 st
\
-VERSION
.SH NAME
st \- simple terminal
.SH SYNOPSIS
.SH NAME
st \- simple terminal
.SH SYNOPSIS
@@
-9,24
+9,24
@@
st \- simple terminal
.IR title ]
.RB [ \-v ]
.RB [ \-e
.IR title ]
.RB [ \-v ]
.RB [ \-e
-.IR c
md
]
+.IR c
ommand ...
]
.SH DESCRIPTION
.B st
is a simple terminal emulator.
.SH OPTIONS
.TP
.SH DESCRIPTION
.B st
is a simple terminal emulator.
.SH OPTIONS
.TP
-.B
\-t title
-Overrides the default title (st)
+.B
I \-t " title"
+defines the window title (default 'st').
.TP
.TP
-.B
\-c class
-Overrides the default class ($TERM)
+.B
I \-c " class"
+defines the window class (default $TERM).
.TP
.B \-v
.TP
.B \-v
-
Prints version information to standard output
, then exits.
+
prints version information to stderr
, then exits.
.TP
.TP
-.B
\-e cmd [arguments]
-Execute cmd instead of the shell. Type your command as you would on your
-shell. If this option is used, it
-.BI "must be the last"
-on the command-line. This is the same behaviour as xterm/rxvt.
-
+.B
I \-e " program " [ " arguments " "... ]"
+st executes
+.I program
+instead of the shell. If this is used it
+.B must be the last option
+on the command line, as in xterm / rxvt.
diff --git
a/st.c
b/st.c
index
8347dbe
..
01ffa21
100644
(file)
--- a/
st.c
+++ b/
st.c
@@
-34,8
+34,8
@@
#endif
#define USAGE \
#endif
#define USAGE \
- "st-" VERSION ", (c) 2010 st engineers\n" \
- "usage: st [-t title] [-c class] [-v] [-e c
md
]\n"
+ "st-" VERSION ", (c) 2010
-2011
st engineers\n" \
+ "usage: st [-t title] [-c class] [-v] [-e c
ommand...
]\n"
/* Arbitrary sizes */
#define ESC_TITLE_SIZ 256
/* Arbitrary sizes */
#define ESC_TITLE_SIZ 256
@@
-1907,17
+1907,17
@@
main(int argc, char *argv[]) {
case 'c':
if(++i < argc) opt_class = argv[i];
break;
case 'c':
if(++i < argc) opt_class = argv[i];
break;
- case 'e':
+ case 'e':
+ /* eat every remaining arguments */
if(++i < argc) opt_cmd = &argv[i];
if(++i < argc) opt_cmd = &argv[i];
-
break
;
+
goto run
;
case 'v':
default:
die(USAGE);
}
case 'v':
default:
die(USAGE);
}
- /* -e eats every remaining arguments */
- if(opt_cmd)
- break;
}
}
+
+ run:
setlocale(LC_CTYPE, "");
tnew(80, 24);
ttynew();
setlocale(LC_CTYPE, "");
tnew(80, 24);
ttynew();