aboutsummaryrefslogtreecommitdiff
path: root/st.c
diff options
context:
space:
mode:
authorQuentin Rameau <quinq@fifth.space>2020-04-11 12:09:20 +0200
committerHiltjo Posthuma <hiltjo@codemadness.org>2020-04-11 15:23:23 +0200
commitc1145268f6b6c6f03a8bec1c09d356d6a4eba77e (patch)
treef76c1d4437a08e70953d3daa4144bae61fb0c743 /st.c
parent0b73612c0dc51dbec1717e5da94bc94559c37246 (diff)
downloadst-c1145268f6b6c6f03a8bec1c09d356d6a4eba77e.tar.gz
st-c1145268f6b6c6f03a8bec1c09d356d6a4eba77e.tar.bz2
st-c1145268f6b6c6f03a8bec1c09d356d6a4eba77e.zip
Launch scroll program with the default shell
Diffstat (limited to 'st.c')
-rw-r--r--st.c9
1 files changed, 6 insertions, 3 deletions
diff --git a/st.c b/st.c
index 2ecf8f3..59db144 100644
--- a/st.c
+++ b/st.c
@@ -682,9 +682,12 @@ execsh(char *cmd, char **args)
if (args) {
prog = args[0];
arg = NULL;
- } else if (scroll || utmp) {
- prog = scroll ? scroll : utmp;
- arg = scroll ? utmp : NULL;
+ } else if (scroll) {
+ prog = scroll;
+ arg = utmp ? utmp : sh;
+ } else if (utmp) {
+ prog = utmp;
+ arg = NULL;
} else {
prog = sh;
arg = NULL;