summaryrefslogtreecommitdiff
path: root/usr.bin/tmux/tmux.1
diff options
context:
space:
mode:
authorNicholas Marriott <nicm@cvs.openbsd.org>2015-05-27 13:28:05 +0000
committerNicholas Marriott <nicm@cvs.openbsd.org>2015-05-27 13:28:05 +0000
commit63966299c09d84a8b302a8f428eda7958212686c (patch)
treed5790a7ada14c2043de78601ec757942646ec5f0 /usr.bin/tmux/tmux.1
parent12196419b753187958b87db58c98fb5f7d657a05 (diff)
Move the jobs output cache into the formats code so that #() work more
generally (for example, again working in set-titles-string).
Diffstat (limited to 'usr.bin/tmux/tmux.1')
-rw-r--r--usr.bin/tmux/tmux.136
1 files changed, 19 insertions, 17 deletions
diff --git a/usr.bin/tmux/tmux.1 b/usr.bin/tmux/tmux.1
index 7ca49f01b67..6d0fd14deca 100644
--- a/usr.bin/tmux/tmux.1
+++ b/usr.bin/tmux/tmux.1
@@ -1,4 +1,4 @@
-.\" $OpenBSD: tmux.1,v 1.430 2015/05/12 15:29:29 nicm Exp $
+.\" $OpenBSD: tmux.1,v 1.431 2015/05/27 13:28:04 nicm Exp $
.\"
.\" Copyright (c) 2007 Nicholas Marriott <nicm@users.sourceforge.net>
.\"
@@ -14,7 +14,7 @@
.\" IN AN ACTION OF CONTRACT, NEGLIGENCE OR OTHER TORTIOUS ACTION, ARISING
.\" OUT OF OR IN CONNECTION WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
.\"
-.Dd $Mdocdate: May 12 2015 $
+.Dd $Mdocdate: May 27 2015 $
.Dt TMUX 1
.Os
.Sh NAME
@@ -2662,25 +2662,10 @@ will be expanded.
It may also 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 "#(shell-command)" Ta "First line of the command's output"
.It Li "#[attributes]" Ta "Colour or attribute change"
.It Li "##" Ta "A literal" Ql #
.El
.Pp
-The #(shell-command) form executes
-.Ql shell-command
-and inserts the first line of its output.
-Note that shell commands are only executed once at the interval specified by
-the
-.Ic status-interval
-option: if the status line is redrawn in the meantime, the previous result is
-used.
-Shell commands are executed with the
-.Nm
-global environment set (see the
-.Sx ENVIRONMENT
-section).
-.Pp
For details on how the names and titles can be set see the
.Sx "NAMES AND TITLES"
section.
@@ -3245,6 +3230,23 @@ a number and a colon, so
.Ql #{=10:pane_title}
will include at most the first 10 characters of the pane title.
.Pp
+In addition, the first line of a shell command's output may be inserted using
+.Ql #() .
+For example,
+.Ql #(uptime)
+will insert the system's uptime.
+When constructing formats,
+.Nm
+does not wait for
+.Ql #()
+commands to finish; instead, the previous result from running the same command is used,
+or a placeholder if the command has not been run before.
+Commands are executed with the
+.Nm
+global environment set (see the
+.Sx ENVIRONMENT
+section).
+.Pp
The following variables are available, where appropriate:
.Bl -column "XXXXXXXXXXXXXXXXXXX" "XXXXX"
.It Sy "Variable name" Ta Sy "Alias" Ta Sy "Replaced with"