aboutsummaryrefslogtreecommitdiff
path: root/tmux.1
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@openbsd.org>2009-09-01 13:09:49 +0000
committerNicholas Marriott <nicm@openbsd.org>2009-09-01 13:09:49 +0000
commit7d5e4947160d9355353c29a983e373b66c05abef (patch)
treeefc2a0bce29bc661d657895828bb486c632a8cb1 /tmux.1
parentf8aa5821be6bb802785c5ca7c23c91465cfba4a3 (diff)
downloadrtmux-7d5e4947160d9355353c29a983e373b66c05abef.tar.gz
rtmux-7d5e4947160d9355353c29a983e373b66c05abef.tar.bz2
rtmux-7d5e4947160d9355353c29a983e373b66c05abef.zip
When using tmux as a login shell, there is currently no way to specify a shell
to be used as a login shell inside tmux, so add a default-shell session option. This sets the shell invoked as a login shell when the default-command option is empty. The default option value is whichever of $SHELL, getpwuid(getuid())'s pw_shell or /bin/sh is valid first. Based on a diff from martynas@, changed by me to be a session option rather than a window option.
Diffstat (limited to 'tmux.1')
-rw-r--r--tmux.126
1 files changed, 22 insertions, 4 deletions
diff --git a/tmux.1 b/tmux.1
index 8b92fa69..a524c025 100644
--- a/tmux.1
+++ b/tmux.1
@@ -1143,13 +1143,31 @@ maintain this maximum length.
.It Ic default-command Ar command
Set the command used for new windows (if not specified when the window is
created) to
-.Ar command .
+.Ar command ,
+which may be any
+.Xr sh 1
+command.
The default is an empty string, which instructs
.Nm
-to create a login shell using the
+to create a login shell using the value of the
+.Ic default-shell
+option.
+.It Ic default-shell Ar path
+Specify the default shell.
+This is used as the login shell for new windows when the
+.Ic default-command
+option is set to empty, and must be the full path of the executable.
+When started
+.Nm
+tries to set a default value from the first suitable of the
.Ev SHELL
-environment variable or, if it is unset, the user's shell returned by
-.Xr getpwuid 3 .
+environment variable, the shell returned by
+.Xr getpwuid 3 ,
+or
+.Pa /bin/sh .
+This option should be configured when
+.Nm
+is used as a login shell.
.It Ic default-path Ar path
Set the default working directory for processes created from keys, or
interactively from the prompt.