changeset: 197:1eb3e1b6a8d0
tag: tip
user: Aurélien Aptel <aurelien.aptel_AT_gmail.com>
date: Sat May 14 17:47:37 2011 +0200
files: st.1 st.c
description:
applied parts of Connor Lane Smith's cleanup patch.
diff -r 33806ff4897d -r 1eb3e1b6a8d0 st.1
--- a/st.1 Tue May 10 22:55:35 2011 +0200
+++ b/st.1 Sat May 14 17:47:37 2011 +0200
@@ -1,4 +1,4 @@
-.TH ST 1 st-VERSION
+.TH ST 1 st\-VERSION
.SH NAME
st \- simple terminal
.SH SYNOPSIS
@@ -9,24 +9,24 @@
.IR title ]
.RB [ \-v ]
.RB [ \-e
-.IR cmd ]
+.IR command ...]
.SH DESCRIPTION
.B st
is a simple terminal emulator.
.SH OPTIONS
.TP
-.B \-t title
-Overrides the default title (st)
+.BI \-t " title"
+defines the window title (default 'st').
.TP
-.B \-c class
-Overrides the default class ($TERM)
+.BI \-c " class"
+defines the window class (default $TERM).
.TP
.B \-v
-Prints version information to standard output, then exits.
+prints version information to stderr, then exits.
.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.
-
+.BI \-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 -r 33806ff4897d -r 1eb3e1b6a8d0 st.c
--- a/st.c Tue May 10 22:55:35 2011 +0200
+++ b/st.c Sat May 14 17:47:37 2011 +0200
@@ -34,8 +34,8 @@
#endif
#define USAGE \
- "st-" VERSION ", (c) 2010 st engineers\n" \
- "usage: st [-t title] [-c class] [-v] [-e cmd]\n"
+ "st-" VERSION ", (c) 2010-2011 st engineers\n" \
+ "usage: st [-t title] [-c class] [-v] [-e command...]\n"
/* Arbitrary sizes */
#define ESC_TITLE_SIZ 256
@@ -1907,17 +1907,17 @@
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];
- break;
+ goto run;
case 'v':
default:
die(USAGE);
}
- /* -e eats every remaining arguments */
- if(opt_cmd)
- break;
}
+
+ run:
setlocale(LC_CTYPE, "");
tnew(80, 24);
ttynew();
Received on Sat May 14 2011 - 16:47:55 CEST
This archive was generated by hypermail 2.2.0 : Sat May 14 2011 - 16:48:04 CEST