aboutsummaryrefslogtreecommitdiff
path: root/tmux.c
diff options
context:
space:
mode:
authorNicholas Marriott <nicholas.marriott@gmail.com>2007-10-03 12:34:16 +0000
committerNicholas Marriott <nicholas.marriott@gmail.com>2007-10-03 12:34:16 +0000
commitfe06744d66e66b0b8e3839dbca5791001be5e58d (patch)
tree8dc1240b8d30e8ccd85fc2fd6b58633ec7dc349e /tmux.c
parentdadc56d754f2e86dec96bcf3bed54090538ce336 (diff)
downloadrtmux-fe06744d66e66b0b8e3839dbca5791001be5e58d.tar.gz
rtmux-fe06744d66e66b0b8e3839dbca5791001be5e58d.tar.bz2
rtmux-fe06744d66e66b0b8e3839dbca5791001be5e58d.zip
String/number arguments..
Diffstat (limited to 'tmux.c')
-rw-r--r--tmux.c9
1 files changed, 8 insertions, 1 deletions
diff --git a/tmux.c b/tmux.c
index ca65489d..6b95f993 100644
--- a/tmux.c
+++ b/tmux.c
@@ -1,4 +1,4 @@
-/* $Id: tmux.c,v 1.21 2007-10-03 11:26:34 nicm Exp $ */
+/* $Id: tmux.c,v 1.22 2007-10-03 12:34:16 nicm Exp $ */
/*
* Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
@@ -36,6 +36,7 @@ volatile sig_atomic_t sigwinch;
volatile sig_atomic_t sigterm;
int debug_level;
u_int status_lines;
+char *default_command;
void sighandler(int);
@@ -172,6 +173,7 @@ int
main(int argc, char **argv)
{
const struct op *op, *found;
+ const char *shell;
char *path;
int opt;
u_int i;
@@ -199,6 +201,11 @@ main(int argc, char **argv)
status_lines = 1;
+ shell = getenv("SHELL");
+ if (shell == NULL)
+ shell = "/bin/ksh";
+ xasprintf(&default_command, "%s -l", shell);
+
found = NULL;
for (i = 0; i < NOP; i++) {
op = op_table + i;