--- FAQ | 4 ++-- st.1 | 13 +++++-------- st.c | 19 ++++++------------- 3 files changed, 13 insertions(+), 23 deletions(-) diff --git a/FAQ b/FAQ index 3502c60..275fc4e 100644 --- a/FAQ +++ b/FAQ _AT_@ -26,8 +26,8 @@ st or st-256color. The default value for TERM can be changed in config.h Using a terminal multiplexer. -* `st -e tmux` using C-b [ -* `st -e screen` using C-a ESC +* `st tmux` using C-b [ +* `st screen` using C-a ESC ## Why doesn't the Del key work in some programs? diff --git a/st.1 b/st.1 index a9fec15..30e1612 100644 --- a/st.1 +++ b/st.1 _AT_@ -18,11 +18,14 @@ st \- simple terminal .RB [ \-w .IR windowid ] .RB [ \-v ] -.RB [ \-e -.IR command ...] +.RI [ command ...] .SH DESCRIPTION .B st is a simple terminal emulator. +.B st +executes +.I command +instead of the shell if given. .SH OPTIONS .TP .B \-a _AT_@ -61,12 +64,6 @@ embeds st within the window identified by .B \-v prints version information to stderr, then exits. .TP -.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. .SH SHORTCUTS .TP .B Ctrl-Print Screen diff --git a/st.c b/st.c index b2bcfe9..6c9ba5c 100644 --- a/st.c +++ b/st.c _AT_@ -4016,12 +4016,11 @@ void usage(void) { die("%s " VERSION " (c) 2010-2015 st engineers\n" \ "usage: st [-a] [-v] [-c class] [-f font] [-g geometry] [-o file]\n" - " [-i] [-t title] [-w windowid] [-e command ...]\n", argv0); + " [-i] [-t title] [-w windowid] [command ...]\n", argv0); } int main(int argc, char *argv[]) { - char *titles; uint cols = 80, rows = 24; xw.l = xw.t = 0; _AT_@ -4035,16 +4034,6 @@ main(int argc, char *argv[]) { case 'c': opt_class = EARGF(usage()); break; - case 'e': - /* eat all remaining arguments */ - if(argc > 1) { - opt_cmd = &argv[1]; - if(argv[1] != NULL && opt_title == NULL) { - titles = xstrdup(argv[1]); - opt_title = basename(titles); - } - } - goto run; case 'f': opt_font = EARGF(usage()); break; _AT_@ -4069,7 +4058,11 @@ main(int argc, char *argv[]) { usage(); } ARGEND; -run: + if(argc > 0) { + opt_cmd = argv; + if(!opt_title) + opt_title = basename(xstrdup(argv[0])); + } setlocale(LC_CTYPE, ""); XSetLocaleModifiers(""); tnew(MAX(cols, 1), MAX(rows, 1)); -- 1.8.4Received on Mon Apr 13 2015 - 19:37:17 CEST
This archive was generated by hypermail 2.3.0 : Mon Apr 13 2015 - 19:48:07 CEST