version 1.393, 2014/05/13 07:54:20 |
version 1.394, 2014/05/13 08:08:32 |
|
|
arguments are |
arguments are |
.Xr sh 1 |
.Xr sh 1 |
commands. |
commands. |
These must be passed as a single item, which typically means quoting them, for |
This may be a single argument passed to the shell, for example: |
example: |
|
.Bd -literal -offset indent |
.Bd -literal -offset indent |
new-window 'vi /etc/passwd' |
new-window 'vi /etc/passwd' |
.Ed |
.Ed |
|
.Pp |
|
Will run: |
|
.Bd -literal -offset indent |
|
/bin/sh -c 'vi /etc/passwd' |
|
.Ed |
|
.Pp |
|
Additionally, the |
|
.Ic new-window , |
|
.Ic new-session , |
|
.Ic split-window , |
|
.Ic respawn-window |
|
and |
|
.Ic respawn-pane |
|
commands allow |
|
.Ar shell-command |
|
to be given as multiple arguments and executed directly (without |
|
.Ql sh -c ) . |
|
This can avoid issues with shell quoting. |
|
For example: |
|
.Bd -literal -offset indent |
|
$ tmux new-window vi /etc/passwd |
|
.Ed |
|
.Pp |
|
Will run |
|
.Xr vi 1 |
|
directly without invoking the shell. |
.Pp |
.Pp |
.Ar command |
.Ar command |
.Op Ar arguments |
.Op Ar arguments |