> Index: tmux.1
> ===================================================================
> RCS file: /cvsroot/tmux/tmux/tmux.1,v
> retrieving revision 1.222
> diff -u -r1.222 tmux.1
> --- tmux.1    22 Jan 2010 17:28:34 -0000      1.222
> +++ tmux.1    23 Jan 2010 20:37:14 -0000
> @@ -111,6 +111,8 @@
>  server will be started to retrieve the
>  .Ic default-shell
>  option.
> +This is used when tmux is set as the login shell, since external
> +tools expect -c to work with any shell.

Well, you can use it whenever you like, it is only required when tmux is a
login shell. How about just:

This option is for compatibility with
.Xr sh 1
when
.Nm
is used as a login shell.

>  .It Fl f Ar file
>  Specify an alternative configuration file.
>  By default,
> @@ -342,6 +344,40 @@
>  .Em bottom-right
>  may be used instead of a pane index.
>  .Pp
> +.Ar shell-command
> +arguments are
> +.Xr sh 1
> +commands.
> +These must be passed as a single item, which typically means quoting them, 
> for
> +example:
> +.Bd -literal -offset indent
> +new-window 'vi /etc/passwd'
> +.Ed
> +.Pp
> +When the shell command completes, the window closes.  See
> +the
> +.Ic remain-on-exit
> +option and the
> +.Ic respawn-window
> +command for how do use non-interactive or otherwise exiting shell
> +commands under tmux.

I'm not sure this need to be stated, it is obvious that when the command in the
window exits the window closes. Or perhaps it should go in the windows section.

> +.Pp
> +.Ar command
> +.Op Ar arguments
> +refers to a
> +.Nm
> +command, passed with the command and arguments separately, for example:
> +.Bd -literal -offset indent
> +bind-key F1 set-window-option force-width 81
> +.Ed
> +.Pp
> +Or if using
> +.Xr sh 1 :
> +.Pp
> +.Bd -literal -offset indent
> +$ tmux bind-key F1 set-window-option force-width 81
> +.Ed
> +.Pp
>  Multiple commands may be specified together as part of a
>  .Em command sequence .
>  Each command should be separated by spaces and a semicolon;
> @@ -349,8 +385,10 @@
>  A literal semicolon may be included by escaping it with a backslash (for
>  example, when specifying a command sequence to
>  .Ic bind-key ) .
> +Note that all the commands, and the semicolons, must be separate words when
> +running a tmux command sequence from a shell.

This isn't true (a space before the semicolon is no longer required) and I
think the examples are sufficient to show it anyway.

>  .Pp
> -Examples include:
> +Examples of tmux commands include:

Example
.Nm
commands include:

>  .Bd -literal -offset indent
>  refresh-client -t/dev/ttyp2
>  
> @@ -360,6 +398,20 @@
>  
>  new-window ; split-window -d
>  .Ed
> +Or from
> +.Xr sh 1 :
> +.Pp
> +.Bd -literal -offset indent
> +$ tmux kill-window -t :1
> +
> +$ tmux new-window \\; split-window -d
> +
> +$ tmux new-session -d 'vi /etc/passwd' \\; split-window -d \\; attach
> +.Ed
> +.Pp
> +See the
> +.Sx EXAMPLES
> +section for more.
>  .Sh CLIENTS AND SESSIONS
>  The following commands are available:
>  .Bl -tag -width Ds
> @@ -424,18 +476,28 @@
>  .Op Fl n Ar window-name
>  .Op Fl s Ar session-name
>  .Op Fl t Ar target-session
> -.Op Ar command
> +.Op Ar shell-command
>  .Xc
>  .D1 (alias: Ic new )
>  Create a new session with name
>  .Ar session-name .
> +.Ar window-name
> +and
> +.Ar shell-command
> +are the name of and shell command to execute in the initial window.
> +.Pp
>  The new session is attached to the current terminal unless
>  .Fl d
>  is given.
> -.Ar window-name
> -and
> -.Ar command
> -are the name of and command to execute in the initial window.

Why move this?

> +The
> +.Fl d
> +option is required if
> +.Ic new-session
> +is being used in a command sequence, because all further commands
> +are thrown out when attachment occurs.
> +Use the
> +.Ic attach
> +command at the end of the sequence as necessary.

I don't want this here yet because I want to look and see what is going on
first.

>  .Pp
>  If run from a terminal, any
>  .Xr termios 4
> @@ -456,7 +518,7 @@
>  Giving
>  .Fl n
>  or
> -.Ar command
> +.Ar shell-command
>  are invalid if
>  .Fl t
>  is used.
> @@ -824,6 +886,13 @@
>  .Ar src-window
>  to the specified
>  .Ar dst-window .
> +Since tmux has no concept of windows belonging to a particular
> +session, only links from sessions to windows, this means that both
> +the "old" and "new" locations for the window work just the same as
> +every other window, and everything done to the window from any link
> +is reflected in every other link.

This sentence is too long and doesn't seem very clear. I think something like:

"The same window may be linked into any number of sessions, or the same session
multiple times."

Would be enough.

> +This can be done across sessions, to create a window that can be interacted
> +with from multiple sessions.

I think this is implicit in how targets are defined, if necessary it should be
enough to reiterate that -s follows the same target form as -t.

>  If
>  .Ar dst-window
>  is specified and no such window exists, the
> @@ -861,7 +930,7 @@
>  .Op Fl dk
>  .Op Fl n Ar window-name
>  .Op Fl t Ar target-window
> -.Op Ar command
> +.Op Ar shell-command
>  .Xc
>  .D1 (alias: Ic neww )
>  Create a new window.
> @@ -873,11 +942,11 @@
>  shown, unless the
>  .Fl k
>  flag is used, in which case it is destroyed.
> -.Ar command
> +.Ar shell-command
>  is the command to execute.
>  If
> -.Ar command
> -is not specified, the default command is used.
> +.Ar shell-command
> +is not specified, the value of the default-command option is used.

.Ic default-command

>  .Pp
>  The
>  .Ev TERM
> @@ -905,7 +974,7 @@
>  .It Xo Ic pipe-pane
>  .Op Fl o
>  .Op Fl t Ar target-pane
> -.Op Ar command
> +.Op Ar shell-command
>  .Xc
>  .D1 (alias: Ic pipep )
>  Pipe any output sent by the program in
> @@ -913,10 +982,10 @@
>  to a shell command.
>  A pane may only be piped to one command at a time, any existing pipe is
>  closed before
> -.Ar command
> +.Ar shell-command
>  is executed.
>  If no
> -.Ar command
> +.Ar shell-command
>  is given, the current pipe (if any) is closed.
>  .Pp
>  The
> @@ -964,14 +1033,14 @@
>  .It Xo Ic respawn-window
>  .Op Fl k
>  .Op Fl t Ar target-window
> -.Op Ar command
> +.Op Ar shell-command
>  .Xc
>  .D1 (alias: Ic respawnw )
> -Reactive a window in which the command has exited (see the
> +Reactivate a window in which the command has exited (see the
>  .Ic remain-on-exit
>  window option).
>  If
> -.Ar command
> +.Ar shell-command
>  is not given, the command used when the window was created is executed.
>  The window must be already inactive, unless
>  .Fl k
> @@ -1010,7 +1079,7 @@
>  .Ar size |
>  .Fl p Ar percentage Oc
>  .Op Fl t Ar target-pane
> -.Op Ar command
> +.Op Ar shell-command
>  .Xc
>  .D1 (alias: splitw )
>  Create a new pane by splitting
> @@ -1351,10 +1420,10 @@
>  Set the number of buffers kept for each session; as new buffers are added to
>  the top of the stack, old ones are removed from the bottom if necessary to
>  maintain this maximum length.
> -.It Ic default-command Ar command
> +.It Ic default-command Ar shell-command
>  Set the command used for new windows (if not specified when the window is
>  created) to
> -.Ar command ,
> +.Ar shell-command ,
>  which may be any
>  .Xr sh 1
>  command.
> @@ -1421,7 +1490,7 @@
>  .Ic lock-server
>  option is set.
>  The default is not to lock (set to 0).
> -.It Ic lock-command Ar command
> +.It Ic lock-command Ar shell-command
>  Command to run when locking each client.
>  The default is to run
>  .Xr lock 1
> @@ -1572,7 +1641,7 @@
>  may contain any of the following special character sequences:
>  .Bl -column "Character pair" "Replaced with" -offset indent
>  .It Sy "Character pair" Ta Sy "Replaced with"
> -.It Li "#(command)" Ta "First line of command's output"
> +.It Li "#(shell-command)" Ta "First line of the command's output"
>  .It Li "#[attributes]" Ta "Colour or attribute change"
>  .It Li "#H" Ta "Hostname of local host"
>  .It Li "#F" Ta "Current window flag"
> @@ -1584,8 +1653,8 @@
>  .It Li "##" Ta "A literal" Ql #
>  .El
>  .Pp
> -The #(command) form executes
> -.Ql command
> +The #(shell-command) form executes
> +.Ql shell-command
>  as a shell command and inserts the first line of its output.

s/as a shell command //, it is redundant.

>  Note that shell commands are only executed once at the interval specified by
>  the
> @@ -2252,14 +2321,16 @@
>  Lock each client individually by running the command specified by the
>  .Ic lock-command
>  option.
> -.It Ic run-shell Ar command
> +.It Ic run-shell Ar shell-command
>  .D1 (alias: Ic run )
>  Execute
> -.Ar command
> +.Ar shell-command
>  in the background without creating a window.
> -After the command finishes, any output to stdout is displayed in output mode.
> +After the 
> +.Ar shell-command

I'd leave this as it is, there is only one command that could be talking about
here, it is only important to make sure shell-command is used in the command
synopses.

> +finishes, any output to stdout is displayed in output mode.
>  If
> -.Ar command
> +.Ar shell-command
>  doesn't return success, the exit status is also displayed.
>  .It Ic server-info
>  .D1 (alias: Ic info )

> ------------------------------------------------------------------------------
> Throughout its 18-year history, RSA Conference consistently attracts the
> world's best and brightest in the field, creating opportunities for Conference
> attendees to learn about information security's most important issues through
> interactions with peers, luminaries and emerging and established companies.
> http://p.sf.net/sfu/rsaconf-dev2dev

> _______________________________________________
> tmux-users mailing list
> tmux-users@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/tmux-users


------------------------------------------------------------------------------
Throughout its 18-year history, RSA Conference consistently attracts the
world's best and brightest in the field, creating opportunities for Conference
attendees to learn about information security's most important issues through
interactions with peers, luminaries and emerging and established companies.
http://p.sf.net/sfu/rsaconf-dev2dev
_______________________________________________
tmux-users mailing list
tmux-users@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/tmux-users

Reply via email to