aboutsummarylogtreecommitdiffstats
path: root/x.c
diff options
context:
space:
mode:
authorQuentin Rameau2018-03-16 16:19:18 +0100
committerHiltjo Posthuma2018-03-16 16:44:30 +0100
commit5cbb6e3ac72a1f7c690e0ea29b7bc660ba1211ca (patch)
tree4ec94a32e1d80e88d5b83cc103468b3d13d32734 /x.c
parentda5dcb70a29bc51ef245b634ff5ea4863d75ffc9 (diff)
downloadaur-5cbb6e3ac72a1f7c690e0ea29b7bc660ba1211ca.tar.gz
Fix title initialization
Diffstat (limited to 'x.c')
-rw-r--r--x.c10
1 files changed, 5 insertions, 5 deletions
diff --git a/x.c b/x.c
index 06e53d389c14..d0b26acf1b3b 100644
--- a/x.c
+++ b/x.c
@@ -1929,12 +1929,12 @@ main(int argc, char *argv[])
} ARGEND;
run:
- if (argc > 0) {
- /* eat all remaining arguments */
+ if (argc > 0) /* eat all remaining arguments */
opt_cmd = argv;
- if (!opt_title && !opt_line)
- opt_title = basename(xstrdup(argv[0]));
- }
+
+ if (!opt_title)
+ opt_title = (opt_line || !opt_cmd) ? "st" : opt_cmd[0];
+
setlocale(LC_CTYPE, "");
XSetLocaleModifiers("");
cols = MAX(cols, 1);